/**
 * Home Page Styles
 * Extends assessment.css with homepage-specific overrides only.
 * Most components reuse standard classes from assessment.css:
 * .benefit-card, .benefits-grid, .step-card, .about-solution-box, .assessment-cta
 *
 * @package Estanar
 * @version 1.1.0
 */

/* ==========================================================================
   Logos Carousel Section
   ========================================================================== */

.home-logos-section {
    background-color: var(--clr-dark, #100047);
    padding: 1.5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-logos-label {
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   Section Backgrounds
   ========================================================================== */

.home-services {
    background-color: var(--clr-purple, #4E36C9);
}

/* What We Offer uses step-cards on purple bg - override white card text for dark bg */
.home-services .step-cards {
    max-width: 1000px;
}

/* Audience section - uses benefits-grid on dark bg, already styled in assessment.css */
/* Step card links (.step-card-link) already styled in assessment.css with RTL support */

/* ==========================================================================
   Section 2: Why Estanar - Light Bento Grid Layout
   ========================================================================== */

.home-why-section {
    background-color: var(--clr-purple, #4E36C9);
    padding: 4rem 0 5rem;
}

.home-why-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.home-why-section .section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.home-why-section .section-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Grid: mobile stacked, desktop 3-column with center image */
.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

/* Card columns */
.why-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Individual cards - white on light bg */
.why-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(16, 0, 71, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(16, 0, 71, 0.12);
}

/* Numbered badge */
.why-card-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--clr-purple, #4E36C9);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.why-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--clr-dark, #100047);
    margin: 0;
    line-height: 1.6;
}

/* Center image container */
.why-center-image {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: linear-gradient(180deg, #3a28a3 0%, #2d1e8a 100%);
    border-radius: 16px;
    overflow: hidden;
    min-height: 280px;
    padding-top: 2rem;
}

.why-center-image img {
    max-width: 90%;
    max-height: 340px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Bottom tagline card */
.why-tagline {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 8px rgba(16, 0, 71, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-tagline:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(16, 0, 71, 0.12);
}

.why-tagline-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--clr-gold, #EFA621);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 10px;
}

.why-tagline-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--clr-dark, #100047);
    margin: 0;
    line-height: 1.5;
}

/* RTL support */
[dir="rtl"] .why-tagline {
    flex-direction: row-reverse;
}

/* ==========================================================================
   Section 6: Mission, Vision, Promise
   ========================================================================== */

.home-mvp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 3rem;
}

.home-mvp-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.home-mvp-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--clr-gold, #EDDC82);
    margin-bottom: 0.75rem;
}

.home-mvp-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clr-white, #ffffff);
    margin: 0;
    line-height: 1.4;
}

.home-values-header {
    margin-top: 1rem;
}

/* CTA overlap: add extra bottom padding before CTA section */
.home-brand {
    padding-bottom: 8rem;
}

/* ==========================================================================
   Section 3: How It Works - 4 Pillars (3 top + 1 centered bottom)
   ========================================================================== */

/* Override step-cards grid for home-pillars (4 cards: 3 top + 1 centered) */
.home-pillars .step-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* Reset all column assignments from assessment.css for home-pillars */
.home-pillars .step-card-1,
.home-pillars .step-card-2,
.home-pillars .step-card-3,
.home-pillars .step-card-4 {
    grid-column: auto;
}

/* Center the 4th card */
.home-pillars .step-card-4 {
    justify-self: center;
    width: 100%;
    max-width: 400px;
}

/* ==========================================================================
   Section 6: Values - Darker Background
   ========================================================================== */

.home-values-section {
    background-color: var(--clr-dark, #100047);
    padding: 3.5rem 0 4rem;
}

.home-values-section .section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.home-values-section .section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--clr-white, #ffffff);
    margin-bottom: 0;
}

/* ==========================================================================
   Responsive: Small screens (min-width: 576px)
   ========================================================================== */

@media (min-width: 576px) {
    .home-mvp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-mvp-card-wide {
        grid-column: 1 / -1;
    }

    /* Why grid: 2 columns at small breakpoint */
    .why-grid {
        grid-template-columns: 1fr 1fr;
    }

    .why-center-image {
        grid-column: 1 / -1;
        min-height: 300px;
    }

    /* Pillars: 2 columns, 4th card centered */
    .home-pillars .step-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-pillars .step-card-4 {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 360px;
    }
}

/* ==========================================================================
   Responsive: Medium screens (min-width: 768px)
   ========================================================================== */

@media (min-width: 768px) {
    /* Step cards in services section: 3 columns */
    .home-services .step-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .home-services .step-card-1,
    .home-services .step-card-2,
    .home-services .step-card-3 {
        grid-column: auto;
    }

    /* Pillars: 2 columns at tablet, 4th centered */
    .home-pillars .step-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-pillars .step-card-4 {
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 400px;
    }

    .home-mvp-grid {
        gap: 1.5rem;
    }

    .home-mvp-card h3 {
        font-size: 1.375rem;
    }
}

/* Desktop overrides at 992px+ */
@media (min-width: 992px) {
    /* Pillars: 3 columns top row, 4th card centered below */
    .home-pillars .step-cards {
        grid-template-columns: repeat(6, 1fr);
    }

    .home-pillars .step-card-1 { grid-column: 1 / 3; }
    .home-pillars .step-card-2 { grid-column: 3 / 5; }
    .home-pillars .step-card-3 { grid-column: 5 / 7; }
    .home-pillars .step-card-4 {
        grid-column: 2 / 6;
        max-width: none;
        justify-self: center;
        width: 100%;
        max-width: 420px;
    }
}

/* Why Estanar: 3-column bento grid at desktop */
@media (min-width: 992px) {
    .why-grid {
        display: grid;
        grid-template-columns: 1fr 1.2fr 1fr;
        grid-template-rows: auto auto;
        gap: 1.25rem;
    }

    /* Right column: spans both rows */
    .why-col-right {
        grid-column: 3;
        grid-row: 1 / 3;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    /* Center image: spans both rows */
    .why-center-image {
        grid-column: 2;
        grid-row: 1 / 3;
        min-height: 100%;
    }

    .why-center-image img {
        max-width: 90%;
        max-height: 380px;
    }

    /* Left column: spans both rows */
    .why-col-left {
        grid-column: 1;
        grid-row: 1 / 3;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .why-card {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem 1.5rem;
    }

    .why-card-title {
        font-size: 1.0625rem;
    }

    .why-tagline {
        max-width: 700px;
        margin: 0 auto;
        padding: 1.75rem 2.5rem;
    }

    .why-tagline-text {
        font-size: 1.25rem;
    }
}
