/* ==========================================================================
   Home Page Specific Styles - REFINED VERSION
   ========================================================================== */

/* Hero Section */
.home-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    color: var(--color-white);
    overflow: hidden;
}

.home-hero .hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

/* UPDATED: Authentic African healthcare context image */
.home-hero .hero-image {
    background-image: linear-gradient(
        135deg, 
        rgba(10, 36, 114, 0.75), 
        rgba(13, 92, 99, 0.75)
    ), url('https://th.bing.com/th/id/R.ef4680dd08415ab68e40f082cc8a9040?rik=e3lx115MbC1kbQ&riu=http%3a%2f%2feliteholdings.co.zw%2fwp-content%2fuploads%2f2019%2f02%2fucm451924.jpg&ehk=%2fhFmsRJIKnVYee2oRfGBZZVUFOyUAFwhibpCxEQ8Im8%3d&risl=&pid=ImgRaw&r=0');
}

.home-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 36, 114, 0.85) 0%, rgba(13, 92, 99, 0.85) 100%);
    z-index: 1;
}

.home-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-subheadline {
    font-size: var(--font-size-xl);
    font-style: italic;
    color: var(--color-accent);
    margin-bottom: var(--space-6);
    font-family: var(--font-accent);
}

.hero-divider {
    width: 100px;
    margin: var(--space-6) 0;
    border: none;
    border-top: 3px solid var(--color-accent);
}

.cta-note {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-4);
}

/* Core Message Section */
.core-message-section {
    background-color: var(--color-bg-primary);
    padding: var(--space-16) 0;
}

.core-message {
    background-color: var(--color-bg-secondary);
    border-left: 4px solid var(--color-accent);
    padding: var(--space-8);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin: 0 0 var(--space-12) 0;
    box-shadow: var(--shadow-md);
}

.core-message h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-6);
    color: var(--color-primary);
}

.core-message p {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-loose);
    margin-bottom: var(--space-4);
}

.core-message p:last-child {
    margin-bottom: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    margin: var(--space-12) 0 0;
}

.stat-card {
    text-align: center;
    padding: var(--space-8) var(--space-6);
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-base);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid var(--color-border);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary);
    line-height: 1;
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    font-weight: var(--font-weight-medium);
}

/* Philosophy Teaser */
.philosophy-teaser {
    background-color: var(--color-bg-secondary);
    padding: var(--space-16) 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-8);
}

.section-header h2 {
    margin-bottom: var(--space-2);
}

.section-subhead {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-top: var(--space-2);
    font-family: var(--font-accent);
    font-style: italic;
}

.philosophy-quote {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
    text-align: center;
    max-width: 800px;
    margin: var(--space-8) auto;
    padding: var(--space-8);
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-secondary);
    box-shadow: var(--shadow-md);
}

.philosophy-quote p {
    margin-bottom: 0;
    line-height: var(--line-height-loose);
}

.section-footer {
    text-align: center;
    margin-top: var(--space-8);
}

/* Teaser Sections (Problem & Co-Creation) */
.problem-teaser,
.cocreation-teaser {
    padding: var(--space-16) 0;
}

.teaser-grid {
    align-items: center;
    gap: var(--space-12);
}

.teaser-content h2 {
    margin-bottom: var(--space-4);
    color: var(--color-primary);
}

.teaser-content p {
    margin-bottom: var(--space-4);
    font-size: var(--font-size-lg);
    line-height: var(--line-height-loose);
}

.teaser-btn {
    margin-top: var(--space-4);
}

/* Split-Screen Visual */
.split-screen-visual {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background-color: var(--color-dark-gray);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 400px;
    box-shadow: var(--shadow-xl);
}

.split-left, .split-right {
    position: relative;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

.split-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.split-left:hover .split-image,
.split-right:hover .split-image {
    transform: scale(1.1);
}

/* UPDATED: Better gradient overlays for text readability */
.crowded-clinic {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url('https://tse3.mm.bing.net/th/id/OIP.81yySJMOGWnQJmsl-tvXNgHaFj?w=1200&h=900&rs=1&pid=ImgDetMain&o=7&rm=3');
}

.isolated-patient {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('https://tse2.mm.bing.net/th/id/OIP.SBWCs7GOqrhiQ__UwtC4UAHaE8?rs=1&pid=ImgDetMain&o=7&rm=3');
    background-position: right center;
}

.split-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    color: white;
    padding: var(--space-6) var(--space-4) var(--space-3);
    font-size: var(--font-size-sm);
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-wide);
}

.split-left:hover .split-caption,
.split-right:hover .split-caption {
    transform: translateY(0);
}

