/* ===== PAGE STYLES ===== */
:root {
    --primary-color: #0077ff;
    --primary-hover: #0056b3;
    --accent-color: #f97316;
    --accent-hover: #e66100;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --card-bg: #ffffff;
    --radius-sm: 8px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #d9ecff 0%, #ffe8d6 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================= HEADER / NAVBAR ================= */
.main-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.logo {
    height: 55px;
    width: auto;
}

.navbar ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.navbar a:hover,
.navbar a.active {
    color: var(--primary-color);
    background-color: rgba(0, 119, 255, 0.1);
}

/* ================= HAMBURGER MENU ================= */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
    margin-left: auto;
}

/* ================= MAIN CONTENT ================= */
.stress-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 90%;
    margin: 3rem auto;
    padding: 0 1rem;
    flex: 1;
}

/* Section Cards */
.stress-content section {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 350px;
}

.stress-content section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Section Headings */
.stress-content h2 {
    color: var(--primary-color);
    margin: 0 0 1.5rem 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.stress-content p {
    color: var(--text-light);
    margin: 0.5rem 0 1.5rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* ================= BREATHING CIRCLE ================= */
#breathing-circle {
    width: 180px;
    height: 180px;
    margin: 1.5rem auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffcc99, #ffd27f);
    box-shadow: var(--shadow-lg);
    transition: transform 4s ease-in-out, background-color 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Remove these if text is now outside: */
    /* position: relative; */
}

/* Breathing text BELOW the circle */
#breathing-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-top: 1.5rem;  /* Space between circle and text */
    text-align: center;
    min-height: 2rem;    /* Prevents layout shift */
    transition: color 0.5s ease;
}
/* Breathing instructions */
.breathing-instructions {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 119, 255, 0.05);
    border-radius: var(--radius-md);
    width: 100%;
}

.breathing-instructions p {
    font-size: 0.9rem;
    margin: 0.3rem 0;
    color: var(--text-light);
}

/* ================= TIMER SECTION ================= */
.timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#timer-display {
    font-size: 4rem;
    margin: 1.5rem 0;
    font-weight: 700;
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Timer button */
button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    min-width: 180px;
    margin: 1rem 0;
}

button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

button:active {
    transform: translateY(0);
}

/* Timer message */
#timer-message {
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.2rem;
    min-height: 1.8rem;
    text-align: center;
}

/* Progress indicator */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 1s linear;
}

/* ================= FOOTER ================= */
footer {
    background-color: var(--bg-light);
    padding: 2rem 5%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-left img {
    height: 40px;
    width: auto;
}

.footer-left p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
}

/* ================= RESPONSIVE DESIGN ================= */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .stress-content {
        grid-template-columns: 1fr;
        max-width: 600px;
        gap: 1.5rem;
        margin: 2rem auto;
    }
    
    .stress-content section {
        min-height: 300px;
        padding: 1.5rem;
    }
    
    #breathing-circle {
        width: 160px;
        height: 160px;
    }
    
    #timer-display {
        font-size: 3.5rem;
    }
    
    button {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
    }
}

/* Mobile (600px and below) */
@media (max-width: 600px) {
    .main-header {
        padding: 12px 4%;
    }
    
    .logo {
        height: 45px;
    }
    
    /* Show hamburger, hide nav */
    .hamburger {
        display: block;
    }
    
    .navbar ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 4%;
        left: 4%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        box-shadow: var(--shadow-lg);
        z-index: 99;
        gap: 0.5rem;
    }
    
    .navbar ul.show {
        display: flex;
    }
    
    .navbar a {
        padding: 0.8rem 1rem;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .navbar li:last-child a {
        border-bottom: none;
    }
    
    .stress-content {
        width: 95%;
        margin: 1.5rem auto;
        gap: 1rem;
    }
    
    .stress-content section {
        padding: 1.2rem;
        min-height: 280px;
    }
    
    .stress-content h2 {
        font-size: 1.5rem;
    }
    
    #breathing-circle {
        width: 140px;
        height: 140px;
    }
    
    #breathing-text {
        font-size: 1.3rem;
    }
    
    #timer-display {
        font-size: 3rem;
    }
    
    button {
        width: 100%;
        max-width: 250px;
    }
    
    footer {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 4%;
        gap: 1.5rem;
    }
}

/* Small Mobile (400px and below) */
@media (max-width: 400px) {
    .stress-content {
        padding: 0 0.5rem;
    }
    
    .stress-content section {
        padding: 1rem;
        min-height: 250px;
    }
    
    #breathing-circle {
        width: 120px;
        height: 120px;
    }
    
    #timer-display {
        font-size: 2.5rem;
    }
    
    button {
        font-size: 0.95rem;
        padding: 0.8rem 1.5rem;
    }
}

/* Landscape orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .stress-content {
        grid-template-columns: repeat(2, 1fr);
        margin: 1rem auto;
    }
    
    .stress-content section {
        min-height: 250px;
        padding: 1rem;
    }
    
    #breathing-circle {
        width: 120px;
        height: 120px;
        margin: 1rem auto;
    }
}

/* ================= ANIMATIONS ================= */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

/* Apply fade-in animation to sections */
.stress-content section {
    animation: fadeIn 0.6s ease-out;
}

.stress-content section:nth-child(2) {
    animation-delay: 0.2s;
}