/* --- KOLOROWE RYTMY - RESPONSYWNOŚĆ STRONY GŁÓWNEJ --- */
/* Ten plik nie zmienia treści ani logiki strony. Poprawia tylko układ na tabletach i telefonach. */

@media (max-width: 900px) {
    body {
        background:
            radial-gradient(circle at 12% 8%, rgba(151, 137, 255, 0.28) 0, transparent 28%),
            radial-gradient(circle at 92% 20%, rgba(255, 211, 145, 0.52) 0, transparent 32%),
            radial-gradient(circle at 8% 74%, rgba(97, 217, 255, 0.48) 0, transparent 34%),
            linear-gradient(145deg, #f7fbff 0%, #ffeef7 44%, #eafcff 100%);
    }

    body::before,
    body::after {
        opacity: .55;
    }

    .main-container > .wow-element:has(.main-nav-toggle),
    .main-container > .wow-element:has(.tabs) {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        position: static !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .main-container,
    .hero-section {
        width: min(100% - 28px, 760px);
    }

    .hero-section {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 28px 0 10px;
        text-align: center;
    }

    .hero-section::before {
        inset: 10px -8px auto -8px;
        height: 100%;
        min-height: 610px;
        border-radius: 0 0 34px 34px;
    }

    .hero-visual {
        min-height: 310px;
        order: 1;
        align-items: center;
    }

    .hero-pig-card {
        width: min(320px, 78vw);
        min-height: 300px;
    }

    .hero-pig-card img {
        max-height: 330px;
    }

    .hero-content {
        order: 2;
        max-width: 650px;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: clamp(34px, 8.6vw, 48px);
        line-height: 1.08;
        letter-spacing: -1.1px;
    }

    .hero-content p {
        max-width: 560px;
        margin: 18px auto 24px;
        font-size: clamp(16px, 4.2vw, 19px);
        line-height: 1.5;
    }

    .hero-cta-group {
        justify-content: center;
        gap: 12px;
    }

    .btn-cta,
    .btn-submit {
        min-height: 52px;
        padding: 0 22px;
        font-size: 15px;
    }

    .wrapper {
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
        z-index: 10050 !important;
        overflow: visible !important;
    }

    .main-nav-toggle {
        position: fixed !important;
        top: 16px !important;
        right: 14px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 10080 !important;
        width: 54px !important;
        height: 54px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        border: 1px solid rgba(255,255,255,.72) !important;
        border-radius: 18px !important;
        background:
            radial-gradient(circle at 30% 20%, rgba(255,255,255,.92), rgba(255,255,255,.48) 42%, transparent 70%),
            linear-gradient(135deg, rgba(255,255,255,.86), rgba(236,248,255,.66)) !important;
        box-shadow: 0 16px 38px rgba(6, 48, 95, .24) !important;
        backdrop-filter: blur(18px) !important;
        cursor: pointer !important;
    }

    .main-nav-toggle span {
        width: 25px !important;
        height: 3px !important;
        display: block !important;
        border-radius: 999px !important;
        background: #06305f !important;
        transition: transform .22s ease, opacity .22s ease !important;
    }

    .main-nav-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg) !important;
    }

    .main-nav-toggle.open span:nth-child(2) {
        opacity: 0 !important;
    }

    .main-nav-toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg) !important;
    }

    .tabs {
        position: fixed !important;
        top: 80px !important;
        right: 12px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 10070 !important;
        width: min(360px, calc(100vw - 24px)) !important;
        max-width: calc(100vw - 24px) !important;
        display: none !important;
        grid-template-columns: 1fr !important;
        justify-content: stretch !important;
        gap: 9px !important;
        min-height: 0 !important;
        max-height: calc(100vh - 96px) !important;
        margin: 0 !important;
        padding: 14px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        border-radius: 26px !important;
        background:
            linear-gradient(145deg, rgba(255,255,255,.94), rgba(232,248,255,.84)),
            radial-gradient(circle at 8% 8%, rgba(255,139,69,.18), transparent 34%),
            radial-gradient(circle at 92% 96%, rgba(255,92,168,.16), transparent 38%) !important;
        border: 1px solid rgba(255,255,255,.88) !important;
        box-shadow: 0 22px 62px rgba(6, 48, 95, .28) !important;
        backdrop-filter: blur(22px) !important;
    }

    .tabs::before {
        content: "Menu" !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 48px !important;
        margin: 0 0 2px !important;
        padding: 0 16px !important;
        border-radius: 18px !important;
        background: linear-gradient(135deg, #06305f, #1669b6) !important;
        color: #fff !important;
        font-size: 16px !important;
        font-weight: 900 !important;
        letter-spacing: .3px !important;
        box-shadow: 0 12px 28px rgba(6, 48, 95, .22) !important;
    }

    .tabs.open {
        display: grid !important;
        animation: kr-mobile-menu-in .18s ease-out both !important;
    }

    .tabs .selector {
        display: none !important;
    }

    .tabs a,
    .tabs a.b2b-btn {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 50px !important;
        margin: 0 !important;
        padding: 13px 14px 13px 52px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        white-space: normal !important;
        text-align: left !important;
        line-height: 1.18 !important;
        font-size: 13px !important;
        border-radius: 18px !important;
        background: rgba(255,255,255,.72) !important;
        border: 1px solid rgba(255,255,255,.94) !important;
        color: #06305f !important;
        box-shadow: 0 8px 20px rgba(39, 74, 129, .08) !important;
        text-transform: uppercase !important;
    }

    .tabs a::before,
    .tabs a.b2b-btn::before {
        position: absolute !important;
        left: 13px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 28px !important;
        height: 28px !important;
        display: grid !important;
        place-items: center !important;
        border-radius: 11px !important;
        background: linear-gradient(135deg, rgba(97,217,255,.70), rgba(75,216,151,.46)) !important;
        color: #06305f !important;
        font-size: 14px !important;
        font-weight: 900 !important;
    }

    /* Usunięto przestarzałe reguły nth-of-type, które konfliktowały z navbar.php */
    .tabs a.active {
        background: linear-gradient(135deg, rgba(97,217,255,.78), rgba(75,216,151,.52)) !important;
        box-shadow: 0 10px 24px rgba(38,151,255,.16) !important;
    }

    .tabs a.b2b-btn {
        color: #ffffff !important;
        background: linear-gradient(135deg, #ff9b45, #ff624f) !important;
        border: 0 !important;
        box-shadow: 0 12px 28px rgba(255, 111, 75, .24) !important;
    }

    .tabs a.b2b-btn::before {
        background: rgba(255,255,255,.25) !important;
        color: #fff !important;
    }

    .tiles-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin: 24px auto 26px;
    }

    .nav-tile {
        min-height: 245px;
        padding: 28px 18px 54px;
        border-radius: 28px;
    }

    .nav-tile-icon {
        width: 68px;
        height: 68px;
        margin-bottom: 18px;
        font-size: 28px;
    }

    .nav-tile h3 {
        font-size: 21px;
    }

    .nav-tile p {
        font-size: 14px;
    }

    .video-gallery-section {
        margin: 8px auto 28px;
        padding: 28px 18px 32px;
        border-radius: 28px;
    }

    .section-intro h2 {
        font-size: clamp(28px, 7vw, 36px);
    }

    .section-intro p {
        font-size: 16px;
    }

    .video-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .video-wrapper {
        border-radius: 18px;
    }

    .video-title-overlay {
        padding: 28px 10px 12px;
        font-size: 13px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 28px;
    }

    .info-card,
    .info-card.about {
        height: auto;
        min-height: 0;
        padding: 30px 24px;
        border-radius: 28px;
    }

    .info-card.about {
        padding-bottom: 210px;
    }

    .info-card h2 {
        font-size: 27px;
    }

    .info-card p {
        font-size: 15.5px;
        line-height: 1.62;
    }

    .info-card.about::before {
        width: min(300px, 72vw);
        height: 150px;
        bottom: 36px;
    }

    .info-card.about::after {
        width: min(360px, 82vw);
        height: 200px;
        bottom: 48px;
    }

    .contact-section {
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 18px 0 34px;
        padding: 30px 24px;
        border-radius: 28px;
    }

    .contact-heading {
        justify-content: center;
        font-size: 30px;
    }

    #contactForm {
        grid-template-columns: 1fr;
    }

    .form-submit-wrap {
        text-align: center;
    }

    .video-modal {
        padding: 16px;
    }

    .video-modal iframe {
        width: 94vw;
        border-radius: 18px;
    }

    .video-modal-close {
        top: 18px;
        right: 22px;
        font-size: 44px;
    }
}