.textual-wall {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    background-color: rgba(10, 36, 114, 0.95);
    color: white;
    padding: var(--space-6) var(--space-4);
    border-radius: var(--radius-base);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    text-align: center;
    backdrop-filter: blur(4px);
    border: 2px solid var(--color-accent);
    box-shadow: var(--shadow-2xl);
    z-index: 10;
    pointer-events: none;
    min-width: 180px;
}

.textual-wall span {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.textual-wall span:last-child {
    border-bottom: none;
}

/* Workshop Visual */
.workshop-visual {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.workshop-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background-image: linear-gradient(rgba(10, 36, 114, 0.3), rgba(13, 92, 99, 0.4)), url('https://media.licdn.com/dms/image/v2/D4D12AQFFmngu8Ffs4A/article-cover_image-shrink_720_1280/article-cover_image-shrink_720_1280/0/1654079801781?e=2147483647&v=beta&t=s_gzGqxMP2i8An_7voP3c-vS1mnmDxFAq9rgXrTRWeI');
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.workshop-visual:hover .workshop-image {
    transform: scale(1.05);
}

.workshop-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--color-primary), transparent);
    color: white;
    padding: var(--space-8) var(--space-6) var(--space-6);
    transform: translateY(60%);
    transition: transform 0.3s ease;
}

.workshop-visual:hover .workshop-overlay-content {
    transform: translateY(0);
}

.workshop-badge {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xs);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.workshop-caption {
    font-size: var(--font-size-base);
    opacity: 0.95;
    margin: 0;
    font-weight: var(--font-weight-medium);
}

/* Final CTA Section */
.final-cta {
    text-align: center;
    padding: var(--space-16) 0;
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-white) 100%);
}

.final-cta-heading {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-primary);
}

.final-cta-subhead {
    font-size: var(--font-size-xl);
    max-width: 700px;
    margin: var(--space-4) auto var(--space-8);
    color: var(--color-text-secondary);
    font-family: var(--font-accent);
    font-style: italic;
}

/* ========== ADDED: Partners Teaser - Professional Grid Layout ========== */
.partners-teaser {
    margin-top: var(--space-12);
    padding: var(--space-6) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(to right, transparent, var(--color-bg-secondary), transparent);
}

.partners-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    text-align: center;
    font-weight: var(--font-weight-medium);
}

/* Professional CSS Grid for partners */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-6);
    align-items: center;
    justify-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.partner-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--space-3);
    background: var(--color-white);
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--color-border);
}

.partner-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.partner-logo-grid {
    max-height: 50px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all var(--transition-base);
}

.partner-grid-item:hover .partner-logo-grid {
    filter: grayscale(0);
    opacity: 1;
}
/* ========== END ADDED SECTION ========== */

/* Partner Logos - ENHANCED (preserved) */
.partner-logo {
    max-height: 60px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all var(--transition-base);
    object-fit: contain;
    display: inline-block;
}

.partner-logo:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.05);
}

/* ADDED: Fallback for missing logos (preserved and enhanced) */
.logo-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xl);
    text-transform: uppercase;
}

.teaser-logo {
    max-height: 50px;
}

/* Footer partner logos specific - ENHANCED (preserved) */
.footer-partners .partner-logos {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    align-items: center;
    justify-content: flex-start;
}

.footer-partners .partner-logo {
    max-height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: all var(--transition-base);
}

.footer-partners .partner-logo:hover {
    opacity: 1;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(255,255,255,0.2));
    transform: scale(1.05);
}

/* Background Utilities */
.bg-secondary {
    background-color: var(--color-bg-secondary);
}

/* ADDED: Image fallback styling */
img.partner-logo {
    min-height: 40px;
    min-width: 40px;
    background-color: var(--color-light-gray);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .core-message p {
        font-size: var(--font-size-base);
    }
    
    .teaser-content p {
        font-size: var(--font-size-base);
    }
    
    .split-screen-visual,
    .split-left,
    .split-right,
    .workshop-visual,
    .workshop-image {
        min-height: 350px;
    }
    
    /* ADDED: Tablet responsive for partners grid */
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-4);
    }
    
    /* ADDED: Better tablet logo spacing */
    .teaser-logos {
        gap: var(--space-6);
    }
}

