/* =======================================================
    RESPONSIVE STYLES FOR MOBILE DEVICES
    oferta-mobile.css
    ======================================================= */

@media screen and (max-width: 1024px) {
    .navbar {
        padding: 12px 30px;
        margin: 0 20px;
    }
    .nav-menu {
        gap: 20px;
    }
    .offer-section {
        padding: 130px 20px 80px;
    }
    .offer-grid {
        gap: 25px;
    }
    .offer-card {
        padding: 35px;
    }
    .guarantee-grid {
        gap: 25px;
    }
    .guarantee-card {
        padding: 25px;
    }
    .contact-container {
        gap: 40px;
    }
}

@media screen and (max-width: 768px) {
    /* === DODANY BLOK DLA POPRAWNEGO WYŚWIETLANIA NA TELEFONIE === */
    .title-wrapper {
       position: static; /* Wyłącz pozycjonowanie, aby wróciło do normalnego układu */
    }
    .section-header {
        text-align: center; /* Wyśrodkuj tekst w kontenerze */
    }
    .pre-title {
        position: static; /* Wyłącz pozycjonowanie */
        margin-bottom: 5px; /* Dodaj dolny margines, bo teraz jest nad h1 */
    }
    /* === KONIEC DODANEGO BLOKU === */


    /* Ukryj menu na desktop */
    .nav-menu, .social-media {
        display: none;
    }

    /* Pokaż i ostyluj hamburger */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1003;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    .hamburger span {
        width: 100%;
        height: 3px;
        background-color: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .hamburger.active {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    /* Pokaż i ostyluj menu mobilne */
    .mobile-sidebar {
        position: fixed;
        top: 0;
        width: 260px;
        right: -260px;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 1002;
        transition: right 0.3s ease;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    
    .mobile-sidebar.active {
        right: 0;
    }

    .mobile-sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #eee;
    }
    
    .mobile-logo {
        font-size: 1.3rem;
        font-weight: 600;
        color: #333;
    }
    
    .close-sidebar {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #333;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background-color 0.3s ease;
    }
    
    .close-sidebar:hover {
        background-color: #f0f0f0;
    }
    
    .close-sidebar i {
        font-size: 1.2rem;
        line-height: 1;
    }
    
    .mobile-menu {
        flex: 1;
        padding: 20px 0;
    }
    
    .mobile-nav-item {
        border-bottom: 1px solid #e0e0e0;
    }
    
    .mobile-nav-item:last-child {
        border-bottom: none;
    }
    
    .mobile-nav-link {
        display: block;
        padding: 15px 20px;
        color: #333;
        font-size: 1rem;
        font-weight: 500;
        transition: background-color 0.3s ease, color 0.3s ease;
    }
    
    .mobile-nav-link:hover {
        background-color: #f8f9fa;
        color: #28a745;
    }
    
    .mobile-dropdown-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-dropdown-trigger {
        padding: 15px 20px;
        cursor: pointer;
    }
    
    .dropdown-arrow {
        font-size: 0.8rem;
        transition: transform 0.3s ease;
    }
    
    .mobile-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .mobile-dropdown-menu {
        max-height: 0;
        overflow: hidden;
        background-color: #f8f9fa;
        transition: max-height 0.3s ease;
    }
    
    .mobile-dropdown.active .mobile-dropdown-menu {
        max-height: 200px;
    }
    
    .mobile-dropdown-menu li a {
        display: block;
        padding: 12px 20px 12px 40px;
        color: #555;
        font-size: 0.9rem;
    }
    
    .mobile-social-media {
        padding: 20px;
        border-top: 1px solid #eee;
        display: flex;
        gap: 20px;
        justify-content: center;
    }
    
    .mobile-social-media a {
        font-size: 1.3rem;
        color: #555;
    }
    
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        display: block;
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Pozostałe style mobilne */
    .header {
        padding: 15px 0;
    }
    .navbar {
        padding: 10px 20px;
        margin: 0 15px;
    }
    .nav-logo {
        font-size: 1.3rem;
    }
    .offer-section {
        padding: 120px 20px 80px;
    }
    .section-title, .guarantee-section .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    .offer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .offer-card {
        padding: 30px;
        margin: 0 auto;
        max-width: 400px;
    }
    .offer-card.popular {
        transform: none;
        order: -1;
    }
    .offer-card h3 {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }
    .offer-card .price {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    .offer-card ul {
        margin-bottom: 25px;
    }
    .offer-card li {
        margin-bottom: 12px;
        font-size: 0.95rem;
    }
    .guarantee-section {
        padding: 80px 20px;
    }
    .guarantee-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .guarantee-card {
        padding: 25px 20px;
    }
    .guarantee-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    .guarantee-card h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    .guarantee-card p {
        font-size: 0.9rem;
    }
    .contact-section {
        padding: 80px 20px;
    }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .newsletter-side h3, .contact-info-side h3 {
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 480px) {
    .navbar {
        padding: 15px 20px;
        margin: 0 10px;
    }
    .nav-logo {
        font-size: 1.2rem;
    }
    .offer-section {
        padding: 140px 15px 60px;
    }
    .section-title, .guarantee-section .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
        line-height: 1.3;
    }
    .offer-grid {
        gap: 20px;
    }
    .offer-card {
        padding: 25px 20px;
        max-width: none;
    }
    .offer-card h3 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    .offer-card .price {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    .offer-card ul {
        margin-bottom: 20px;
    }
    .offer-card li {
        margin-bottom: 10px;
        font-size: 0.9rem;
        gap: 8px;
    }
    .offer-card li i {
        margin-top: 3px;
        font-size: 0.9rem;
    }
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    .guarantee-section {
        padding: 60px 15px;
    }
    .guarantee-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .guarantee-card {
        padding: 20px 15px;
    }
    .guarantee-icon {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }
    .guarantee-card h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    .guarantee-card p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    .contact-section {
        padding: 60px 15px;
    }
    .contact-container {
        gap: 40px;
    }
    .newsletter-side h3, .contact-info-side h3 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    .newsletter-side p, .contact-info-side p {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    .newsletter-form input {
        padding: 12px;
        font-size: 0.9rem;
    }
    .contact-item {
        font-size: 1rem;
    }
    .contact-item i {
        font-size: 1.3rem;
    }
    .footer-social-media a {
        font-size: 1.3rem;
    }
}

/* === ZASTĄP CAŁY POPRZEDNI FRAGMENT TYM PONIŻEJ === */

/* --- Style dla aktywnych linków --- */

/* Delikatne tło dla każdego aktywnego elementu LI */
.mobile-menu li.active-page {
    position: relative;
    background-color: rgba(31, 141, 79, 0.05);
}

/* --- Style dla ZIELONEJ KRESKI --- */

/* 1. Kreska dla ZWYKŁYCH linków (np. "O mnie", "Kontakt") */
/* Używamy :not(), aby ta reguła nie dotyczyła "Oferty" */
.mobile-menu > .mobile-nav-item.active-page:not(.mobile-dropdown)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 4px;
    background-color: #1F8D4F;
    border-radius: 2px;
}

/* 2. Kreska TYLKO dla GŁÓWNEGO linku "Oferta" (gdy jest aktywny) */
/* Dodajemy pozycjonowanie do nagłówka... */
.mobile-dropdown-header {
    position: relative;
}
/* ...i przypinamy kreskę do niego. Teraz jej wysokość będzie stała. */
.mobile-dropdown.active-page > .mobile-dropdown-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 4px;
    background-color: #1F8D4F;
    border-radius: 2px;
}

/* 3. Kreska dla elementów WEWNĄTRZ menu rozwijanego (bez zmian) */
.mobile-dropdown-menu li.active-page::before {
    content: '';
    position: absolute;
    left: 20px; /* Wcięcie dla lepszej czytelności */
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 4px;
    background-color: #1F8D4F;
    border-radius: 2px;
}


/* --- Style dla POGRUBIENIA tekstu (bez zmian) --- */

/* Pogrubienie dla aktywnych linków głównych (w tym "Oferta") */
.mobile-menu > .mobile-nav-item.active-page > a,
.mobile-dropdown.active-page > .mobile-dropdown-header > .mobile-nav-link {
    color: #1F8D4F;
    font-weight: 600;
}

/* Pogrubienie dla aktywnych linków w menu rozwijanym */
.mobile-dropdown-menu li.active-page > a {
    color: #1F8D4F;
    font-weight: 600;
}

/* Pogrubienie dla "Oferta", gdy podstrona w środku jest aktywna */
.mobile-dropdown.has-active-child > .mobile-dropdown-header > .mobile-nav-link {
    color: #1F8D4F;
    font-weight: 600;
}

@media (max-width: 768px) {
  .cta-banner__right {
    display: flex;
    justify-content: center; /* wyśrodkowanie przycisku */
  }
}

/* =========================
   FOOTER - MOBILE
   ========================= */
@media (max-width: 768px) {
    .footer-main {
        padding: 30px 20px 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 1rem;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }

    .footer-contact,
    .footer-social,
    .footer-links {
        text-align: center;
    }

    .footer-contact a,
    .footer-social-link,
    .footer-links a {
        font-size: 0.9rem;
    }

    .footer-links {
        gap: 10px;
    }

    .footer-bottom {
        margin-top: 25px;
        padding-top: 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .footer-main {
        padding: 25px 15px 12px;
    }

    .footer-content {
        gap: 25px;
    }

    .footer-section h3 {
        font-size: 0.95rem;
    }

    .footer-contact a,
    .footer-social-link,
    .footer-links a {
        font-size: 0.85rem;
    }
}