/* Global layout */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

/* HEADER */
.header {
  background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.logo-area {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.brand-text {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Desktop nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-block;
}

.nav-link:hover {
  color: #e5e7eb;
  transform: translateY(-1px);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.25s ease;
}

.dropdown-toggle:hover {
  color: #e5e7eb;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  padding: 4px 0;
  animation: fadeInDown 0.25s ease;
  z-index: 1001;
}

.dropdown-content a {
  color: #4a5568;
  padding: 10px 18px;
  display: block;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dropdown-content a:hover {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #ffffff;
  padding-left: 26px;
}

.dropdown-content.show {
  display: block;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  background: #16a34a;
  color: #ffffff;
  padding: 10px 0 16px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 999;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu a {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
}

.mobile-menu a:hover {
  background: rgba(0, 0, 0, 0.14);
}

.mobile-menu.open {
  display: block;
  max-height: 400px;
}

/* HERO */
.page-header {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  color: #831843;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,0 Q300,60 600,30 T1200,0 L1200,120 L0,120 Z' fill='rgba(236,72,153,0.05)'/%3E%3C/svg%3E")
    repeat-x bottom;
  background-size: 1200px 120px;
  opacity: 0.3;
}

.page-header h1 {
  position: relative;
  z-index: 1;
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 16px;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
  animation: slideInDown 0.6s ease;
}

.page-header p {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  animation: slideInUp 0.6s ease;
  color: #9f1239;
}

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

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-20px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* MAIN CALCULATOR LAYOUT */
.calculator-container {
  max-width: 1400px;
  margin: -60px auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.calculator-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.6s ease;
  margin-bottom: 24px;
}

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

.card-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #ec4899;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Method selector */
.method-box {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  border-left: 4px solid #ec4899;
}

.method-title {
  font-weight: 600;
  color: #831843;
  margin-bottom: 8px;
}

.method-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.method-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #831843;
  font-weight: 600;
}

.method-option input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Inputs */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.input-group {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  padding: 24px;
  border-radius: 16px;
  border: 2px solid #ec4899;
  transition: all 0.3s ease;
}

.input-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.2);
}

.input-label {
  font-weight: 700;
  color: #831843;
  margin-bottom: 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field {
  width: 100%;
  padding: 14px;
  border: 2px solid #ec4899;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff;
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: #f5576c;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
  transform: scale(1.02);
}

.helper-text {
  font-size: 0.75rem;
  color: #831843;
  margin-top: 8px;
}

.ultrasound-age {
  display: flex;
  gap: 12px;
}

/* Buttons */
.calculate-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 24px;
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.4);
}

/* Results */
.result-display {
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  padding: 40px;
  border-radius: 20px;
  color: #ffffff;
  margin-bottom: 32px;
}

.due-date-value {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 8px;
  text-align: center;
}

.due-date-label {
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}

.days-until {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 16px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 6px;
  transition: width 1s ease;
}

.progress-text {
  text-align: center;
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.95;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
}

.stat-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 900;
}

.stat-subtitle {
  font-size: 0.8rem;
  margin-top: 6px;
}

/* Trimester section */
.trimester-section {
  background: #f8fafc;
  padding: 24px;
  border-radius: 16px;
  margin-top: 24px;
}

.trimester-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 18px;
  text-align: center;
}

.trimester-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 14px;
  border-left: 6px solid;
  transition: all 0.3s ease;
}

.trimester-item:hover {
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.trimester-info {
  flex: 1;
  padding-right: 10px;
}

.trimester-name {
  font-weight: 700;
  color: #1e293b;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.trimester-description {
  font-size: 0.85rem;
  color: #64748b;
}

.trimester-dates {
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Milestones */
.milestone-section {
  background: #f8fafc;
  padding: 24px;
  border-radius: 16px;
  margin-top: 16px;
}

.milestone-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 16px;
  border-left: 4px solid #ec4899;
  transition: all 0.3s ease;
}

.milestone-item:hover {
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.milestone-icon {
  font-size: 2rem;
  min-width: 32px;
}

.milestone-content {
  flex: 1;
}

.milestone-title {
  font-weight: 700;
  color: #1e293b;
  font-size: 1rem;
  margin-bottom: 4px;
}

.milestone-date {
  font-size: 0.9rem;
  color: #64748b;
}

/* Baby development */
.development-section {
  background: #f8fafc;
  padding: 24px;
  border-radius: 12px;
  margin-top: 24px;
}

.development-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

/* AdSense placeholder */
.adsense-container {
  background: #fce7f3;
  border-radius: 16px;
  padding: 20px;
  margin: 24px 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #f9a8d4;
}

.adsense-placeholder {
  text-align: center;
  color: #831843;
  font-size: 0.9rem;
}

/* Info box */
.info-box {
  background: #f8fafc;
  padding: 24px;
  border-radius: 12px;
}

.info-box h4 {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.info-box p {
  color: #64748b;
  margin-bottom: 18px;
}

/* Download buttons */
.download-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.download-btn {
  flex: 1;
  padding: 14px 24px;
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* BLOG SECTION */
.blog-section {
  max-width: 900px;
  margin: 80px auto;
  padding: 0 20px;
}

.blog-content {
  background: #ffffff;
  border-radius: 24px;
  padding: 60px 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  line-height: 1.8;
}

.blog-content h2 {
  font-size: 2.3rem;
  font-weight: 900;
  color: #1a202c;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-top: 32px;
  margin-bottom: 16px;
}

.blog-content h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #4a5568;
  margin-top: 24px;
  margin-bottom: 12px;
}

.blog-content p {
  color: #4a5568;
  font-size: 0.98rem;
  margin-bottom: 16px;
}

.blog-content ul {
  color: #4a5568;
  margin-left: 24px;
  margin-bottom: 18px;
}

.blog-content li {
  margin-bottom: 8px;
}

.blog-content strong {
  color: #ec4899;
  font-weight: 700;
}

.blog-content a {
  color: #ec4899;
  text-decoration: underline;
}

/* FAQ SECTION */
.faq-section {
  background: #f8fafc;
  padding: 40px 0 60px;
}

.faq-heading {
  font-size: 1.7rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  color: #1e293b;
}

.faq-item {
  background: #ffffff;
  border-radius: 14px;
  margin-bottom: 16px;
  padding: 18px 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 12px rgba(148, 163, 184, 0.2);
}

.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #111827;
}

.faq-item p {
  font-size: 0.95rem;
  color: #4b5563;
}

/* FOOTER */
.footer {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: #ffffff;
  padding: 60px 0 20px;
  margin-top: 40px;
}

.footer-column h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #cbd5e0;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-block;
}

.footer-column ul li a:hover {
  color: #ec4899;
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 32px;
  padding-top: 22px;
  text-align: center;
  color: #a0aec0;
  font-size: 0.85rem;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .page-header h1 {
    font-size: 2.1rem;
  }

  .page-header p {
    font-size: 0.98rem;
  }

  .calculator-card {
    padding: 26px 22px;
  }

  .input-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .download-buttons {
    flex-direction: column;
  }

  .due-date-value {
    font-size: 2.4rem;
  }

  .blog-content {
    padding: 32px 22px;
  }

  .blog-content h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 0.95rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .blog-content h2 {
    font-size: 1.6rem;
  }
}
