/**
 * Life Medical Lab - Homepage Styles
 * 
 * Isolated CSS for front-page.php
 * Does NOT conflict with Soledad theme
 * 
 * - Mobile-first approach
 * - WCAG 2.1 AA compliant
 * - Poppins font family
 * - Zero JavaScript animations
 * - Optimized for Core Web Vitals
 * 
 * @package Life Medical Lab
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

.lml-homepage {
    /* Colors - Medical Authority Palette */
    --lml-primary: #0369A1;
    --lml-primary-dark: #075985;
    --lml-primary-light: #E0F2FE;
    --lml-accent: #0D9488;
    --lml-accent-dark: #0F766E;
    --lml-accent-light: #CCFBF1;
    
    /* Neutrals */
    --lml-text: #0F172A;
    --lml-text-secondary: #475569;
    --lml-text-muted: #64748B;
    --lml-border: #E2E8F0;
    --lml-surface: #FFFFFF;
    --lml-surface-alt: #F8FAFC;
    --lml-surface-dark: #0F172A;
    
    /* Typography */
    --lml-font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --lml-space-xs: 0.5rem;
    --lml-space-sm: 1rem;
    --lml-space-md: 1.5rem;
    --lml-space-lg: 2rem;
    --lml-space-xl: 3rem;
    --lml-space-2xl: 4rem;
    --lml-space-3xl: 6rem;
    
    /* Border Radius */
    --lml-radius-sm: 0.375rem;
    --lml-radius-md: 0.5rem;
    --lml-radius-lg: 0.75rem;
    --lml-radius-xl: 1rem;
    
    /* Transitions */
    --lml-transition: 0.2s ease;
    
    /* Container */
    --lml-container: 1200px;
}


/* ==========================================================================
   BASE STYLES
   ========================================================================== */

.lml-homepage {
    font-family: var(--lml-font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--lml-text);
    background-color: var(--lml-surface-alt);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.lml-homepage *,
.lml-homepage *::before,
.lml-homepage *::after {
    box-sizing: border-box;
}

/* Container */
.lml-container {
    width: 100%;
    max-width: var(--lml-container);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .lml-container {
        padding: 0 1.5rem;
    }
}


/* ==========================================================================
   BUTTONS & LINKS
   ========================================================================== */

.lml-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-family: var(--lml-font);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--lml-radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--lml-transition);
}

.lml-btn:focus-visible {
    outline: 3px solid var(--lml-primary);
    outline-offset: 2px;
}

.lml-btn--primary {
    background-color: var(--lml-primary);
    color: #FFFFFF;
    border-color: var(--lml-primary);
}

.lml-btn--primary:hover {
    background-color: var(--lml-primary-dark);
    border-color: var(--lml-primary-dark);
}

.lml-btn--secondary {
    background-color: var(--lml-surface);
    color: var(--lml-text);
    border-color: var(--lml-border);
}

.lml-btn--secondary:hover {
    border-color: var(--lml-primary);
    color: var(--lml-primary);
}

.lml-btn--outline {
    background-color: transparent;
    color: var(--lml-text-secondary);
    border-color: var(--lml-border);
    background-color: var(--lml-surface-alt);
}

.lml-btn--outline:hover {
    background-color: var(--lml-surface);
    border-color: var(--lml-primary);
    color: var(--lml-primary);
}

.lml-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    color: var(--lml-primary);
    text-decoration: none;
    transition: color var(--lml-transition);
}

.lml-link:hover {
    color: var(--lml-primary-dark);
}

.lml-link--light {
    color: var(--lml-accent);
}

.lml-link--light:hover {
    color: var(--lml-accent-light);
}


/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */

.lml-section-header {
    text-align: center;
    margin-bottom: var(--lml-space-xl);
}

.lml-section-header__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lml-text);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.lml-section-header__subtitle {
    font-size: 1.0625rem;
    color: var(--lml-text-secondary);
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.lml-section-header--inline {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lml-section-header--inline .lml-section-header__link {
    align-self: flex-start;
}

.lml-section-header--light .lml-section-header__title {
    color: #FFFFFF;
}

.lml-section-header--light .lml-section-header__subtitle {
    color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 768px) {
    .lml-section-header__title {
        font-size: 2.25rem;
    }
    
    .lml-section-header--inline {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
    
    .lml-section-header--inline .lml-section-header__link {
        align-self: auto;
        flex-shrink: 0;
    }
}


/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.lml-hero {
    padding: var(--lml-space-2xl) 0 var(--lml-space-3xl);
    background: linear-gradient(180deg, var(--lml-surface-alt) 0%, var(--lml-surface) 100%);
    text-align: center;
}

.lml-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--lml-primary-light);
    border: 1px solid rgba(3, 105, 161, 0.15);
    border-radius: 50px;
    margin-bottom: var(--lml-space-md);
}

.lml-hero__badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--lml-accent);
    border-radius: 50%;
}

