/* =======================================================
    RESPONSIVE STYLES FOR MOBILE DEVICES
    programy-treningowe-mobile.css
    ======================================================= */

@media screen and (max-width: 1024px) {
    .navbar {
        padding: 12px 30px;
        margin: 0 20px;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .hero-container {
        gap: 40px;
        padding: 0 20px;
    }
    
    .hero-content h1 {
        font-size: 2.3rem;
    }
    
    .tabs-section {
        padding: 80px 20px;
    }
    
    .contact-container {
        gap: 40px;
    }
}

@media screen and (max-width: 768px) {
    /* 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;
    }
    
    /* === NOWY LAYOUT MOBILNY DLA SLIDERA === */
    .header {
        padding: 15px 0;
    }
    .navbar {
        padding: 10px 20px;
        margin: 0 15px;
    }
    .nav-logo {
        font-size: 1.3rem;
    }
    .ebook-hero-section {
        padding: 100px 20px 40px;
    }
    
    /* HERO CONTAINER - jedna kolumna na mobile */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    /* SLIDER WRAPPER - jedna kolumna: główny slider na górze, miniatury pod spodem */
    .slider-wrapper {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 20px;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
    }
    
    /* GŁÓWNY SLIDER - responsywny rozmiar */
    .slider-main {
        grid-row: 1;
        width: 100%;
        max-width: 400px;
        height: 500px;
        margin: 0 auto;
        border-radius: 15px;
        background-color: #e8e8e8;
        box-shadow: 0 15px 40px rgba(0,0,0,0.1);
        padding: 15px;
        overflow: visible;
        position: relative;
    }
    
    /* MINIATURY - pod głównym sliderem */
    .slider-thumbnails {
        grid-row: 2;
        position: static;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 12px;
        margin: 0 auto;
        padding: 0;
        width: 100%;
    }
    
    /* MINIATURY - mniejsze na mobile */
    .thumb {
        width: 60px;
        height: 75px;
        border-radius: 6px;
        cursor: pointer;
        border: 2px solid transparent;
        transition: border-color 0.3s ease, transform 0.3s ease;
        background-color: #e8e8e8;
        padding: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    
    .thumb:hover {
        transform: scale(1.05);
    }
    
    .thumb.active {
        border-color: #1F8D4F;
        background-color: #d4d4d4;
    }
    
    .thumb img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 4px;
        display: block;
    }
    
    /* SLIDE - dostosowany do nowego rozmiaru */
    .slide {
        position: absolute;
        top: 15px;
        left: 15px;
        right: 15px;
        bottom: 15px;
        opacity: 0;
        transition: opacity 0.5s ease-in-out;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .slide.active {
        opacity: 1;
    }
    
    .slide img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 8px;
    }
    
    /* STRZAŁKI - dostosowane do mniejszego slidera */
    .slider-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        background: transparent;
        border-radius: 0;
        width: auto;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 20;
        box-shadow: none;
        padding: 8px;
    }
    
    .slider-nav:hover {
        background: transparent;
        transform: translateY(-50%) scale(1.1);
        box-shadow: none;
    }
    
    .slider-nav i {
        font-size: 1.5rem;
        color: #666;
        font-weight: 900;
        transition: color 0.3s ease;
    }
    
    .slider-nav:hover i {
        color: #333;
    }
    
    .slider-nav.prev {
        left: 0px;
    }
    
    .slider-nav.next {
        right: 0px;
    }
    
    /* HERO CONTENT */
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    .hero-content p {
        font-size: 0.95rem;
        margin: 0 auto 12px;
        max-width: 600px;
    }
    
    /* POZOSTAŁE STYLE */
    .tabs-section { padding: 80px 20px; }
    .tabs-nav {
        gap: 15px;
        margin-bottom: 40px;
        flex-wrap: wrap;
    }
    .tab-link {
        padding: 8px 20px;
        font-size: 1rem;
    }
    .tab-opis-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .opis-text { order: 2; }
    .opis-iphone { order: 1; }
    .opis-text h3 {
        font-size: 1.3rem;
        margin-top: 15px;
    }
    
    /* LISTA SRODEK - zmiana layoutu na mobile */
    .srodek-list li {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .kettlebell-icon {
        width: 40px;
        height: 40px;
        margin-top: 0;
    }
    
    .srodek-list i {
        font-size: 2rem;
        margin-top: 0;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 18px;
    }
    .contact-section { padding: 80px 20px; }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .newsletter-side h3, .contact-info-side h3 {
        font-size: 1.8rem;
    }
    
    .price-download-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .price-box {
         font-size: 0.9rem;
         text-align: center;
         background: linear-gradient(135deg, #1F8D4F, #0C5D30);
         -webkit-background-clip: text;
         background-clip: text;
         color: transparent;
     }
    .btn {
        font-size: 0.9rem;
        padding: 10px 25px;
        justify-content: center;
    }
    .custom-svg {
        width: 240px;
        height: auto;
        animation: none;
    }
    .opis-text ul {
        display: inline-block;
        text-align: left;
        padding-left: 0;
    }
}

@media screen and (max-width: 480px) {
    .navbar {
        padding: 15px 20px;
        margin: 0 10px;
    }
    .nav-logo { font-size: 1.2rem; }
    .ebook-hero-section {
        padding: 140px 15px 30px;
        min-height: auto;
    }
    .hero-container { gap: 30px; }
    
    /* SLIDER - jeszcze mniejszy na bardzo małych ekranach */
    .slider-wrapper { 
        max-width: 100%; 
        gap: 15px;
    }
    .slider-main {
        max-width: 320px;
        height: 400px;
        padding: 12px;
    }
    .slide {
        top: 12px;
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    .thumb { 
        width: 50px; 
        height: 65px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    .price-box {
        font-size: 0.85rem;
    }
    .btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    .tabs-section { padding: 60px 15px; }
    .tabs-nav { gap: 8px; }
    .tab-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    .opis-text h3 { font-size: 1.2rem; }
    .opis-text li { font-size: 0.9rem; }
    
    .srodek-list li { 
        padding: 15px;
        gap: 12px;
    }
    
    .kettlebell-icon {
        width: 35px;
        height: 35px;
    }
    
    .srodek-list i { 
        font-size: 1.8rem; 
    }
    
    .srodek-list strong { font-size: 0.9rem; }
    
    .faq-question {
        padding: 15px;
        font-size: 0.9rem;
    }
    .faq-answer p {
        padding: 0 15px 15px;
        font-size: 0.85rem;
    }
    .contact-section { padding: 60px 15px; }
    .newsletter-side h3, .contact-info-side h3 { font-size: 1.5rem; }
    .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; }
    .custom-svg { width: 220px; }
    
    .slider-nav i {
        font-size: 1.3rem;
    }
}

/* Dostosowanie etykiety Wersja cyfrowa */
@media screen and (max-width: 768px) {
    .digital-label { font-size: 0.95rem; }
}

@media screen and (max-width: 480px) {
    .digital-label { font-size: 0.9rem; }
}

/* === Style aktywnych linków w mobile menu === */
.mobile-menu li.active-page {
    position: relative;
    background-color: rgba(31, 141, 79, 0.05);
}
.mobile-menu > .mobile-nav-item.active-page::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 4px;
    background-color: #1F8D4F;
    border-radius: 2px;
}
.mobile-dropdown-menu li.active-page::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 4px;
    background-color: #1F8D4F;
    border-radius: 2px;
}
.mobile-menu > .mobile-nav-item.active-page > a {
    color: #1F8D4F;
    font-weight: 600;
}
.mobile-dropdown-menu li.active-page > a {
    color: #1F8D4F;
    font-weight: 600;
}
.mobile-dropdown.has-active-child > .mobile-dropdown-header > .mobile-nav-link {
    color: #1F8D4F;
    font-weight: 600;
}

/* =========================
   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;
    }
}