body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 0;
  margin: 0;
  background: #f5f5f5;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.header-section {
  text-align: center;
  margin-bottom: 40px;
}

.header-section h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.header-section p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 0;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 950px;
  margin-top: 30px;
  padding: 0 14px; /* provide side padding for smallest screens */
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.10);
  transition: box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
  position: relative;
  min-height: 140px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card:hover, .card.active {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.16);
}
.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.card-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  transition: all 0.4s;
  overflow: hidden;
}

.card.active .card-description {
  max-height: 160px;
  opacity: 1;
  margin-top: 12px;
}

/* responsive design */
@media (max-width: 1000px) {
  .cards-container { max-width: 750px; }
}
@media (max-width: 768px) {
  .header-section h1 { font-size: 1.35rem; }
  .cards-container { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 18px; border-radius: 12px; }
}
@media (max-width: 480px) {
  .header-section h1 { font-size: 1.10rem; }
  .card-title { font-size: 1.08rem; }
  .cards-container { padding: 0 3vw; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
    
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn { animation: fadeIn 0.8s ease forwards; }
.animate-slideUp { animation: slideUp 1s ease forwards; }

/*slide animation for takaful section (collapsed by default)*/
#takafulSection {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.9s cubic-bezier(.2,.9,.2,1), opacity 0.6s ease;
}
    
#takafulSection.show {
  max-height: 3000px; /* big enough to expand */
  opacity: 1;
}

/* subtle card ring highlight */
.coverage-card.ring { box-shadow: 0 0 0 4px rgba(59,130,246,0.18); }

/* small visual polish for the takaful card container */
.takaful-card { border-radius: 1rem; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); }

/*hide arrows in number input fields*/
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* --- GLOBAL FIX FOR MOBILE CROPPING INSIDE IFRAME --- */

/* Prevent any child element from overflowing horizontally */
html, body {
  width: 100% !important;
  overflow-x: hidden !important;
}

/* Force all Tailwind width classes to respect screen size */
* {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Fix grids that cause overflow on small screens */
.grid {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Fix canvas charts that overflow */
canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* Fix very wide cards caused by long padding */
.card,
.coverage-card,
.rounded-2xl,
.shadow-lg,
.shadow,
.p-8,
.p-6 {
  max-width: 100% !important;
}

/* Fix long text inside flex rows */
.flex {
  flex-wrap: wrap !important;
}

/* Fix tables / paired labels + inputs */
label {
  max-width: 100% !important;
  display: block !important;
}

/* Inputs that overflow on small phones */
input, select {
  width: 100% !important;
  max-width: 100% !important;
}

/* Fix AOS animations pushing elements outside */
[data-aos] {
  transform: none !important;
}

/* Prevent any element from going beyond screen */
div, section {
  overflow-x: hidden !important;
}