.lml-hero__badge-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--lml-primary);
}

.lml-hero__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--lml-text);
    line-height: 1.2;
    margin: 0 0 var(--lml-space-md) 0;
}

.lml-hero__intro {
    font-size: 1.0625rem;
    color: var(--lml-text-secondary);
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto var(--lml-space-xl);
}

.lml-hero__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

@media (min-width: 640px) {
    .lml-hero__actions {
        flex-direction: row;
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .lml-hero {
        padding: var(--lml-space-3xl) 0;
    }
    
    .lml-hero__title {
        font-size: 2.75rem;
    }
}

@media (min-width: 1024px) {
    .lml-hero__title {
        font-size: 3.25rem;
    }
    
    .lml-hero__intro {
        font-size: 1.125rem;
    }
}


/* ==========================================================================
   TRUST STRIP
   ========================================================================== */

.lml-trust-strip {
    background-color: var(--lml-surface-dark);
    padding: var(--lml-space-sm) 0;
}

.lml-trust-strip__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.lml-trust-strip__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
    font-weight: 500;
}

.lml-trust-strip__item i {
    color: var(--lml-accent);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .lml-trust-strip__list {
        gap: 2rem;
    }
    
    .lml-trust-strip__item {
        font-size: 0.875rem;
    }
}


/* ==========================================================================
   DIAGNOSTIC PILLARS
   ========================================================================== */

.lml-pillars {
    padding: var(--lml-space-2xl) 0;
    background-color: var(--lml-surface);
}

.lml-pillars__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.lml-pillar-card {
    display: block;
    padding: 1.5rem;
    background-color: var(--lml-surface);
    border: 1px solid var(--lml-border);
    border-radius: var(--lml-radius-lg);
    text-decoration: none;
    transition: all var(--lml-transition);
}

.lml-pillar-card:hover {
    border-color: var(--lml-primary);
    box-shadow: 0 8px 30px -12px rgba(3, 105, 161, 0.15);
    transform: translateY(-2px);
}

.lml-pillar-card:focus-visible {
    outline: 3px solid var(--lml-primary);
    outline-offset: 2px;
}

.lml-pillar-card__icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--lml-surface-alt);
    color: var(--lml-primary);
    border-radius: var(--lml-radius-md);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    transition: all var(--lml-transition);
}

.lml-pillar-card:hover .lml-pillar-card__icon {
    background-color: var(--lml-primary);
    color: #FFFFFF;
}

.lml-pillar-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--lml-text);
    margin: 0 0 0.5rem 0;
    transition: color var(--lml-transition);
}

.lml-pillar-card:hover .lml-pillar-card__title {
    color: var(--lml-primary);
}

.lml-pillar-card__desc {
    font-size: 0.9375rem;
    color: var(--lml-text-secondary);
    margin: 0;
    line-height: 1.6;
}

.lml-pillar-card__link {
    display: none;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lml-primary);
}

.lml-pillar-card:hover .lml-pillar-card__link {
    display: inline-flex;
}

@media (min-width: 640px) {
    .lml-pillars__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lml-pillars {
        padding: var(--lml-space-3xl) 0;
    }
    
    .lml-pillars__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .lml-pillar-card {
        padding: 2rem;
    }
    
    .lml-pillar-card__icon {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.375rem;
    }
}


/* ==========================================================================
   FEATURED GUIDES
   ========================================================================== */

.lml-featured {
    padding: var(--lml-space-2xl) 0;
    background-color: var(--lml-surface-alt);
}

.lml-featured__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.lml-guide-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background-color: var(--lml-surface);
    border: 1px solid var(--lml-border);
    border-radius: var(--lml-radius-lg);
    text-decoration: none;
    transition: all var(--lml-transition);
}

.lml-guide-card:hover {
    background-color: var(--lml-primary-light);
    border-color: rgba(3, 105, 161, 0.2);
}

.lml-guide-card:focus-visible {
    outline: 3px solid var(--lml-primary);
    outline-offset: 2px;
}

.lml-guide-card__icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--lml-primary-light);
    color: var(--lml-primary);
    border-radius: var(--lml-radius-md);
    font-size: 1.125rem;
}

.lml-guide-card__content {
    flex: 1;
    min-width: 0;
}

.lml-guide-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.lml-guide-card__category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lml-primary);
    background-color: var(--lml-primary-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--lml-radius-sm);
}

.lml-guide-card__time {
    font-size: 0.75rem;
    color: var(--lml-text-muted);
}

.lml-guide-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--lml-text);
    margin: 0 0 0.375rem 0;
    line-height: 1.4;
}

