/* 4-7-8 Breathing Technique Page Styles */

/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header title row */
.header-title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

/* Home link styling */
.home-link {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.home-link:hover {
    opacity: 0.7;
}

/* Technique title */
.technique-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    opacity: 0.95;
}

/* Exercise Section */
.exercise-section {
    margin: 2rem 0 4rem 0;
}

.exercise-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.support-line {
    margin-top: 2rem;
    padding-top: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    width: 100%;
}

.support-line.is-visible {
    display: flex;
}

.support-line p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.support-line-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Animation Container */
.animation-container {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#breathing-animation {
    width: 100%;
    height: 100%;
    display: block;
}

/* Breathing Info Display */
.breathing-info {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.phase-display {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    min-height: 5rem;
    line-height: 1.2;
    white-space: pre-line;
    transition: opacity 0.7s ease;
}

.phase-display.is-fading {
    opacity: 0;
}

.timer-display {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    min-height: 3.5rem;
    font-variant-numeric: tabular-nums;
}

.timer-display.is-hidden {
    opacity: 0;
}

.timer-display.is-fading {
    opacity: 0 !important;
}


/* Breathe Button */
.breathe-button {
    padding: 1rem 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Work Sans', sans-serif;
    color: #ffffff;
    background-color: #38a169;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
    min-width: 200px;
}

.breathe-button:hover:not(:disabled) {
    background-color: #2f855a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.4);
}

.breathe-button:active:not(:disabled) {
    transform: translateY(0);
}

.breathe-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.breathe-button.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Description Section */
.description-section {
    margin: 4rem 0;
}

.description-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.description-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.method-overview {
    margin-bottom: 2rem;
}

.method-overview p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.method-steps,
.benefits-list,
.tips-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem 0;
}

.method-steps li,
.benefits-list li,
.tips-list li {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.method-steps li::before,
.benefits-list li::before,
.tips-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    line-height: 1.3;
    color: #38a169;
}

/* App Promotion */
.app-promotion {
    margin-top: 3rem;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    text-align: center;
}

.app-promotion p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Gradient Animation States - Smooth, subtle transitions */
body.breathing-inhale {
    animation: gradientInhale 4s ease-in-out forwards;
}

body.breathing-hold {
    animation: gradientHold 7s ease-in-out forwards;
}

body.breathing-exhale {
    animation: gradientExhale 8s ease-in-out forwards;
}

@keyframes gradientInhale {
    0% {
        background: linear-gradient(-45deg, #38a169, #2c7a7b, #2c5282, #1a365d);
        background-size: 400% 400%;
        background-position: 0% 50%;
    }
    100% {
        background: linear-gradient(-45deg, #3fb171, #2f8183, #2f5689, #1e3a63);
        background-size: 400% 400%;
        background-position: 25% 50%;
    }
}

@keyframes gradientHold {
    0% {
        background: linear-gradient(-45deg, #3fb171, #2f8183, #2f5689, #1e3a63);
        background-size: 400% 400%;
        background-position: 25% 50%;
    }
    100% {
        background: linear-gradient(-45deg, #42b876, #328689, #325d8f, #213f69);
        background-size: 400% 400%;
        background-position: 50% 50%;
    }
}

@keyframes gradientExhale {
    0% {
        background: linear-gradient(-45deg, #42b876, #328689, #325d8f, #213f69);
        background-size: 400% 400%;
        background-position: 50% 50%;
    }
    100% {
        background: linear-gradient(-45deg, #38a169, #2c7a7b, #2c5282, #1a365d);
        background-size: 400% 400%;
        background-position: 0% 50%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-title-row {
        gap: 0.75rem;
    }

    .technique-title {
        font-size: 1.75rem;
    }

    .exercise-container {
        padding: 1.5rem;
    }

    .animation-container {
        max-width: 300px;
    }

    .phase-display {
        font-size: 1.5rem;
        min-height: 4rem;
    }

    .timer-display {
        font-size: 2.5rem;
    }

    .breathe-button {
        padding: 0.875rem 2.5rem;
        font-size: 1.1rem;
    }

    .description-section h2 {
        font-size: 1.5rem;
    }

    .description-section h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .header-title-row {
        gap: 0.5rem;
    }

    .technique-title {
        font-size: 1.4rem;
    }

    .exercise-container {
        padding: 1rem;
    }

    .animation-container {
        max-width: 250px;
    }

    .phase-display {
        font-size: 1.25rem;
        min-height: 3.5rem;
    }

    .timer-display {
        font-size: 2rem;
    }

    .cycle-counter {
        font-size: 1rem;
    }

    .breathe-button {
        padding: 0.75rem 2rem;
        font-size: 1rem;
        min-width: 160px;
    }

    .method-overview p,
    .app-promotion p {
        font-size: 1rem;
    }

    .method-steps li,
    .benefits-list li,
    .tips-list li {
        font-size: 0.95rem;
    }
}
