/* ==========================================================================
   SECTION LAYOUTS & HEADERS - DANIEL WOŹNIAK
   ========================================================================== */

/* Section titles for the new layout system */
.section-main-title {
    font-size: 2.5rem !important;
    font-weight: var(--font-weight-bold) !important;
    line-height: var(--line-height-tight) !important;
    letter-spacing: -0.02em !important;
    color: var(--text-primary-light) !important;
    margin: 0 !important;
    font-family: var(--font-family-base) !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    z-index: var(--z-elevated) !important;
}

.section-secondary-text {
    font-size: clamp(1rem, 2.2vw, 1.1rem) !important;
    font-weight: var(--font-weight-medium) !important;
    line-height: var(--line-height-normal) !important;
    color: var(--text-primary-light) !important;
    margin: 0 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    position: relative !important;
    z-index: var(--z-elevated) !important;
}

.section-secondary-subtext {
    font-size: clamp(0.85rem, 2vw, 0.95rem) !important;
    font-weight: var(--font-weight-normal) !important;
    line-height: var(--line-height-relaxed) !important;
    color: var(--text-light) !important;
    margin: 0 !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    z-index: var(--z-elevated) !important;
}

/* Hide old titles that conflict */
.pillars-intro,
.pillars-title,
.pillars-subtitle,
.mapa-title,
.mapa-subtitle,
.ai-title,
.ai-subtitle,
.ceo-problems-title,
.ceo-problems-subtitle,
.video-title,
.video-subtitle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Section backgrounds - unified system */
.section-dark {
    background: var(--primary-dark);
    color: var(--text-primary-light);
}

.section-light {
    background: var(--white);
    color: var(--text-primary-dark);
}

.section-gradient {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
    color: var(--text-primary-light);
}

/* Enhanced Section Separation & Spacing */
section {
    position: relative;
    padding: 3rem 0;
    isolation: isolate;
}

/* Enhanced section separation with stronger contrasts */
section:nth-child(even):not(.hero):not(.newsletter-section) {
    background: linear-gradient(135deg,
        rgba(0, 122, 204, 0.03) 0%,
        rgba(10, 25, 47, 0.8) 50%,
        rgba(247, 147, 30, 0.02) 100%
    );
    border-top: 1px solid rgba(0, 122, 204, 0.1);
    border-bottom: 1px solid rgba(247, 147, 30, 0.1);
}

section:nth-child(odd):not(.hero):not(.newsletter-section) {
    background: linear-gradient(45deg,
        rgba(247, 147, 30, 0.02) 0%,
        rgba(15, 30, 52, 0.9) 50%,
        rgba(0, 122, 204, 0.03) 100%
    );
    border-top: 1px solid rgba(247, 147, 30, 0.1);
    border-bottom: 1px solid rgba(0, 122, 204, 0.1);
}

/* Special treatment for key sections */
.newsletter-section {
    background: linear-gradient(135deg,
        rgba(0, 122, 204, 0.05) 0%,
        rgba(8, 20, 35, 0.95) 100%
    );
    border: 1px solid rgba(0, 122, 204, 0.2);
}

.ai-circle {
    background: linear-gradient(45deg,
        rgba(247, 147, 30, 0.04) 0%,
        rgba(12, 22, 40, 0.95) 100%
    );
    border: 1px solid rgba(247, 147, 30, 0.15);
}

.booking-section {
    background: linear-gradient(135deg,
        rgba(0, 122, 204, 0.06) 0%,
        rgba(5, 15, 30, 0.98) 100%
    );
    border: 2px solid rgba(0, 122, 204, 0.3);
}

/* Enhanced section dividers - DISABLED for compact layout */
section::after {
    display: none;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(0,122,204,0.8), rgba(247,147,30,0.6), transparent);
    opacity: 1;
    border-radius: 2px;
    animation: dividerPulse 3s ease-in-out infinite;
    z-index: 10;
}

/* Section entrance effects */
section.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

section.reveal.animate-in {
    opacity: 1;
    transform: translateY(0);
}

@keyframes dividerPulse {
    0%, 100% {
        opacity: 0.8;
        transform: translateX(-50%) scaleX(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1.2);
    }
}

/* Hide dividers on some sections */
.hero::after,
.footer::after,
.domkniecie::after {
    display: none;
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    margin: var(--space-2xl) 0;
    opacity: 0.3;
}

.section-divider-animated {
    animation: dividerPulse 3s ease-in-out infinite;
}

/* Section spacing utilities */
.section-padding-sm {
    padding: var(--space-xl) 0;
}

.section-padding-md {
    padding: var(--space-xl) 0;
}

.section-padding-lg {
    padding: var(--space-2xl) 0;
}

/* Section overlays */
.section-overlay {
    position: relative;
}

.section-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: var(--z-negative);
}

.section-overlay > * {
    position: relative;
    z-index: var(--z-normal);
}

/* Progress indicators */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-medium);
    z-index: var(--z-sticky);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-blue-light));
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive section adjustments */
@media (max-width: 768px) {
    .section-main-title {
        font-size: clamp(2rem, 8vw, 3rem) !important;
        text-align: center;
    }

    .section-secondary-text {
        font-size: clamp(1rem, 4vw, 1.2rem) !important;
        text-align: center;
    }

    .section-secondary-subtext {
        font-size: clamp(0.9rem, 3.5vw, 1rem) !important;
        text-align: center;
    }

    .section-padding-lg {
        padding: var(--space-2xl) 0;
    }
}

@media (max-width: 480px) {
    .section-main-title {
        font-size: clamp(1.5rem, 10vw, 2.5rem) !important;
    }

    .section-secondary-text {
        font-size: clamp(0.95rem, 5vw, 1.1rem) !important;
    }

    .section-secondary-subtext {
        font-size: clamp(0.85rem, 4vw, 0.95rem) !important;
    }
}