/* Taking MYFEMBREE page overrides and layout tweaks */

/* ==========================================================================
   HEADER OVERRIDES
   ========================================================================== */

/* Scope using body.taking-myfembree to avoid leaking styles */
body.taking-myfembree .header.has-subnav {
    height: 150px;
}

body.taking-myfembree .header.has-subnav .header-container {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

body.taking-myfembree .header-top {
    height: 96px;
}

body.taking-myfembree .header-nav {
    height: 96px;
    gap: 36px;
}

/* ==========================================================================
   HERO SECTION - IMAGE-BASED DESIGN
   ========================================================================== */

.taking-myfembree-hero {
    margin-top: 145px; /* Account for fixed header height */
    position: relative;
    overflow: unset;
    display: flex;
    align-items: center;
    justify-content: center;
}

.taking-myfembree-hero-image {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
}

.taking-myfembree-hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-width: 100%;
}

/* Picture tag handles image selection based on media queries */

.taking-myfembree-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    height: 38px;
    background: var(--text-white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 2;
}

/* ==========================================================================
   DOSAGE FORM SECTION
   ========================================================================== */

.dosage-form-section {
    padding: 40px 0 80px 0;
    background: var(--text-white);
    text-align: center;
}

.dosage-form-container {
    max-width: 908px;
    margin: 0 auto;
}

html[lang="fr"] .dosage-form-container {
    max-width: 940px;
}

.dosage-form-title {
    font-size: calc(42px * var(--base-font-scale, 1));
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    margin-bottom: 30px;
    position: relative;
    line-height: 50px;
}

.dosage-form-text {
    padding-top: 30px;
    font-size: calc(20px * var(--base-font-scale, 1));
    font-weight: var(--font-weight-normal);
    color: var(--text-dark);
    line-height: 36px;
    width: 67%;
    margin: 0 auto;
}

html[lang="fr"] .dosage-form-text {
    width: 80%;
}

.dosage-form-title::after {
    content: '';
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 68%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, rgba(92, 6, 140, 0) 100%);
}

/* ==========================================================================
   HOW IT WORKS SECTION
   ========================================================================== */

.taking-how-it-works {
    background: linear-gradient(180deg, var(--bg-gradient-purple) 0%, rgba(226, 220, 238, 0) 100%);
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.how-it-works-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 74px;
}

.how-it-works-title {
    font-size: calc(var(--font-size-3xl) * var(--base-font-scale, 1));
    font-weight: var(--font-weight-black);
    color: var(--color-primary);
    margin-bottom: var(--spacing-xl);
    opacity: 0;
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

.steps-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 0px;
    margin: 0 auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    max-width: 350px;
    opacity: 0;
    animation: slideInUp 0.8s ease-out both;
    transition: var(--transition-normal);
    padding: 0;
    border-radius: var(--radius-md);
    flex: 1;
}

.step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 115%;
}

.step-divider {
    width: 300px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, rgba(92, 6, 140, 0) 100%);
    opacity: 0;
    animation: expandWidth 0.6s ease-out 1s both;
    margin: 0;
}

.step:hover {
    transform: translateY(-8px);
}

.step:nth-child(1) {
    animation-delay: 0.4s;
}

.step:nth-child(2) {
    animation-delay: 0.6s;
}

.step:nth-child(3) {
    animation-delay: 0.8s;
}

.step-icon {
    width: 100px;
    height: 100px;
    transition: var(--transition-normal);
    filter: drop-shadow(0 4px 8px rgba(92, 6, 140, 0.2));
}

.step:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
}

.pill-icon {
    width: 100px;
    height: 100px;
    margin: 0px;
}

.card-icon {
    padding-top: 20px;
}

.taking-step-description {
    font-size: calc(16px * var(--base-font-scale, 1));
    line-height: 24px;
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
    text-align: left;
    transition: var(--transition-normal);
    max-width: 600px;
}

.step:hover .taking-step-description {
    color: var(--color-primary-dark);
}

.step-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    width: 100%;
    max-width: 600px;
}

.step-bullets li {
    position: relative;
    padding-left: 20px;
    font-size: calc(16px * var(--base-font-scale, 1));
    line-height: 24px;
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
    width: 96%;
}

.step-bullets li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 18px;
}

