/**
 * 503B Template Styles
 * Outsourcing facilities landing page
 */

/* ========================================
   CSS VARIABLES - 503B COLOR SYSTEM
   ======================================== */
:root {
    /* 503B Brand Colors - Similar base but darker hero theme */
    --t503b-primary: #5B5FF5;
    --t503b-primary-dark: #4145C7;
    --t503b-primary-light: #7377F7;
    --t503b-teal: #0EA5E9;
    --t503b-amber: #F59E0B;
    --t503b-hero-dark: #1A1D3A;
    --t503b-hero-darker: #0E1025;
    --t503b-dark: #1A1D2E;
    --t503b-darker: #0F1117;
    --t503b-light-bg: #F8F9FB;
    --t503b-white: #FFFFFF;
    --t503b-gray-50: #F9FAFB;
    --t503b-gray-100: #F3F4F6;
    --t503b-gray-200: #E5E7EB;
    --t503b-gray-300: #D1D5DB;
    --t503b-gray-400: #9CA3AF;
    --t503b-gray-500: #6B7280;
    --t503b-gray-600: #4B5563;
    --t503b-gray-700: #374151;
    --t503b-gray-800: #1F2937;
    --t503b-gray-900: #111827;
    --t503b-success: #10B981;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 4px 20px rgba(91, 95, 245, 0.1);
    --shadow-card-hover: 0 12px 32px rgba(91, 95, 245, 0.18);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --t503b-light-bg: #0F1117;
    --t503b-white: #0F1117;
    --t503b-gray-50: #1F2937;
    --t503b-gray-100: #1A1D2E;
    --t503b-gray-200: #374151;
    --t503b-gray-300: #4B5563;
    --t503b-gray-500: #9CA3AF;
    --t503b-gray-600: #D1D5DB;
    --t503b-gray-700: #E5E7EB;
    --t503b-gray-800: #F3F4F6;
    --t503b-gray-900: #F9FAFB;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* ========================================
   TEMPLATE BASE
   ======================================== */
.template-503b {
    font-family: var(--font-body);
    color: var(--t503b-gray-900);
    background-color: var(--t503b-white);
    line-height: 1.6;
}

.template-503b .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Scroll Reveal Animation */
.template-503b .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.template-503b .scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   BUTTON SYSTEM - 503B
   ======================================== */
.template-503b .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    box-sizing: border-box;
}

.template-503b .btn:hover {
    text-decoration: none;
}

/* Light button for dark hero */
.template-503b .btn-light-503b {
    background: #FFFFFF;
    color: var(--t503b-hero-dark);
    box-shadow: var(--shadow-md);
}

.template-503b .btn-light-503b:hover {
    background: var(--t503b-gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Outline button for dark hero */
.template-503b .btn-outline-503b {
    background: transparent;
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.4);
}

.template-503b .btn-outline-503b:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--t503b-white);
}

/* Primary button */
.template-503b .btn-primary-503b {
    background: var(--t503b-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(91, 95, 245, 0.4);
    border-radius: var(--radius-md);
}

.template-503b .btn-primary-503b:hover {
    background: var(--t503b-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 95, 245, 0.5);
    color: white;
}

/* White button for CTA */
.template-503b .btn-white-503b {
    background: white;
    color: var(--t503b-primary);
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.template-503b .btn-white-503b:hover {
    background: var(--t503b-gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--t503b-primary);
}

.template-503b .btn-full {
    width: 100%;
    justify-content: center;
}

/* ========================================
   HERO SECTION - 503B (DARK THEME)
   ======================================== */
.hero-503b {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(145deg, var(--t503b-hero-dark) 0%, var(--t503b-hero-darker) 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative gradient orbs */
.hero-503b::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(91, 95, 245, 0.2) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-503b::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(91, 95, 245, 0.1) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content-503b {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-headline-503b {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.1;
    color: white;
    margin-bottom: var(--spacing-md);
}

.hero-headline-503b .highlight {
    color: var(--t503b-primary-light);
}

.hero-text-503b {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-lg);
    max-width: 580px;
}

.hero-actions-503b {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* ========================================
   MARKET PENETRATION SECTION
   ======================================== */
.market-section {
    padding: var(--spacing-3xl) 0;
    background-color: var(--t503b-white);
}

.market-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-2xl);
    align-items: start;
}

.section-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--t503b-gray-500);
    margin-bottom: var(--spacing-sm);
}

.section-headline {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
    color: var(--t503b-gray-900);
    margin-bottom: var(--spacing-sm);
}

.section-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--t503b-gray-600);
    margin-bottom: var(--spacing-md);
}

/* Feature List with purple circle bullets */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-xl) 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--t503b-gray-700);
}

.feature-list .list-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(91, 95, 245, 0.15);
    border: 2px solid var(--t503b-primary);
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
}

.feature-list .list-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--t503b-primary);
    border-radius: 50%;
}

/* Logistics Subsection */
.logistics-subsection {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--t503b-gray-200);
}

.subsection-headline {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    line-height: 1.2;
    color: var(--t503b-gray-900);
    margin-bottom: var(--spacing-sm);
}

