* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff; /* Pure white background for minimalist look */
    min-height: 100vh;
    color: #333;
}

.main-nav {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.03); /* Add a very subtle shadow for consistency */
    margin-bottom: 30px;
}

.main-nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    text-decoration: none;
}

.nav-logo img {
    height: 28px; /* Control the height of the logo */
    display: block;
    max-width: 100%; /* Ensure logo scales down on small screens */
    height: auto; /* Maintain aspect ratio when scaling */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
    gap: 30px;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    transition: all 0.5s ease;
}

.main-content.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.main-content .input-section {
    max-width: 500px; /* Constrain width of input form */
    width: 100%;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05); /* Softer shadow */
}

.header {
    text-align: center;
}

.header h1 {
    color: #212121;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header p {
    color: #555;
    font-size: 1.1rem;
}

.input-section h2 {
    color: #333;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #A94064; /* New Accent: Dark Rose */
    box-shadow: none; /* Remove glow for a cleaner look */
}

.calculate-btn {
    background: #A94064; /* New Accent: Dark Rose */
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(169, 64, 100, 0.25);
    width: 100%;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(169, 64, 100, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

.results-section {
    display: none;
}

.results-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card {
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
    background: #f9f9f9;
    color: #212121;
}

.result-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.result-card .date {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0;
    color: #A94064; /* New Accent: Dark Rose */
}

.fertility-window {
    padding: 15px 20px;
    margin: 15px 0;
    background: #f9f2f2; /* Light pink background */
}

.fertility-window h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.date-item {
    background: #fff;
    padding: 12px;
    text-align: center;
}

.date-item .label {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 5px;
}

.date-item .date {
    font-size: 1.1rem;
    font-weight: bold;
}

.cycle-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-left: 4px solid #A94064; /* New Accent: Dark Rose */
}

.info-card h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1rem;
}

.info-card .value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #A94064; /* New Accent: Dark Rose */
}

.calendar-container {
    margin-top: 20px;
    grid-column: 1 / -1;
}

.calendar {
    background: white;
    padding: 25px;
    border: 1px solid #f0f0f0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav-btn {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #A94064;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
    background: #A94064;
    color: #fff;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day.header {
    background: #f8f9fa;
    color: #666;
    font-weight: 600;
    cursor: default;
}

.calendar-day.other-month {
    color: #ccc;
}

.calendar-day.today {
    background: #333;
    color: white;
    font-weight: bold;
}

.calendar-day.period {
    background: #fdecec; /* Soft pink */
    color: #c94040;
}

.calendar-day.fertile {
    background: #f9f2f2; /* Light pink */
    color: #A94064;
}

.calendar-day.ovulation {
    background: #A94064; /* New Accent: Dark Rose */
    color: #fff;
    font-weight: bold;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 15px;
    height: 15px;
}

/* Slider Section */
.slider-container {
    padding: 20px 30px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.slider-header h3 {
    font-size: 1.2rem;
    color: #333;
}

.slider-nav button {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #A94064;
    width: 30px;
    height: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.slider-nav button:hover {
    background: #A94064;
    color: #fff;
}

.slider-item {
    display: none;
    line-height: 1.6;
    animation: fadeIn 0.5s;
}

.slider-item.active {
    display: block;
}

.disclaimer {
    background: #fff9e6; /* Soft warning yellow */
    border: 1px solid #ffecb3;
    color: #555;
    padding: 20px;
}

.disclaimer strong {
    display: block;
    margin-bottom: 10px;
}

.content-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.content-section h3 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.content-section ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.content-section ul li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: #555;
}

.hidden {
    display: none !important;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    position: relative;
    background: #fff;
    padding: 30px 40px; /* More horizontal padding */
    max-width: 600px; /* Reduce max-width for a more compact look */
    width: 100%;
    animation: fadeIn 0.3s;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #333;
}

.modal-content .calendar-container {
    margin-top: 0;
}

.modal-content .calendar {
    border: none;
    padding: 0;
}

.modal-content .calendar-header {
    padding-top: 10px;
}

.site-footer {
    background: #f9f9f9;
    border-top: 1px solid #eee;
    padding: 30px 0;
    margin-top: 40px;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-footer p {
    color: #777;
}

.footer-links a {
    color: #777;
    text-decoration: none;
    margin-left: 20px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .main-content.two-column {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }
    
    .date-range {
        grid-template-columns: 1fr;
    }
    
    .legend {
        gap: 10px;
    }

    .site-footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links a {
        margin-left: 10px;
    }
}