.lml-guide-card__desc {
    font-size: 0.875rem;
    color: var(--lml-text-secondary);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .lml-featured__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lml-featured {
        padding: var(--lml-space-3xl) 0;
    }
    
    .lml-guide-card {
        padding: 1.5rem;
    }
    
    .lml-guide-card__title {
        font-size: 1.0625rem;
    }
}


/* ==========================================================================
   WHY TRUST SECTION
   ========================================================================== */

.lml-why-trust {
    padding: var(--lml-space-2xl) 0;
    background-color: var(--lml-surface);
}

.lml-why-trust__grid {
    max-width: 720px;
}

.lml-why-trust__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lml-text);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.lml-why-trust__intro {
    font-size: 1.0625rem;
    color: var(--lml-text-secondary);
    margin: 0 0 var(--lml-space-xl) 0;
    line-height: 1.7;
}

.lml-why-trust__list {
    list-style: none;
    margin: 0 0 var(--lml-space-xl) 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lml-why-trust__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.lml-why-trust__item-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--lml-accent-light);
    color: var(--lml-accent-dark);
    border-radius: var(--lml-radius-md);
    font-size: 1rem;
}

.lml-why-trust__item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--lml-text);
    margin: 0 0 0.25rem 0;
}

.lml-why-trust__item-desc {
    font-size: 0.875rem;
    color: var(--lml-text-secondary);
    margin: 0;
    line-height: 1.5;
}

.lml-why-trust__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .lml-why-trust__title {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .lml-why-trust {
        padding: var(--lml-space-3xl) 0;
    }
}


/* ==========================================================================
   CALCULATORS SECTION
   ========================================================================== */

.lml-calculators {
    padding: var(--lml-space-2xl) 0;
    background-color: var(--lml-surface-dark);
}

.lml-calculators__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.lml-calc-card {
    display: block;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--lml-radius-lg);
    text-decoration: none;
    transition: all var(--lml-transition);
}

.lml-calc-card:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--lml-accent);
    transform: translateY(-2px);
}

.lml-calc-card:focus-visible {
    outline: 3px solid var(--lml-accent);
    outline-offset: 2px;
}

.lml-calc-card__icon {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--lml-accent);
}

.lml-calc-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 0.25rem 0;
    transition: color var(--lml-transition);
}

.lml-calc-card:hover .lml-calc-card__name {
    color: var(--lml-accent);
}

.lml-calc-card__desc {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.lml-calculators__footer {
    text-align: center;
    margin-top: var(--lml-space-xl);
}

@media (min-width: 640px) {
    .lml-calculators__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .lml-calculators {
        padding: var(--lml-space-3xl) 0;
    }
    
    .lml-calc-card {
        padding: 1.75rem;
    }
    
    .lml-calc-card__icon {
        font-size: 2rem;
    }
    
    .lml-calc-card__name {
        font-size: 1.0625rem;
    }
}


/* ==========================================================================
   EDITORIAL STANDARDS
   ========================================================================== */

.lml-editorial {
    padding: var(--lml-space-lg) 0;
    background-color: var(--lml-surface);
    border-top: 1px solid var(--lml-border);
}

.lml-editorial__inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lml-editorial__content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lml-editorial__icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--lml-primary-light);
    color: var(--lml-primary);
    border-radius: var(--lml-radius-lg);
    font-size: 1.25rem;
}

.lml-editorial__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--lml-text);
    margin: 0;
}

.lml-editorial__desc {
    font-size: 0.875rem;
    color: var(--lml-text-secondary);
    margin: 0;
}

.lml-editorial__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.lml-editorial__link {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--lml-text-secondary);
    background-color: var(--lml-surface-alt);
    border-radius: var(--lml-radius-md);
    text-decoration: none;
    transition: all var(--lml-transition);
}

.lml-editorial__link:hover {
    background-color: var(--lml-primary-light);
    color: var(--lml-primary);
}

.lml-editorial__link:focus-visible {
    outline: 3px solid var(--lml-primary);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .lml-editorial__inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}


/* ==========================================================================
   ACCESSIBILITY - REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .lml-homepage *,
    .lml-homepage *::before,
    .lml-homepage *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}


/* ==========================================================================
   FOCUS VISIBLE POLYFILL FALLBACK
   ========================================================================== */

.lml-homepage *:focus:not(:focus-visible) {
    outline: none;
}

.lml-homepage *:focus-visible {
    outline: 3px solid var(--lml-primary);
    outline-offset: 2px;
}


/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .lml-hero__actions,
    .lml-trust-strip,
    .lml-editorial__links {
        display: none;
    }
    
    .lml-homepage {
        background: white;
        color: black;
    }
}