@media (max-width: 560px) {
    .main-container,
    .hero-section {
        width: calc(100% - 20px);
    }

    .hero-section {
        padding-top: 18px;
    }

    .hero-section::before {
        min-height: 560px;
        border-radius: 0 0 26px 26px;
    }

    .hero-visual {
        min-height: 255px;
    }

    .hero-visual::before {
        left: 10px;
        top: 72px;
        font-size: 30px;
    }

    .hero-visual::after {
        right: 14px;
        top: 108px;
        font-size: 27px;
    }

    .hero-pig-card {
        width: min(255px, 76vw);
        min-height: 245px;
    }

    .hero-pig-card img {
        max-height: 270px;
    }

    .hero-music-note {
        font-size: 24px;
    }

    .hero-content h1 {
        font-size: clamp(31px, 9.4vw, 38px);
    }

    .hero-content p {
        margin: 16px auto 22px;
        font-size: 15.5px;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-cta,
    .btn-submit {
        width: 100%;
        min-height: 50px;
        padding: 0 16px;
        font-size: 14px;
    }

    .main-nav-toggle {
        top: 12px !important;
        right: 10px !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 16px !important;
    }

    .tabs {
        top: 70px !important;
        right: 10px !important;
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        padding: 12px !important;
        border-radius: 22px !important;
    }

    .tabs a,
    .tabs a.b2b-btn {
        min-height: 48px !important;
        font-size: 12px !important;
        padding-left: 50px !important;
    }

    .tabs a:nth-of-type(3) {
        padding-left: 14px !important;
    }

    .tiles-section,
    .video-gallery,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .nav-tile {
        min-height: 218px;
        padding: 26px 20px 52px;
    }

    .video-gallery-section {
        padding: 24px 14px 28px;
    }

    .video-gallery {
        gap: 14px;
    }

    .center-btn-wrap {
        margin-top: 24px;
    }

    .info-card,
    .info-card.about,
    .contact-section {
        padding: 26px 18px;
    }

    .info-card.about {
        padding-bottom: 178px;
    }

    .info-card h2 {
        font-size: 25px;
    }

    .info-icon {
        font-size: 32px;
    }

    .info-card-decoration {
        font-size: 50px;
    }

    .info-card.about::before {
        width: min(250px, 72vw);
        height: 125px;
        bottom: 26px;
    }

    .info-card.about::after {
        width: min(300px, 82vw);
        height: 170px;
        bottom: 34px;
    }

    .contact-heading {
        font-size: 28px;
    }

    .form-control {
        min-height: 50px;
        padding: 14px 15px;
    }

    textarea.form-control {
        min-height: 120px;
    }

    #scrollToTopBtn {
        right: 14px !important;
        bottom: 20px !important;
        width: 50px !important;
        height: 50px !important;
        line-height: 50px !important;
    }
}

@media (max-width: 380px) {
    .hero-content h1 {
        font-size: 29px;
    }

    .section-intro h2 {
        font-size: 26px;
    }

    .video-title-overlay {
        font-size: 12px;
    }
}

@keyframes kr-mobile-menu-in {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
