/* ==========================================
   🏠 FRONT-PAGE.CSS - Style strony głównej
   ========================================== */

/* 
 * ⚠️ UWAGA - HIERARCHIA CSS:
 * 
 * 1. style.css (linia 162-175): .hero-section z !important
 *    → Globalny gradient dla wszystkich hero sections
 *    → NIE USUWAJ TEJ REGUŁY!
 * 
 * 2. Ten plik: Szczegółowe style dla front-page.php
 *    → Bez !important (oprócz resetów Astry)
 *    → Dziedziczy gradient z style.css
 * 
 * 3. dark-mode.css: Dark mode
 *    → NIE nadpisuje .hero-section background
 *    → Tylko kolory tekstu i inne elementy
 * 
 * ZASADA: Jeśli coś nie działa, sprawdź style.css PRZED dodaniem !important!
 */

/* ==========================================
   🔧 RESET ASTRY - WYŻSZA SPECYFICZNOŚĆ (BEZ !important)
   ========================================== */

/* 1. Reset body i głównych wrapperów */
body.page-template-front-page,
body.page-template-front-page #page,
body.page-template-front-page .site {
    overflow-x: hidden;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* 2. Reset wszystkich kontenerów Astry - Z !important (konieczne dla Astry) */
body.page-template-front-page.page #primary .entry-content,
body.page-template-front-page #primary .entry-content,
body.page-template-front-page .entry-content,
body.page-template-front-page .ast-container,
body.page-template-front-page #content,
body.page-template-front-page .site-content,
body.page-template-front-page #primary,
body.page-template-front-page .content-area,
body.page-template-front-page .ast-separate-container .ast-container,
body.page-template-front-page .ast-plain-container .ast-container,
body.page-template-front-page .ast-page-builder-template .ast-container,
body.page-template-front-page .ast-box-layout.ast-separate-container .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* 3. Reset box layout Astry */
body.page-template-front-page.ast-box-layout #page {
    max-width: 100%;
    margin: 0;
    box-shadow: none;
}

/* 4. Ukryj sidebar */
body.page-template-front-page #secondary,
body.page-template-front-page .ast-sidebar-wrap,
body.page-template-front-page .widget-area {
    display: none;
}

/* ==========================================
   📦 GŁÓWNY KONTENER - POJEDYNCZA DEFINICJA
   ========================================== */

/* Base styles (width, max-width, margin, padding, box-sizing) dziedziczone z .portal-page-container */
/* Margin-top automatycznie zarządzany przez Page Container System v1.0 (80px desktop → 40px mobile) */
/* Margin-bottom automatycznie zarządzany przez Footer Spacing System v1.0 (60px → responsive) */

/* ==========================================
   🏗️ PODSTAWY
   ========================================== */

/* Box sizing dla głównego kontenera */
.portal-front-page-container *,
.portal-front-page-container *::before,
.portal-front-page-container *::after {
    box-sizing: border-box;
}

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

/* .hero-section bazowa struktura dziedziczona z style.css (linia 206-274) */
/* Duplikaty usunięte - tylko specyficzne style poniżej */

.stats-container {
    display: flex;
    justify-content: center;
    gap: var(--grid-gap-lg); /* 32px - Section Spacing System v1.0 */
    margin-top: var(--component-spacing-sm); /* 12px - Section Spacing System v1.0 */
    animation: fadeInUp 1s ease-out 0.4s both;
}

.stat-item {
    text-align: center;
    background: transparent;
    padding: var(--input-padding-x); /* 15px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    border: none;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-inverse);
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-section {
    background: var(--bg-card);
    padding: 60px 40px;
    margin: 0 auto var(--section-spacing-xs) auto; /* 16px - Section Spacing System v1.0 */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
    max-width: 100%;
    width: 100%;
    border: 1px solid var(--border-color);
}

.search-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: var(--section-spacing-md); /* 32px - Section Spacing System v1.0 */
    color: var(--text-primary);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: var(--section-spacing-xs); /* 16px - Section Spacing System v1.0 */
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input {
    padding: var(--input-padding-x); /* 15px - Shape & Sizing System v4.0 */
    border: 2px solid var(--border-color);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-size: var(--fs-base);
    transition: var(--transition);
    background: var(--bg-input);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 15px 30px; /* Custom CTA button - pomiędzy sm i md */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   📊 PORTAL STATS SECTION
   ========================================== */

.portal-stats-section {
    background: var(--bg-card);
    padding: 80px 20px;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    margin: 0 auto var(--section-spacing-xs) auto; /* 16px - Section Spacing System v1.0 */
    max-width: 100%;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.portal-stats-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: var(--section-spacing-lg); /* 48px - Section Spacing System v1.0 */
    color: var(--text-primary);
}

.portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--grid-gap-lg); /* 32px - Section Spacing System v1.0 */
}

.portal-stat-item {
    background: var(--bg-card);
    padding: 40px 20px;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.portal-stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portal-stat-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.portal-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.portal-stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================
   🎯 CATEGORIES SECTION
   ========================================== */

.categories-section {
    padding: 80px 20px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto 20px auto;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--section-spacing-sm); /* 24px - Section Spacing System v1.0 */
    margin-top: var(--section-spacing-lg); /* 48px - Section Spacing System v1.0 */
}

