/* Base Styles */
:root {
    --primary-color: #2b7bb2;
    --secondary-color: #51a85c;
    --background-color: #ffffff;
    --text-color: #333333;
    --light-gray: #f5f7fa;
    --border-color: #e0e5eb;
    --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--light-gray);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #206696;
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #458b4f;
    color: white;
}

.center-btn {
    display: block;
    width: max-content;
    margin: 2rem auto 0;
}

/* Header */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav li {
    margin-left: 1.5rem;
}

nav a {
    font-weight: 500;
    color: var(--text-color);
}

nav a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 10rem 0 5rem;
    background: linear-gradient(135deg, #2b7bb2 0%, #51a85c 100%);
    color: white;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Cards */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    padding: 2rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card h3 {
    color: var(--primary-color);
}

.card p {
    margin-bottom: 1.5rem;
}

/* Benefits Section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: center;
}

.benefit-item {
    padding: 1.5rem;
}

.icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon img {
    width: 30px;
    height: 30px;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.checklist {
    margin-bottom: 2rem;
}

.checklist li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.75rem;
}

.checklist li::before {
    content: "✓";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Fasting Timer */
.timer-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.timer-display {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.timer-protocol {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.timer-protocol label {
    font-weight: 500;
}

.timer-protocol select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: white;
    font-family: var(--font-family);
    font-size: 0.95rem;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.timer-info {
    margin-top: 1.5rem;
}

#fast-status {
    margin-bottom: 1rem;
    font-weight: 500;
}

.progress-bar {
    height: 10px;
    background-color: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 0.3s ease;
}

.milestone-markers {
    position: relative;
    height: 20px;
    margin-top: 5px;
}

.milestone {
    position: absolute;
    width: 2px;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    bottom: 0;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.milestone::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--text-color);
    border-radius: 50%;
    top: -5px;
    left: -4px;
    transition: all 0.3s ease;
}

.milestone:hover::after {
    transform: scale(1.5);
    background-color: var(--primary-color);
}

.target-milestone::after {
    background-color: var(--primary-color);
}

.milestone:hover {
    height: 18px;
}

.milestone[data-hour="4"] { left: calc(4/48 * 100%); }
.milestone[data-hour="8"] { left: calc(8/48 * 100%); }
.milestone[data-hour="12"] { left: calc(12/48 * 100%); }
.milestone[data-hour="16"] { left: calc(16/48 * 100%); }
.milestone[data-hour="18"] { left: calc(18/48 * 100%); }
.milestone[data-hour="24"] { left: calc(24/48 * 100%); }

.history-section {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.history-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.fasting-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    min-width: 120px;
}

.stat-card span {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.fasting-history h4 {
    text-align: center;
    margin-bottom: 1rem;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.no-history {
    text-align: center;
    opacity: 0.7;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.history-date {
    font-weight: 500;
}

.history-duration {
    font-weight: 700;
    color: var(--primary-color);
}

.history-protocol {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Community Section */
.community-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #2b7bb2 0%, #51a85c 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.disclaimer {
    font-size: 0.875rem;
    margin-top: 1.5rem;
    opacity: 0.8;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: white;
    margin-bottom: 1.25rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
}

.footer-col p {
    margin-bottom: 1.25rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
}

.social-links img {
    width: 18px;
    height: 18px;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
}

#subscribe-form {
    display: flex;
    margin-top: 1rem;
}

#subscribe-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px 0 0 4px;
}

#subscribe-form button {
    border-radius: 0 4px 4px 0;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Media Queries */
@media (max-width: 992px) {
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .column-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: white;
        padding: 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 1001;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav li {
        margin: 1rem 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        z-index: 1002;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero {
        padding: 8rem 0 4rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Accessibility */
:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip to content */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 1001;
    transition: top 0.3s ease;
}

.skip-to-content:focus {
    top: 0;
}