.final-disclaimer-text {
    margin-top: 70px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

html[lang="fr"] .final-disclaimer-text {
    max-width: 850px;
}

.final-disclaimer-text p {
    font-size: calc(16px * var(--base-font-scale, 1));
    line-height: 28px;
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
    text-align: center;
    margin: 0;
}

.list-item-description {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

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

/* Large screens (1200px and below) */
@media (max-width: 1200px) {
    .how-it-works-container {
        padding: 0 10px;
    }

    .steps-container {
        gap: 30px;
    }

    .step {
        max-width: 300px;
    }
}

/* Tablet screens (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .taking-myfembree-hero {
        margin-top: 150px; /* Account for fixed header height on tablet */
    }
    
    .taking-myfembree-hero-image {
        width: 100%;
    }
    
    .taking-myfembree-hero-img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

/* Medium screens (900px and below) */
@media (max-width: 900px) {
    body.taking-myfembree .myfembree-usage .usage-points-container {
        grid-template-columns: 1fr;
    }
}

/* Tablet screens (1130px and below) */
@media (max-width: 1130px) {
    /* Header adjustments */
    body.taking-myfembree .header.has-subnav { 
        height: 120px; 
    }
    
    body.taking-myfembree .header-nav { 
        height: 80px; 
        gap: 20px; 
    }
    
    /* Hero section mobile layout */
    .taking-myfembree-hero {
        margin-top: 100px; /* Account for fixed header height on mobile */
    }
    
    .taking-myfembree-hero-image {
        width: 100%;
    }
    
    .taking-myfembree-hero-img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* Picture tag handles image selection automatically */

    .taking-myfembree-hero::after {
        width: 100%;
        max-width: 1000px;
        height: 30px;
        border-radius: 20px 20px 0 0;
    }

    /* Dosage form section */
    .dosage-form-section {
        padding: 30px 0;
    }

    .dosage-form-title {
        font-size: calc(var(--font-size-3xl) * var(--base-font-scale, 1));
    }
    
    .dosage-form-title::after {
        width: 100%;
    }

    /* How it works section */
    .taking-how-it-works {
        padding: 60px 0;
    }

    .how-it-works-title {
        font-size: calc(28px * var(--base-font-scale, 1));
        font-weight: 700;
        color: #5C068C;
        margin-bottom: 40px;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        max-width: 1000px;
    }

    .step {
        max-width: 300px;
        gap: 15px;
    }

    .step-content {
        gap: 15px;
        width: 100%;
    }

    .step-icon {
        width: 60px;
        height: 60px;
    }

    .pill-icon {
        width: 55.5px;
        height: 60px;
        padding: 0px;
    }

    .step-divider {
        width: 120px;
        height: 4px;
        margin: 0;
    }

    .taking-step-description {
        font-size: calc(18px * var(--base-font-scale, 1));
        line-height: 26px;
        color: #5C068C;
        font-weight: 400;
        max-width: 280px;
    }

    .step-bullets {
        max-width: 280px;
        margin: 0 auto;
    }

    .step-bullets li {
        font-size: calc(16px * var(--base-font-scale, 1));
        line-height: 22px;
    }

    .final-disclaimer-text {
        margin-top: 30px;
        padding: 0 20px;
    }

    .final-disclaimer-text p {
        font-size: calc(16px * var(--base-font-scale, 1));
        line-height: 24px;
    }
}

/* Mobile screens (480px and below) */
@media (max-width: 480px) {
    /* Header adjustments */
    body.taking-myfembree .header.has-subnav { 
        height: 100px; 
    }
    
    body.taking-myfembree .header-nav { 
        height: 72px; 
        gap: 14px; 
    }    
    
    body.taking-myfembree .header-top {
        height: 0;
    }

    .taking-myfembree-hero {
        margin-top: 100px; /* Account for fixed header height on small mobile */
    }
    
    .taking-myfembree-hero-image {
        width: 100%;
    }
    
    .taking-myfembree-hero-img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* Picture tag handles image selection automatically */

    .taking-myfembree-hero::after {
        width: 100%;
        max-width: 1000px;
        height: 30px;
        border-radius: 20px 20px 0 0;
    }

    /* Dosage form section */
    .dosage-form-section {
        padding: 0 10px 20px 10px;
    }

    .dosage-form-title {
        font-size: calc(26px * var(--base-font-scale, 1));
        line-height: 39px;
        width: 90%;
        margin: 0 auto 30px auto;
    }

    html[lang="fr"] .dosage-form-title {
        width: 85%;
    }
    
    .dosage-form-title::after {
        width: 100%;
        bottom: -20px;
    }

    .dosage-form-text {
        width: 100%;
        font-size: calc(18px * var(--base-font-scale, 1));
        padding: 10px 0;
        line-height: 27px;
    }

    html[lang="fr"] .dosage-form-text {
        width: 96%;
    }

    /* How it works section */
    .how-it-works-container {
        padding: 0 15px;
    }

    html[lang="fr"] .how-it-works-container {
        padding: 0 17px;
    }

    .taking-how-it-works {
        padding: 50px 0 30px 0;
    }

    .how-it-works-title {
        font-size: calc(23px * var(--base-font-scale, 1));
        font-weight: 900;
        color: #5C068C;
        margin-bottom: 35px;
    }

    html[lang="fr"] .how-it-works-title {
        margin-bottom: 15px;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
        gap: 35px;
        max-width: 100%;
        width: 100%;
    }

    .step {
        max-width: 100%;
        width: 100%;
        gap: 12px;
    }

    .step-content {
        gap: 21px;
        width: 100%;
    }

    .step-icon {
        width: 80px;
        height: 80px;
        padding: 0px;
    }

    .pill-icon {
        width: 80px;
        height: 80px;
        padding: 0px;
    }

    .step-divider {
        width: 120%;
        height: 4px;
        margin: 0;
    }

    .taking-step-description {
        font-size: calc(16px * var(--base-font-scale, 1));
        line-height: 24px;
        color: #5C068C;
        font-weight: 400;
        max-width: 100%;
    }

    .step-bullets {
        max-width: 100%;
        margin: 0 auto;
    }

    .step-bullets li {
        font-size: calc(16px * var(--base-font-scale, 1));
        line-height: 24px;
        width: 100%;
    }

    .final-disclaimer-text {
        margin-top: 65px;
        padding: 0;
    }

    .final-disclaimer-text p {
        font-size: calc(16px * var(--base-font-scale, 1));
        line-height: 22px;
    }

    body.taking-myfembree .taking-how-it-works .how-it-works-container .cta-button {
        display: block;
        margin: 30px auto 0;
        width: 80%;
    }
}