/* ==============================================
   OVULATION CALCULATOR — Rose Theme (#e11d48)
   ============================================== */

/* ---- Container ---- */
.ovulation-calculator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1e293b;
    line-height: 1.7;
}

.ovulation-calculator-container *,
.ovulation-calculator-container *::before,
.ovulation-calculator-container *::after {
    box-sizing: border-box;
}

/* ---- Hero ---- */
.ovulation-hero {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #fff;
    text-align: center;
    padding: 48px 32px 40px;
    border-radius: 16px;
    margin-bottom: 32px;
}

.ovulation-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

.ovulation-hero .hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.92;
    max-width: 600px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badges .badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ---- Stats ---- */
.ovulation-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
}

.stat-card .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #e11d48;
    margin-bottom: 6px;
}

.stat-card .stat-label {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}

/* ---- Privacy Notice ---- */
.privacy-notice {
    background: #fff1f2;
    border-left: 4px solid #e11d48;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.privacy-notice p {
    margin: 0;
}

/* ---- Form ---- */
.calculator-form-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

.calculator-form-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 24px;
    color: #0f172a;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
    font-size: 0.95rem;
}

.form-group input[type="date"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 0.82rem;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    margin-top: 8px;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ---- Results Section ---- */
.results-section {
    margin-bottom: 32px;
}

.results-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 24px;
    color: #0f172a;
    text-align: center;
}

/* Key Dates */
.key-dates {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

.date-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.date-card.highlight {
    background: linear-gradient(135deg, #e11d48, #be123c);
    border-color: transparent;
    color: #fff;
}

.date-card .date-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.date-card.highlight .date-label {
    color: rgba(255, 255, 255, 0.85);
    opacity: 1;
}

.date-card .date-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.date-card.highlight .date-value {
    color: #fff;
    font-size: 1.2rem;
}

/* ---- Calendar Section ---- */
.calendar-section {
    margin-bottom: 32px;
}

.calendar-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #0f172a;
    text-align: center;
}

/* Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #64748b;
}

.legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.swatch-period {
    background: #fecdd3;
    border: 1px solid #fda4af;
}

.swatch-fertile {
    background: #bbf7d0;
    border: 1px solid #86efac;
}

.swatch-ovulation {
    background: #16a34a;
    border: 1px solid #15803d;
}

.swatch-today {
    background: #fff;
    border: 2px solid #e11d48;
}

/* Calendar Grid */
.calendars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ovulation-calendar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.calendar-month-header {
    background: #f8fafc;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
}

.calendar-day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    padding: 6px 4px 4px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    border-radius: 6px;
    color: #475569;
    position: relative;
    font-weight: 500;
}

.calendar-day.empty {
    visibility: hidden;
}

.calendar-day.day-period {
    background: #fecdd3;
    color: #9f1239;
    font-weight: 600;
}

.calendar-day.day-fertile {
    background: #bbf7d0;
    color: #166534;
    font-weight: 600;
}

.calendar-day.day-ovulation {
    background: #16a34a;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 0 2px #15803d, 0 2px 6px rgba(22, 163, 74, 0.35);
}

.calendar-day.day-today {
    outline: 2px solid #e11d48;
    outline-offset: -2px;
    font-weight: 700;
    color: #e11d48;
}

.calendar-day.day-today.day-period {
    color: #9f1239;
}

.calendar-day.day-today.day-fertile {
    color: #166534;
}

.calendar-day.day-today.day-ovulation {
    color: #fff;
    outline-color: #fff;
}

/* ---- Cycle Summary Card ---- */
.cycle-summary-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.cycle-summary-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #0f172a;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

/* ---- Action Buttons ---- */
.result-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    border: none;
}

.mdcv2-print-btn.action-btn {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.mdcv2-print-btn.action-btn:hover {
    background: #e2e8f0;
}

.mdcv2-share-btn.action-btn {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #fff;
}

.mdcv2-share-btn.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(225, 29, 72, 0.3);
}

/* ---- History ---- */
.mdcv2-history-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.mdcv2-history-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #0f172a;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-size: 0.85rem;
    color: #64748b;
}

.history-result {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
}

.mdcv2-clear-history {
    background: none;
    border: none;
    color: #e11d48;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0 0;
}

.mdcv2-clear-history:hover {
    text-decoration: underline;
}

/* ---- Retake ---- */
.retake-section {
    text-align: center;
    margin-bottom: 32px;
}

.retake-btn {
    padding: 12px 40px;
    background: #fff;
    color: #e11d48;
    border: 2px solid #e11d48;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.retake-btn:hover {
    background: #e11d48;
    color: #fff;
}

/* ---- Education Tabs ---- */
.education-tabs {
    margin-bottom: 32px;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.tab-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #e11d48;
}

.tab-btn.active {
    color: #e11d48;
    border-bottom-color: #e11d48;
}

.tab-content {
    display: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 28px;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #0f172a;
}

.tab-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 24px 0 10px;
    color: #334155;
}

.tab-content h4:first-of-type {
    margin-top: 8px;
}

.tab-content p {
    margin: 0 0 12px;
    color: #475569;
}

.tab-content ul {
    margin: 0 0 12px;
    padding-left: 20px;
    color: #475569;
}

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

/* ---- FAQ ---- */
.faq-section {
    margin-bottom: 32px;
}

.faq-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: #0f172a;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    background: #fff;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    position: relative;
    padding-right: 44px;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #fef2f2;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    font-weight: 400;
    color: #e11d48;
    transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
    content: "\2212";
}

.faq-answer {
    display: none;
    padding: 0 20px 16px;
    background: #fff;
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 0 0 10px;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.7;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* ---- Disclaimer ---- */
.medical-disclaimer {
    background: #fef2f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.medical-disclaimer h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #9f1239;
}

.medical-disclaimer p {
    margin: 0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ---- Related Calculators ---- */
.related-calculators {
    margin-bottom: 32px;
}

.related-calculators h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #0f172a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.related-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 16px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    border-color: #e11d48;
    box-shadow: 0 2px 12px rgba(225, 29, 72, 0.12);
}

.related-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.related-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.related-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.5;
}

/* ---- References ---- */
.references-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.references-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #0f172a;
}

.references-section ol {
    margin: 0;
    padding-left: 20px;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.7;
}

.references-section li {
    margin-bottom: 8px;
}

.references-section a {
    color: #e11d48;
    text-decoration: none;
}

.references-section a:hover {
    text-decoration: underline;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
    .ovulation-hero {
        padding: 32px 20px 28px;
    }

    .ovulation-hero h1 {
        font-size: 1.6rem;
    }

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

    .key-dates {
        grid-template-columns: 1fr;
    }

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

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

    .result-actions {
        flex-direction: column;
    }

    .tab-nav {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
    }

    .tab-btn {
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 0;
        padding: 12px 16px;
        text-align: left;
    }

    .tab-btn.active {
        background: #fef2f2;
        border-bottom-color: #e2e8f0;
        border-left: 3px solid #e11d48;
    }

    .tab-content {
        border-radius: 0 0 12px 12px;
        padding: 20px;
    }

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

    .calculator-form-section {
        padding: 20px;
    }

    .hero-badges {
        gap: 6px;
    }

    .hero-badges .badge {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {
    .ovulation-hero h1 {
        font-size: 1.35rem;
    }

    .ovulation-hero .hero-subtitle {
        font-size: 0.92rem;
    }

    .stat-card .stat-value {
        font-size: 1.25rem;
    }
}