/* Mini Features Grid */
.mini-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.mini-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.mini-icon {
    width: 40px;
    height: 40px;
    background: rgba(91, 95, 245, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t503b-primary);
    flex-shrink: 0;
}

.mini-content h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--t503b-gray-900);
    margin: 0 0 0.25rem 0;
}

.mini-content p {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--t503b-gray-500);
    margin: 0;
}

/* ========================================
   SUPPORT PILLARS CARD (DARK)
   ======================================== */
.pillars-card {
    background: linear-gradient(165deg, var(--t503b-hero-dark) 0%, var(--t503b-hero-darker) 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    border: 1px solid rgba(91, 95, 245, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.pillars-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    margin-bottom: var(--spacing-md);
}

.pillars-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-lg) 0;
}

.pillars-list li {
    display: flex;
    gap: var(--spacing-sm);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pillars-list li:last-child {
    border-bottom: none;
}

.pillar-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(91, 95, 245, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t503b-primary-light);
    flex-shrink: 0;
}

.pillar-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pillar-content strong {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

.pillar-content span {
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   ECOSYSTEM SECTION
   ======================================== */
.ecosystem-section {
    padding: var(--spacing-3xl) 0;
    background-color: var(--t503b-gray-50);
}

.ecosystem-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto var(--spacing-2xl);
}

.ecosystem-headline {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
    color: var(--t503b-gray-900);
    margin-bottom: var(--spacing-sm);
}

.ecosystem-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--t503b-gray-600);
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.ecosystem-card {
    background: var(--t503b-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--t503b-gray-200);
    transition: all var(--transition-base);
}

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

.ecosystem-icon {
    width: 52px;
    height: 52px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t503b-teal);
    margin-bottom: var(--spacing-md);
}

.ecosystem-icon.purple {
    background: rgba(91, 95, 245, 0.1);
    color: var(--t503b-primary);
}

.ecosystem-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--t503b-gray-900);
    margin-bottom: var(--spacing-xs);
}

.ecosystem-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--t503b-gray-500);
    margin: 0;
}

/* ========================================
   FINAL CTA SECTION - GRADIENT CARD
   ======================================== */
.final-cta-503b {
    padding: var(--spacing-3xl) 0;
    background-color: var(--t503b-white);
}

.cta-card-503b {
    background: linear-gradient(135deg, var(--t503b-primary) 0%, var(--t503b-primary-dark) 100%);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl) var(--spacing-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card-503b::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-card-503b::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-headline-503b {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
    color: white;
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 2;
}

.cta-text-503b {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 550px;
    margin: 0 auto var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.cta-card-503b .btn-white-503b {
    position: relative;
    z-index: 2;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .market-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .pillars-card {
        max-width: 500px;
    }

    .ecosystem-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

@media (max-width: 768px) {

    .hero-503b,
    .market-section,
    .ecosystem-section,
    .final-cta-503b {
        padding: var(--spacing-2xl) 0;
    }

    .hero-headline-503b {
        font-size: 2rem;
    }

    .hero-actions-503b {
        flex-direction: column;
        align-items: stretch;
    }

    .template-503b .btn {
        justify-content: center;
    }

    .mini-features {
        grid-template-columns: 1fr;
    }

    .cta-card-503b {
        padding: var(--spacing-xl) var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .template-503b .container {
        padding: 0 var(--spacing-sm);
    }

    .hero-headline-503b {
        font-size: 1.75rem;
    }

    .section-headline,
    .ecosystem-headline,
    .cta-headline-503b {
        font-size: 1.5rem;
    }

    .pillars-card {
        padding: var(--spacing-lg);
    }

    .ecosystem-card {
        padding: var(--spacing-lg);
    }

    .template-503b .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   DARK MODE OVERRIDES
   ======================================== */
[data-theme="dark"] .market-section {
    background-color: var(--t503b-white);
}

[data-theme="dark"] .feature-list li {
    color: var(--t503b-gray-700);
}

[data-theme="dark"] .logistics-subsection {
    border-top-color: var(--t503b-gray-200);
}

[data-theme="dark"] .mini-icon {
    background: rgba(91, 95, 245, 0.2);
}

[data-theme="dark"] .ecosystem-section {
    background-color: var(--t503b-gray-50);
}

[data-theme="dark"] .ecosystem-card {
    background: linear-gradient(165deg, #1E203B 0%, #141629 100%);
    border-color: rgba(91, 95, 245, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .ecosystem-icon {
    background: rgba(14, 165, 233, 0.2);
}

[data-theme="dark"] .ecosystem-icon.purple {
    background: rgba(91, 95, 245, 0.2);
}

[data-theme="dark"] .final-cta-503b {
    background-color: var(--t503b-white);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .template-503b {
        background: white;
        color: black;
    }

    .hero-503b {
        background: white;
        color: black;
        border: 2px solid black;
    }

    .pillars-card {
        background: white;
        color: black;
        border: 2px solid black;
    }

    .cta-card-503b {
        background: white;
        color: black;
        border: 2px solid black;
    }
}