@view-transition {
  navigation: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* HEADER & NAVIGATION */

.header {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(240, 147, 251, 0.3);
}

.site-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
}

.site-title-link {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-title-link:hover {
  opacity: 0.9;
}

/* Centered desktop nav */
.centered-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

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

.nav-link:hover {
  color: #e5e7eb;
  transform: scale(1.05);
}

/* Dropdown */

.dropdown {
  position: relative;
}

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

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

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

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

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

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

/* MOBILE MENU */

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

.mobile-menu {
  display: none;
  background: #059669; /* green menu */
  color: #ffffff;
  padding: 0.75rem 1.5rem 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  z-index: 999;
}

.mobile-menu.open {
  display: block;
  animation: slideDownMenu 0.25s ease-out;
}

.mobile-menu a {
  display: block;
  color: #ecfdf5;
  text-decoration: none;
  padding: 0.45rem 0;
  font-size: 0.96rem;
  border-bottom: 1px solid rgba(236, 253, 245, 0.18);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: #bbf7d0;
}

/* Overlay to close mobile menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 900;
}

.mobile-menu-overlay.open {
  display: block;
}

/* PAGE HEADER */

.page-header {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #ffffff;
  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(255,255,255,0.12)'/%3E%3C/svg%3E") repeat-x bottom;
  background-size: 1200px 120px;
  opacity: 0.35;
}

.page-header h1 {
  position: relative;
  z-index: 1;
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 12px;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.25);
  animation: slideInDown 0.6s ease;
}

.page-header p {
  position: relative;
  z-index: 1;
  font-size: 1.2rem;
  opacity: 0.96;
  max-width: 720px;
  margin: 0 auto;
  animation: slideInUp 0.6s ease;
}

/* 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;
}

.inner-card {
  background: linear-gradient(135deg, #fef3f8 0%, #fce7f3 100%);
  border: 2px solid #f093fb;
}

.card-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #f5576c;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.inner-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #831843;
  margin-bottom: 16px;
  text-align: center;
}

.inner-card-subtitle {
  font-size: 1.25rem;
  font-weight: 800;
  color: #831843;
  margin-bottom: 16px;
}

/* INPUTS */

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

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

.input-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(240, 147, 251, 0.2);
}

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

.input-field,
.select-field {
  width: 100%;
  padding: 13px 12px;
  border-radius: 10px;
  border: 2px solid #f093fb;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2933;
  background: #ffffff;
  transition: all 0.2s ease;
}

.input-field:focus,
.select-field:focus {
  outline: none;
  border-color: #f5576c;
  box-shadow: 0 0 0 4px rgba(240, 147, 251, 0.15);
  transform: scale(1.02);
}

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

.method-box {
  background: #ffffff;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #f093fb;
}

.method-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #831843;
}

.method-text {
  font-size: 0.78rem;
  color: #9f1239;
  margin-top: 4px;
}

/* BUTTONS */

.calculate-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(240, 147, 251, 0.5);
}

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

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

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(240, 147, 251, 0.4);
}

/* RESULTS */

.result-display {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  padding: 32px;
  border-radius: 20px;
  color: #ffffff;
}

.ovulation-value {
  font-size: 2.6rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 6px;
}

.ovulation-label {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  opacity: 0.95;
  margin-bottom: 18px;
}

.ovulation-description {
  text-align: center;
  font-size: 0.98rem;
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

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

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

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

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

/* FERTILITY CALENDAR */

.fertility-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.calendar-day {
  background: #ffffff;
  padding: 14px;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  text-align: center;
  transition: all 0.2s ease;
}

.calendar-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.calendar-day.high-fertility {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #ffffff;
  border-color: #f5576c;
}

.calendar-day.medium-fertility {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  border-color: #f093fb;
}

.calendar-day.ovulation {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  border-color: #991b1b;
  font-weight: 900;
}

.day-number {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.day-label {
  font-size: 0.7rem;
  opacity: 0.9;
}

/* Legend */

.legend-box {
  margin-top: 20px;
  padding: 12px;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #831843;
  font-weight: 600;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-ovulation {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.legend-high {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.legend-medium {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

/* FUTURE CYCLES */

.future-cycle {
  background: #ffffff;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 2px solid #f093fb;
}

.future-cycle-title {
  font-weight: 700;
  color: #831843;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.future-cycle-body {
  font-size: 0.85rem;
  color: #9f1239;
  line-height: 1.6;
}

/* ADSENSE */

.adsense-container {
  background: linear-gradient(135deg, #fef3f8 0%, #fce7f3 100%);
  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 BOXES */

.info-box {
  background: linear-gradient(135deg, #fef3f8 0%, #fce7f3 100%);
  padding: 18px;
  border-radius: 12px;
  border-left: 4px solid #f5576c;
  margin-top: 18px;
}

.info-title {
  font-weight: 700;
  color: #831843;
  margin-bottom: 8px;
  font-size: 0.98rem;
}

.info-text {
  color: #9f1239;
  font-size: 0.88rem;
  line-height: 1.7;
}

/* BLOG */

.blog-section {
  max-width: 900px;
  margin: 70px auto 0;
  padding: 0 20px;
}

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

.blog-content h2 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2d3748;
  margin-top: 28px;
  margin-bottom: 14px;
}

.blog-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a5568;
  margin-top: 22px;
  margin-bottom: 8px;
}

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

.blog-content ul {
  color: #4a5568;
  margin-left: 1.4rem;
  margin-bottom: 16px;
}

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

.blog-content a {
  color: #f5576c;
  text-decoration: none;
  font-weight: 600;
}

.blog-content a:hover {
  text-decoration: underline;
}

.highlight-box {
  background: linear-gradient(135deg, #fef3f8 0%, #fce7f3 100%);
  padding: 18px;
  border-radius: 12px;
  border-left: 4px solid #f5576c;
  margin: 20px 0;
  font-size: 0.95rem;
}

.faq-wrapper {
  margin-top: 8px;
}

.faq-item {
  margin-bottom: 16px;
}

.faq-item p {
  margin-bottom: 10px;
}

/* FOOTER */

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

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

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

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

.footer-column ul li a {
  color: #cbd5e0;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

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

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

/* ANIMATIONS */

@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 slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(3deg);
  }
}

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

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

/* RESPONSIVE */

@media (max-width: 1024px) {
  .centered-nav {
    position: static;
    transform: none;
  }
}

@media (max-width: 768px) {
  /* Hide all top-level desktop nav items on mobile */
  .desktop-nav {
    display: none !important;
  }

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

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

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

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

  .fertility-calendar {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .blog-content {
    padding: 26px 20px;
  }

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

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

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

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

  .ovulation-value {
    font-size: 2rem;
  }
}