.category-card {
    background: var(--bg-card);
    padding: var(--card-padding-lg); /* 30px - Shape & Sizing System v4.0 */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.category-count {
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================
   ⚡ FEATURES SECTION
   ========================================== */

.features-section {
    background: var(--section-bg);
    padding: 60px 20px;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    margin: 0 auto var(--section-spacing-xs) auto; /* 16px - Section Spacing System v1.0 */
    max-width: 100%;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--section-spacing-sm); /* 24px - Section Spacing System v1.0 */
    margin-top: var(--section-spacing-md); /* 32px - Section Spacing System v1.0 */
}

.feature-card {
    background: var(--bg-card);
    padding: 30px 25px; /* Custom - asymmetric padding dla feature cards */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* ==========================================
   📱 CTA SECTION
   ========================================== */

.cta-section {
    background-image: none;
    background-color: var(--section-bg);
    color: var(--text-primary);
    padding: 80px 20px;
    text-align: center;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    margin: 0 auto var(--section-spacing-xs) auto; /* 16px - Section Spacing System v1.0 */
    max-width: 100%;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 40px;
    opacity: 0.9;
}

.app-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.app-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    padding: 15px 25px; /* Custom - app store button specific */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.app-btn:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    color: var(--text-primary);
}

/* ==========================================
   🌟 WHY SECTION
   ========================================== */

.why-section {
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    margin: 0 auto var(--section-spacing-xs) auto; /* 16px - Section Spacing System v1.0 */
    max-width: 100%;
    width: 100%;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.why-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.why-text h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.why-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.why-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--component-spacing-sm); /* 12px - Section Spacing System v1.0 */
    margin-bottom: var(--section-spacing-sm); /* 24px - Section Spacing System v1.0 */
}

.why-list i {
    color: var(--success-color);
    font-size: 1.2rem;
    margin-top: 2px;
}

.why-list strong {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.why-list span {
    color: var(--text-secondary);
    line-height: 1.6;
}

.why-image-box {
    display: none;
    width: 200px;
    height: 200px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full); /* 50% circle - Shape & Sizing System v4.0 */
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.why-image-box i {
    font-size: 4rem;
    color: white;
}

/* ==========================================
   🦶 FOOTER - PRZENIESIONY DO global-footer.css
   ========================================== */

/*
 * Footer styles zostały przeniesione do assets/css/global-footer.css
 * Powód: Spójny footer na wszystkich stronach
 * 
 * Style footer znajdują się w: assets/css/global-footer.css
 * Linie 1-150: Uniwersalne style footer dla wszystkich stron
 */

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   📱 RESPONSIVE DESIGN - POPRAWIONY
   ========================================== */

@media (max-width: 1200px) {
    body.page-template-front-page .portal-front-page-container {
        max-width: 95%;
        padding: var(--card-padding-md); /* 20px - Shape & Sizing System v4.0 */
        /* margin dziedziczony z .portal-page-container (Page Container + Footer Spacing System) */
    }
    
    .hero-section {
        padding: 25px 30px;
    }
}

/* Tablet landscape */
@media (max-width: 1024px) {
    body.page-template-front-page .portal-front-page-container {
        max-width: 96%;
        padding: 18px;
        /* margin dziedziczony z .portal-page-container (Page Container + Footer Spacing System) */
    }
    
    .hero-section {
        padding: 22px 25px 15px;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    body.page-template-front-page .portal-front-page-container {
        max-width: 98%;
        padding: var(--input-padding-x); /* 15px - Shape & Sizing System v4.0 */
        /* margin dziedziczony z .portal-page-container (Page Container + Footer Spacing System) */
    }

    /* .hero-section responsive usunięte - dziedziczone z style.css */

    .stats-container {
        flex-direction: column;
        gap: 15px;
        margin-top: 10px;
    }

    .stat-item {
        padding: 12px;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .search-btn {
        justify-content: center;
    }

    .search-section {
        padding: 40px 20px;
    }

    .search-title {
        text-align: center;
        font-size: 1.4rem;
        margin-bottom: 20px;
        color: var(--text-primary);
    }

    .features-section {
        padding: 40px 15px;
    }

    .cta-section {
        padding: 60px 15px;
    }

    .why-section {
        padding: 60px 15px;
    }

    .portal-stats-section,
    .categories-section {
        padding: 60px 15px;
    }

    .why-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    body.page-template-front-page .portal-front-page-container {
        max-width: 100%;
        padding: 10px;
        /* margin dziedziczony z .portal-page-container (Page Container + Footer Spacing System) */
    }

    /* .hero-section responsive usunięte - dziedziczone z style.css */

    .search-section {
        padding: 30px 15px;
    }

    .search-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .search-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .search-btn {
        justify-content: center;
    }

    .features-section {
        padding: 40px 10px;
    }

    .cta-section {
        padding: 50px 10px;
    }

    .why-section {
        padding: 50px 10px;
    }

    .portal-stats-section,
    .categories-section {
        padding: 50px 10px;
    }
}

/* Performance optimizations */
.hero-section,
.categories-section,
.features-section,
.portal-stats-section,
.cta-section,
.why-section {
    will-change: transform;
}

/* ==========================================
   ♿ ACCESSIBILITY
   ========================================== */

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for better accessibility */
.search-btn:focus,
.app-btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* ==========================================
   🙈 UKRYTE SEKCJE - PRZYGOTOWANIE NA STARTUP
   ========================================== */

/* Ukryj "Portal w liczbach" - pojawi się jak będą dane */
.portal-stats-section {
    display: none !important;
}
