/* ==========================================
   🏢 COMPANY-PAGE.CSS - Strona dla firm (dla-firm.php)
   ========================================== */

/* Variables są ładowane przez functions.php jako zależność */

/* ==========================================
   🔧 RESET ASTRY I LAYOUT
   ========================================== */

/* Reset globalnych stylów Astry dla strony dla-firm */
body.page-template-dla-firm {
    overflow-x: hidden;
}

/* Reset kontenerów Astry - CRITICAL */
body.page-template-dla-firm #page,
body.page-template-dla-firm .site {
    overflow-x: hidden;
    max-width: 100%;
    margin: 0;
}

body.page-template-dla-firm .ast-container,
body.page-template-dla-firm #content,
body.page-template-dla-firm .site-content,
body.page-template-dla-firm #primary,
body.page-template-dla-firm .content-area,
body.page-template-dla-firm .ast-separate-container .ast-container,
body.page-template-dla-firm .ast-plain-container .ast-container,
body.page-template-dla-firm .ast-page-builder-template .ast-container,
body.page-template-dla-firm .ast-box-layout.ast-separate-container .ast-container {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Usuń padding z entry-content */
body.page-template-dla-firm .entry-content {
    margin: 0;
    padding: 0;
    max-width: 100%;
}

/* Wyłącz box layout Astry */
body.page-template-dla-firm.ast-box-layout #page {
    max-width: 100%;
    margin: 0;
    box-shadow: none;
}

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

/* ==========================================
   🏗️ 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;
}

/* ==========================================
   📦 GŁÓWNY KONTENER
   ========================================== */

/* USUNIĘTE - duplikat!
   Kontener zarządzany GLOBALNIE przez:
   - style.css (bazowy: .portal-page-container)
   - global-responsive.css (responsive: max-width, padding, margin-top)
   
   Nie potrzebujemy specyficznych reguł dla page-template-dla-firm
   bo używa standardowej klasy .portal-page-container! */

/* ==========================================
   🎯 NAGŁÓWEK STRONY
   ========================================== */

.portal-offers-header {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 20px auto;
    padding: 50px 60px 20px 60px;
    /* background i color dziedziczone z style.css (linia 166-168) */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 (deprecated fix) */
    box-sizing: border-box;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

/* Pseudo-element ::before usunięty dla spójności z .hero-section */

/* .header-logo przeniesiony do assets/css/components.css (linia 726+) */

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

/* .hero-section i .hero-content dziedziczone z style.css (linia 206-274) */
/* Duplikaty usunięte - struktura ujednolicona */

.stats-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

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

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

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

/* ==========================================
   🔍 SEARCH SECTION
   ========================================== */

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

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

/* Benefits list - white boxes */
.benefits-list {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.benefit-box {
    background: var(--bg-secondary);
    padding: var(--card-padding-compact); /* 25px */
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 */
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.benefit-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

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

.benefit-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    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 */
    border: 2px solid var(--border-color);
    border-radius: var(--radius-button); /* 8px - Shape & Sizing System v4.0 (deprecated fix) */
    font-size: 16px;
    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;
    border-radius: var(--radius-button); /* 8px - Shape & Sizing System v4.0 (deprecated fix) */
    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);
}

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

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

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

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: var(--bg-card);
    padding: 30px 25px;
    border-radius: var(--radius-button); /* 8px - Shape & Sizing System v4.0 (deprecated fix) */
    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(--bg-card);
    color: var(--text-primary);
    padding: 80px 20px;
    text-align: center;
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 (deprecated fix) */
    margin: 0 auto 20px auto;
    max-width: 100%;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.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(--primary-gradient);
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    border-radius: var(--radius-button); /* 8px - Shape & Sizing System v4.0 (deprecated fix) */
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    border: none;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.app-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.cta-main-btn {
    font-size: 18px;
    padding: 18px 40px;
}

.cta-main-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

/* ==========================================
   🎬 ANIMATIONS
   ========================================== */

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

/* ==========================================
   📱 RESPONSIVE DESIGN
   ========================================== */

/* Desktop (1200px and below) */
@media (max-width: 1200px) {
    /* max-width, padding i margin-top zarządzane GLOBALNIE przez global-responsive.css */
    
    .portal-offers-header {
        padding: 40px 30px 20px 30px;
    }
}

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    /* max-width, padding i margin-top zarządzane GLOBALNIE przez global-responsive.css */
    
    /* .hero-section responsive usunięte - dziedziczone z style.css */
    
    .search-section {
        padding: 50px 25px;
    }
    
    .search-title {
        font-size: 1.6rem;
    }
    
    .features-section {
        padding: 50px 25px;
    }
    
    .cta-section {
        padding: 70px 25px;
    }
    
    .portal-offers-header {
        padding: 35px 25px 18px 25px;
    }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
    /* max-width, padding i margin-top zarządzane GLOBALNIE przez global-responsive.css */

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

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

    .stat-item {
        padding: 14px;
    }

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

    .search-btn {
        justify-content: center;
        padding: 14px 24px;
    }

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

    .search-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

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

    .cta-section {
        padding: 60px 20px;
    }
    
    .portal-offers-header {
        padding: 30px 20px 15px 20px;
    }
    /* .portal-offers-header h1 i p responsive usunięte - zastąpione przez centralną regułę w style.css */
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    /* max-width, padding i margin-top zarządzane GLOBALNIE przez global-responsive.css */

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

    .stat-item {
        padding: 12px; /* Custom - Compact padding */
    }

    .search-section {
        padding: 35px 18px;
    }

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

    .search-btn {
        padding: 14px 22px;
        font-size: 15px;
        min-height: 44px; /* Touch target */
    }

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

    .cta-section {
        padding: 50px 15px;
    }
    
    .app-btn {
        padding: 14px 24px;
        font-size: 15px;
        min-height: 44px;
    }
    
    .portal-offers-header {
        padding: 25px 18px 15px 18px;
    }
    /* .portal-offers-header h1 i p responsive usunięte - zastąpione przez centralną regułę w style.css */
    
    input[type="text"],
    input[type="search"] {
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 44px;
    }
}