@media (max-width: 768px) {
    .hero-subheadline {
        font-size: var(--font-size-lg);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .stat-card {
        padding: var(--space-6);
    }
    
    .stat-number {
        font-size: var(--font-size-3xl);
    }
    
    .core-message {
        padding: var(--space-6);
    }
    
    .core-message h2 {
        font-size: var(--font-size-xl);
    }
    
    .philosophy-quote {
        font-size: var(--font-size-base);
        padding: var(--space-6);
        margin: var(--space-6) auto;
    }
    
    .teaser-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .teaser-visual {
        order: 1;
    }
    
    .teaser-content {
        order: 2;
    }
    
    .cocreation-teaser .teaser-visual {
        order: 2;
    }
    
    .cocreation-teaser .teaser-content {
        order: 1;
    }
    
    .split-screen-visual {
        grid-template-columns: 1fr;
        min-height: 500px;
    }
    
    .split-left,
    .split-right {
        min-height: 250px;
    }
    
    .textual-wall {
        top: auto;
        bottom: var(--space-4);
        transform: translateX(-50%);
        width: 80%;
        min-width: unset;
        padding: var(--space-4) var(--space-3);
    }
    
    .split-caption {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
        padding: var(--space-4) var(--space-3) var(--space-2);
    }
    
    .workshop-visual {
        min-height: 300px;
    }
    
    .workshop-image {
        min-height: 300px;
    }
    
    .workshop-overlay-content {
        transform: translateY(0);
        padding: var(--space-6) var(--space-4) var(--space-4);
        background: linear-gradient(to top, var(--color-primary), rgba(10, 36, 114, 0.8));
    }
    
    .final-cta-heading {
        font-size: var(--font-size-2xl);
    }
    
    .final-cta-subhead {
        font-size: var(--font-size-lg);
    }
    
    /* ADDED: Mobile responsive for partners grid */
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
    
    .partner-grid-item {
        padding: var(--space-2);
    }
    
    .partner-logo-grid {
        max-height: 40px;
    }
    
    .teaser-logos {
        gap: var(--space-4);
        justify-content: center;
    }
    
    .partner-logo {
        max-height: 40px;
    }
    
    /* ADDED: Center footer logos on mobile */
    .footer-partners .partner-logos {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content {
        text-align: center;
    }
    
    .hero-divider {
        margin-left: auto;
        margin-right: auto;
    }
    
    .cta-group {
        flex-direction: column;
        gap: var(--space-3);
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .split-screen-visual {
        min-height: 400px;
    }
    
    .split-left,
    .split-right {
        min-height: 200px;
    }
    
    .textual-wall {
        width: 90%;
        font-size: var(--font-size-xs);
        padding: var(--space-3) var(--space-2);
    }
    
    /* ADDED: Small mobile responsive for partners grid */
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
    
    .partner-logo-grid {
        max-height: 35px;
    }
    
    .teaser-logos {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
    
    .teaser-logo {
        max-height: 35px;
        margin: 0 auto;
    }
    
    /* ADDED: Stack footer logos on small mobile */
    .footer-partners .partner-logos {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
    
    .footer-partners .partner-logo {
        max-height: 30px;
        margin: 0 auto;
    }
}

/* Professional Hero Refresh */
.home-hero {
    min-height: 92vh;
}

.home-hero .hero-overlay {
    background:
        radial-gradient(circle at top, rgba(242, 201, 76, 0.18), transparent 36%),
        linear-gradient(135deg, rgba(6, 18, 52, 0.84), rgba(9, 53, 60, 0.78));
}

.home-hero .hero-content {
    background: linear-gradient(180deg, rgba(7, 18, 54, 0.4), rgba(7, 18, 54, 0.18));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 32px;
    padding: clamp(2rem, 4vw, 3.5rem);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.home-hero h1 {
    font-size: clamp(2.8rem, 8vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-5);
}

.home-hero .hero-subheadline {
    color: rgba(255,255,255,0.9);
    font-size: clamp(1.15rem, 2.8vw, 1.6rem);
}

.home-hero .hero-divider {
    width: 120px;
    border-top-width: 4px;
}

.home-hero .cta-group {
    margin-top: var(--space-10);
    justify-content: flex-start;
}

/* Print Styles */
@media print {
    .home-hero {
        min-height: auto;
        color: black;
    }
    
    .home-hero .hero-overlay,
    .home-hero .hero-image {
        display: none;
    }
    
    .home-hero .hero-content {
        color: black;
    }
    
    .hero-subheadline {
        color: var(--color-primary);
    }
    
    .cta-group,
    .partners-teaser,
    .footer-partners {
        display: none;
    }
}

/* ADDED: High-resolution display support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .home-hero .hero-image {
        /* Use higher resolution image for retina displays */
        background-image: linear-gradient(
            135deg, 
            rgba(10, 36, 114, 0.75), 
            rgba(13, 92, 99, 0.75)
        ), url('https://images.pexels.com/photos/5699456/pexels-photo-5699456.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1080&dpr=2');
    }
}
