/*
 * ATF Professional Line
 * Dark theme: gradient czarny/ciemnoszary, bialy tekst, zolty akcent (#fecb00).
 * Mobile-first, breakpoints 768px / 1024px.
 */

/* ========================================
   Scroll Animations — bazowe stany
   (identyczne jak atf-line-v1, re-deklarowane
   dla samodzielnosci pliku)
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

/* ========================================
   Kontener glowny
   ======================================== */
.atf-el {
    background: #000;
    color: #e9ecef;
    font-family: var(--font-base);
    line-height: 1.7;
    overflow: clip;
}

.atf-el__container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ========================================
   HERO — ujednolicony z ATF Professional Line 3.0
   (czarne tlo, grid 2 rowne kolumny, te same rozmiary
   naglowka i tresci co na stronie 3.0)
   ======================================== */
.atf-el__hero {
    background: linear-gradient(160deg, #000 14%, #282828 100%);
    color: #fff;
    min-height: 80vh;
    padding: 80px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.atf-el__hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.atf-el__hero-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    padding: 0;
}

.atf-el__hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: normal;
    margin: 0;
    color: #fff;
}

.atf-el__hero-desc {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--dark-text);
    margin: 0;
}

.atf-el__hero-desc--secondary {
    margin: 0;
}

.atf-el__hero-highlight {
    color: var(--theme-accent-text);
}

/* Zolty komunikat o aktywacji/koncie/gwarancji (miedzy opisem a CTA) */
.atf-el__hero-notice {
    font-size: 1.125rem;
    line-height: 1.8;
    font-weight: 600;
    color: var(--theme-accent-text);
    margin: 0;
}

.atf-el__hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.atf-el__hero-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 20px 60px rgba(251, 191, 36, 0.15));
}

/* Mobile — jak hero 3.0: jedna kolumna, obraz nad tekstem */
@media (max-width: 767px) {
    .atf-el__hero {
        min-height: auto;
        padding: 60px 0;
    }
    .atf-el__hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .atf-el__hero-title {
        font-size: 2rem;
    }
    .atf-el__hero-image {
        order: -1;
    }
}

/* ========================================
   HIGHLIGHT YELLOW — wspólna klasa
   ======================================== */
.atf-el__highlight-yellow {
    color: var(--theme-accent-text);
}

/* ========================================
   DETAIL — naprzemiennie obraz/tekst
   Duze paddingi, flex row z gap 80px na desktopie
   ======================================== */
.atf-el__detail {
    background: #000;
    padding: 1.5rem 0;
}

.atf-el__detail-inner {
    display: flex;
    flex-direction: column-reverse;
    gap: 1.25rem;
    align-items: center;
}

.atf-el__detail--reverse .atf-el__detail-inner {
    flex-direction: column;
}

.atf-el__detail-img {
    max-width: 100%;
    height: auto;
    display: block;
}

.atf-el__detail-text {
    text-align: left;
}

.atf-el__detail-text p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #fff;
    margin: 0;
}

@media (min-width: 768px) {
    .atf-el__detail {
        padding: 2rem 0;
    }
    .atf-el__detail-text p {
        font-size: 1.2rem;
    }
}

@media (min-width: 1024px) {
    .atf-el__detail {
        padding: 2rem 1.25rem 3.5rem;
    }
    .atf-el__detail-inner {
        flex-direction: row;
        gap: 5rem;
        align-items: center;
        justify-content: center;
    }
    .atf-el__detail--reverse .atf-el__detail-inner {
        flex-direction: row;
    }
    .atf-el__detail-image {
        flex: 0 0 50%;
    }
    .atf-el__detail-text {
        flex: 0 0 50%;
        padding: 11% 21% 11% 11%;
    }
    .atf-el__detail--reverse .atf-el__detail-text {
        padding: 11%;
    }
    .atf-el__detail-text p {
        font-size: 1.25rem;
    }
}

/* ========================================
   FULL WIDTH TEXT — sekcja z tlem 004-1.png
   ======================================== */
.atf-el__fulltext {
    background: #000 url('') no-repeat center center;
    background-size: auto;
    padding: 2rem 0;
    margin: 2rem 0 3rem;
}

.atf-el__fulltext-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #e9ecef;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.atf-el__fulltext-content strong {
    font-weight: 700;
}

@media (min-width: 768px) {
    .atf-el__fulltext {
        padding: 2rem 0;
        margin: 2rem 0 3rem;
    }
}