/* ==========================================
   ♿ 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;
}

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

/* ==========================================
   🏢 STRONA OFERT FIRMY (oferty-firmy.php)
   ========================================== */

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: var(--text-light);
    margin: 0 5px;
}

.breadcrumbs .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Header firmy z logo */
.company-page-header {
    padding: 30px 40px;
}

.company-header-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.company-logo-wrapper {
    flex-shrink: 0;
}

.company-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: var(--radius-button); /* 8px - Shape & Sizing System v4.0 (deprecated fix) */
    background: white;
    padding: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.company-info {
    flex: 1;
}

.company-title {
    margin: 0 0 10px 0;
    font-size: 2rem;
    color: var(--text-primary);
}

.company-subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.company-subtitle strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive dla headera firmy */
@media (max-width: 768px) {
    .company-page-header {
        padding: 25px 20px;
    }
    
    .company-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
    }
    
    .company-title {
        font-size: 1.6rem;
    }
    
    .company-subtitle {
        font-size: 1rem;
    }
    
    .breadcrumbs {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .company-page-header {
        padding: 20px 15px; /* Custom - Responsive mobile header */
    }
    
    .company-header-content {
        gap: 12px;
    }
    
    .company-logo {
        width: 70px;
        height: 70px;
        padding: 8px;
    }
    
    .company-title {
        font-size: 1.4rem;
    }
    
    .company-subtitle {
        font-size: 0.9rem;
    }
    
    .breadcrumbs {
        font-size: 0.8rem;
        gap: 5px;
    }
    
    .breadcrumbs .separator {
        margin: 0 3px;
    }
}

/* Dark mode support dla headera firmy */
html[data-theme="dark"] .company-logo {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

html[data-theme="dark"] .company-page-header {
    background: var(--bg-secondary);
}

/* ==========================================
   🎨 BANER I OPIS FIRMY (Sprint 3)
   ========================================== */

.company-website-section {
    width: 100%;
    margin: 0 0 30px 0;
}

.company-banner-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
}

.company-banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
}

.company-long-description {
    background: var(--bg-card);
    border-radius: var(--radius-card); /* 12px - Shape & Sizing System v4.0 (deprecated fix) */
    padding: 40px;
    margin: 30px 0 0 0;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    line-height: 1.8;
    color: var(--text-primary);
}

.company-long-description h1,
.company-long-description h2,
.company-long-description h3,
.company-long-description h4 {
    color: var(--primary-color);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.company-long-description h1:first-child,
.company-long-description h2:first-child,
.company-long-description h3:first-child,
.company-long-description h4:first-child {
    margin-top: 0;
}

.company-long-description p {
    margin-bottom: 1.2em;
}

.company-long-description ul,
.company-long-description ol {
    margin: 1em 0 1.5em 1.5em;
    padding-left: 1em;
}

.company-long-description li {
    margin-bottom: 0.5em;
}

.company-long-description strong {
    font-weight: 600;
    color: var(--text-primary);
}

.company-long-description a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: var(--transition);
}

.company-long-description a:hover {
    color: var(--accent-color);
}

/* Responsive dla banera i opisu */
@media (max-width: 768px) {
    .company-banner-image {
        max-height: 250px;
    }
    
    .company-long-description {
        padding: 30px 25px;
        margin: 20px 0 0 0;
    }
}

@media (max-width: 480px) {
    .company-banner-image {
        max-height: 200px;
    }
    
    .company-long-description {
        padding: 25px 20px;
        margin: 15px 0 0 0;
        font-size: 0.95rem;
    }
}

/* Dark mode support dla banera i opisu */
html[data-theme="dark"] .company-long-description {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