@media (max-width: 767px) {
    .atf-el__fulltext {
        margin: 0;
        padding: 2rem 0;
    }
    .atf-el__fulltext-content {
        padding: 2rem;
    }
}

/* ========================================
   SPECYFIKACJA TECHNICZNA — #282828
   ======================================== */
.atf-el__spec {
    background: #282828;
    color: var(--color-white);
    padding: 80px 0;
}

.atf-el__spec-title {
    font-family: var(--font-base);
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 3rem;
    color: var(--color-white);
}

.atf-el__spec-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.atf-el__spec-row:last-child {
    margin-bottom: 0;
}

/* Wiersz odwrócony: obraz na prawo (end), tekst na lewo (start) */
.atf-el__spec-row--reverse {
    direction: rtl;
}
.atf-el__spec-row--reverse > * {
    direction: ltr;
}

.atf-el__spec-img-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.atf-el__spec-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-base);
}

.atf-el__spec-text {
    display: flex;
    flex-direction: column;
}

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

.atf-el__spec-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dark-text);
}

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

.atf-el__spec-list li strong {
    display: block;
    color: var(--color-accent-yellow);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

/* Tablet — wiersze do jednej kolumny */
@media (min-width: 768px) and (max-width: 1023px) {
    .atf-el__spec-row,
    .atf-el__spec-row--reverse {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .atf-el__spec-row--reverse {
        direction: ltr;
    }
}

/* Mobile — wiersze do jednej kolumny */
@media (max-width: 767px) {
    .atf-el__spec-title {
        font-size: 1.75rem;
    }
    .atf-el__spec-row,
    .atf-el__spec-row--reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .atf-el__spec-row--reverse {
        direction: ltr;
    }
}

/* ========================================
   FEATURES GRID — 4 kolumny, ciemne tlo
   Gradient od #282828 do #000
   ======================================== */
.atf-el__features {
    background: linear-gradient(180deg, #282828 49%, #000 100%);
    padding: 2rem 0;
}

.atf-el__features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.atf-el__feature-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
}

.atf-el__feature-icon {
    flex-shrink: 0;
}

.atf-el__feature-icon img {
    display: block;
    width: auto;
    height: auto;
    max-width: 80px;
}

.atf-el__feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.125;
    color: #fff;
    margin: 0 0 0.5rem;
}

.atf-el__feature-desc {
    font-size: 0.9375rem;
    line-height: 1.2;
    color: #fff;
    margin: 0;
    text-align: justify;
}

@media (min-width: 768px) {
    .atf-el__features {
        padding: 2rem 0.625rem;
    }
    .atf-el__features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.875rem;
    }
    .atf-el__feature-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .atf-el__feature-icon img {
        max-width: none;
        width: 30%;
    }
    .atf-el__feature-title {
        font-size: 1.5rem;
        line-height: 1.69rem;
    }
}

@media (min-width: 1024px) {
    .atf-el__features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .atf-el__feature-icon img {
        width: 30%;
    }
}

/* ========================================
   WYPOSAZENIE HERO — obraz + naglowek
   ======================================== */
.atf-el__equip-hero {
    background: #000;
    padding: 1.25rem 0 0;
}

.atf-el__equip-hero-image {
    text-align: center;
}

.atf-el__equip-hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.atf-el__equip-hero-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #fff;
    text-align: center;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .atf-el__equip-hero-title {
        font-size: 1.75rem;
        margin: 3rem 0;
    }
}

/* ========================================
   EQUIPMENT DETAILS — ciemne tlo #282828
   Numer w kolku + obraz + opis w jednym wierszu
   ======================================== */
.atf-el__equip-details {
    background: #282828;
    color: var(--color-white);
    padding: 60px 0 80px;
}

.atf-el__equip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Kafelek jest linkiem (<a>) do strony adaptera/czesci — resetujemy styl linka.
   reset.css wymusza crimson #c36 na a:hover/:active, wiec jawnie trzymamy color:inherit
   we wszystkich stanach, zeby tekst kafelka nie zmienial koloru po kliknieciu. */
.atf-el__equip-item {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-base);
    overflow: hidden;
    position: relative;
    transition: border-color 0.3s ease, background-color 0.3s ease,
                box-shadow 0.3s ease;
}

.atf-el__equip-item:hover,
.atf-el__equip-item:focus,
.atf-el__equip-item:active,
.atf-el__equip-item:focus-visible {
    text-decoration: none;
    color: inherit;
    border-color: var(--color-accent-yellow);
}

.atf-el__equip-item:focus-visible {
    outline: 2px solid var(--color-accent-yellow);
    outline-offset: 2px;
}

.atf-el__equip-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: var(--font-base);
    font-size: 1.5rem;
    font-weight: 800;
    /* Numerek lezy zawsze na bialym kadrze zdjecia (img-wrap #fff) — niezaleznie od
       trybu dark/light. Ciemny szary daje wysoki kontrast; brak wariantu dla dark mode. */
    color: #333;
    z-index: 1;
    line-height: 1;
}

.atf-el__equip-img-wrap {
    overflow: hidden;
    /* Zdjecia produktow (adaptery/czesci) sa kwadratowe i na bialym tle.
       Kwadratowy kadr + object-fit:contain pokazuje CALY produkt bez przyciecia. */
    aspect-ratio: 1 / 1;
    background: #fff;
}

.atf-el__equip-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.atf-el__equip-item:hover .atf-el__equip-img {
    transform: scale(1.03);
}

.atf-el__equip-body {
    padding: 1.25rem;
}

.atf-el__equip-title {
    font-family: var(--font-base);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--color-white);
}

.atf-el__equip-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--dark-text);
    margin: 0;
}

/* Responsywnosc siatki kafelkow: 3 kol -> 2 (tablet) -> 1 (mobile). 6 elem. = rowne rzedy. */
@media (min-width: 768px) and (max-width: 1023px) {
    .atf-el__equip-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .atf-el__equip-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   KOMPATYBILNOSC — tekst + obraz 017
   ======================================== */
.atf-el__compat {
    background: #000;
    padding: 2rem 0;
}

.atf-el__compat-inner {
    display: flex;
    flex-direction: column-reverse;
    gap: 1.5rem;
    align-items: center;
}

.atf-el__compat-text {
    text-align: left;
}

.atf-el__compat-intro {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #fff;
    margin: 0 0 1.25rem;
}

.atf-el__compat-brands {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #fff;
    margin: 0 0 0.75rem;
}

.atf-el__compat-cars {
    font-size: 0.875rem;
    line-height: 1.7;
    color: #fff;
    margin: 0;
}

.atf-el__compat-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

@media (min-width: 768px) {
    .atf-el__compat {
        padding: 2rem 1.25rem;
    }
    .atf-el__compat-intro {
        font-size: 1.25rem;
    }
    .atf-el__compat-brands {
        font-size: 1.125rem;
    }
    .atf-el__compat-cars {
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .atf-el__compat {
        padding: 4.375rem 1.25rem 2rem;
    }
    .atf-el__compat-inner {
        flex-direction: row;
        gap: 5rem;
        justify-content: center;
    }
    .atf-el__compat-text {
        flex: 0 0 50%;
    }
    .atf-el__compat-image {
        flex: 0 0 50%;
    }
    .atf-el__compat-image img {
        width: 90%;
    }
}

/* ========================================
   CTA BANNER — zolte tlo (#FFCC00)
   ======================================== */
.atf-el__cta {
    background: #FFCC00;
    padding: 0;
}

.atf-el__cta-inner {
    text-align: center;
    padding: 2rem 1.25rem;
}

.atf-el__cta-title {
    font-size: 1.375rem;
    font-weight: 400;
    color: #000;
    margin: 0 0 0.25rem;
}

.atf-el__cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.375rem;
    font-weight: 400;
    color: #000;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.atf-el__cta-link:hover {
    opacity: 0.7;
}

.atf-el__cta-link span {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.atf-el__cta-link:hover span {
    transform: translateX(6px);
}

@media (min-width: 768px) {
    .atf-el__cta-inner {
        padding: 1.875rem;
    }
    .atf-el__cta-title {
        font-size: 1.625rem;
    }
    .atf-el__cta-link {
        font-size: 1.625rem;
    }
}

/* ========================================
   LIGHT THEME OVERRIDES
   ======================================== */

/* Main container */
[data-theme="light"] .atf-el {
    background: var(--theme-bg);
    color: var(--theme-text);
}

/* Hero — ujednolicony z 3.0 (jasny gradient niebiesko-szary) */
[data-theme="light"] .atf-el__hero {
    background: linear-gradient(135deg, #e8eaf0 0%, #dce3ed 50%, #cdd8eb 100%);
    color: var(--theme-text);
}

[data-theme="light"] .atf-el__hero-title {
    color: var(--theme-heading);
}

[data-theme="light"] .atf-el__hero-desc {
    color: var(--theme-text-secondary);
}

[data-theme="light"] .atf-el__hero-img {
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.1));
}

/* Detail sections */
[data-theme="light"] .atf-el__detail {
    background: var(--theme-bg);
}

[data-theme="light"] .atf-el__detail-text p {
    color: var(--theme-text);
}

/* Full-width text */
[data-theme="light"] .atf-el__fulltext {
    background-color: var(--theme-bg-alt);
}

[data-theme="light"] .atf-el__fulltext-content {
    color: var(--theme-text);
}

/* Spec section — jasny motyw */
[data-theme="light"] .atf-el__spec {
    background: var(--theme-card-bg-hover);
    color: var(--theme-text);
}

[data-theme="light"] .atf-el__spec-title {
    color: var(--theme-heading);
}

[data-theme="light"] .atf-el__spec-list li {
    color: var(--theme-text);
    border-bottom-color: var(--theme-border);
}

[data-theme="light"] .atf-el__spec-list li strong {
    color: #9a7b00;
}

/* Features */
[data-theme="light"] .atf-el__features {
    background: linear-gradient(180deg, var(--theme-card-bg-hover) 49%, var(--theme-bg) 100%);
}

[data-theme="light"] .atf-el__feature-title {
    color: var(--theme-heading);
}

[data-theme="light"] .atf-el__feature-desc {
    color: var(--theme-text-secondary);
}

/* Equipment hero */
[data-theme="light"] .atf-el__equip-hero {
    background: var(--theme-bg);
}

[data-theme="light"] .atf-el__equip-hero-title {
    color: var(--theme-heading);
}

/* Equipment details — kafelki (styl jak ATF PRO 3.0) */
[data-theme="light"] .atf-el__equip-details {
    background: var(--theme-bg);
    color: var(--theme-text);
}

[data-theme="light"] .atf-el__equip-item {
    background: var(--theme-card-bg);
    border-color: var(--theme-border);
    box-shadow: var(--theme-shadow-sm);
}

[data-theme="light"] .atf-el__equip-item:hover {
    border-color: #d4a00a;
}

[data-theme="light"] .atf-el__equip-title {
    color: var(--theme-heading);
}

[data-theme="light"] .atf-el__equip-desc {
    color: var(--theme-text-secondary);
}

/* Compatibility */
[data-theme="light"] .atf-el__compat {
    background: var(--theme-bg);
}

[data-theme="light"] .atf-el__compat-intro {
    color: var(--theme-text);
}

[data-theme="light"] .atf-el__compat-brands {
    color: var(--theme-text);
}

[data-theme="light"] .atf-el__compat-cars {
    color: var(--theme-text-secondary);
}

/* Transitions for smooth theme switching */
.atf-el,
.atf-el__hero,
.atf-el__hero-title,
.atf-el__hero-desc,
.atf-el__hero-notice,
.atf-el__detail,
.atf-el__detail-text p,
.atf-el__fulltext,
.atf-el__fulltext-content,
.atf-el__spec,
.atf-el__spec-title,
.atf-el__spec-list li,
.atf-el__features,
.atf-el__feature-title,
.atf-el__feature-desc,
.atf-el__equip-hero,
.atf-el__equip-hero-title,
.atf-el__equip-details,
.atf-el__equip-title,
.atf-el__equip-desc,
.atf-el__compat,
.atf-el__compat-intro,
.atf-el__compat-brands,
.atf-el__compat-cars {
    transition: background 0.3s ease, background-color 0.3s ease,
                color 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    .atf-el,
    .atf-el__hero,
    .atf-el__hero-title,
    .atf-el__hero-desc,
    .atf-el__detail,
    .atf-el__detail-text p,
    .atf-el__fulltext,
    .atf-el__fulltext-content,
    .atf-el__spec,
    .atf-el__spec-title,
    .atf-el__spec-list li,
    .atf-el__features,
    .atf-el__feature-title,
    .atf-el__feature-desc,
    .atf-el__equip-hero,
    .atf-el__equip-hero-title,
    .atf-el__equip-details,
    .atf-el__equip-item,
    .atf-el__equip-title,
    .atf-el__equip-desc,
    .atf-el__compat,
    .atf-el__compat-intro,
    .atf-el__compat-brands,
    .atf-el__compat-cars {
        transition: none;
    }
}
