/* MOBILE STYLES
============================================= */

/* Ogólne style mobilne */
@media screen and (max-width: 991px) {

    /* Responsywne fonty używające clamp */
    html {
        font-size: 95%;
    }

    /* Ujednolicone rozmiary nagłówków */
    h1,
    .hero-heading {
        font-size: clamp(2rem, 5vw, 2.5rem);
        line-height: 1.2;
    }

    h2,
    .section-header h2,
    .coffins-section .section-header h2 {
        font-size: clamp(1.8rem, 4vw, 2.2rem);
        line-height: 1.3;
    }

    h3 {
        font-size: clamp(1.5rem, 3.5vw, 1.8rem);
        line-height: 1.4;
    }

    h4,
    h5,
    h6 {
        font-size: clamp(1.2rem, 3vw, 1.5rem);
        line-height: 1.4;
    }

    /* Ujednolicone nagłówki w specjalnych sekcjach */
    .ceremony-section h2,
    .cremation-section h2 {
        font-size: clamp(1.8rem, 4vw, 2.2rem);
        line-height: 1.3;
        word-wrap: break-word;
        hyphens: auto;
        width: 100%;
    }

    p,
    a,
    li,
    span {
        font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    }

    .container {
        width: 100%;
        padding: 0 15px;
    }

    body {
        overflow-x: hidden;
        /*padding-bottom: 60px;*/
    }

    /* Ukrywanie sidebara na mobilce - usunięte, zarządzane przez media query w header.css */

    /* Header i nawigacja - wysokość zmniejszona */
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 5px 15px;
        max-height: 60px;
        overflow: visible;
        transition: all 0.3s ease;
    }

    .logo {
        text-align: left;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        height: 100%;
        transition: all 0.3s ease;
    }

    /* Po przewinięciu logo przechodzi na środek */
    .header.scrolled .header-container {
        justify-content: center;
    }

    .logo-img {
        max-width: 150px;
        max-height: 50px;
    }

    /* Płytki nawigacyjne - ukryte na mobilce */
    .nav-tiles-container {
        display: none;
    }

    /* Ukryj dane kontaktowe na mobilce */
    .hero-contact-strip {
        display: none;
    }

    /* Przyciski mobilnej nawigacji - zastępują navbar */
    .mobile-nav-buttons {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.85);
        z-index: 95;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    }

    .mobile-nav-button {
        flex: 1;
        text-align: center;
        padding: 10px 0;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-button:last-child {
        border-right: none;
    }

    .mobile-nav-button a {
        color: white;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.7rem;
    }

    .mobile-nav-button span.material-icons-outlined {
        font-size: 24px;
        margin-bottom: 2px;
        color: gold;
    }

    .mobile-nav-button span {
        font-size: 0.7rem;
        font-weight: 500;
        letter-spacing: 0.5px;
        color: white !important;
    }

    /* Mobile menu */
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 30px;
        right: 15px;
        z-index: 1000;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle span {
        color: white;
    }

    .mobile-menu-toggle:hover {
        background-color: var(--primary-color);
    }

    .mobile-menu-toggle.scrolled {
        top: 50%;
        transform: translateY(-50%);
    }

    .mobile-menu-toggle.hidden {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: 999;
        display: none;
        overflow-y: auto;
    }

    .mobile-menu.active {
        display: block;
    }

    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    .mobile-menu-content {
        padding: 15px;
    }

    .mobile-menu-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu-nav li {
        border-bottom: 1px solid #eee;
    }

    .mobile-menu-nav a {
        display: block;
        padding: 15px 0;
        text-decoration: none;
        color: #333;
        font-weight: 500;
    }

    /* Poprawki dla submenu w menu mobilnym */
    .mobile-menu-nav .has-submenu .submenu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        width: 100%;
        position: relative;
    }

    .mobile-menu-nav .has-submenu .submenu-header a {
        flex: 1;
        padding: 15px 0;
        padding-right: 50px;
        /* Miejsce dla strzałki */
    }

    .mobile-menu-nav .submenu-toggle {
        padding: 8px 15px;
        cursor: pointer;
        font-size: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        height: 100%;
        width: 50px;
    }

    .mobile-menu-footer {
        padding: 15px;
        border-top: 1px solid #eee;
    }

    /* Hero section - poprawiona dla mobilki */
    .hero {
        min-height: 70vh;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        overflow: hidden;
        margin-top: 60px;
        /* Zmniejszone odsunięcie od nawigacji */
    }

    .hero-content {
        padding: 20px 15px;
        text-align: center;
        width: 100%;
        max-width: 100%;
        z-index: 5;
        position: relative;
    }

    .hero-heading-container {
        margin-bottom: 20px;
        overflow: visible;
        height: auto;
        min-height: 120px;
        width: 100%;
        position: relative;
    }

    .hero-heading {
        line-height: 1.2;
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
        word-wrap: break-word;
        hyphens: auto;
    }

    .hero-heading .heading-line {
        margin-bottom: 15px;
        opacity: 0;
        position: absolute;
        left: 0;
        right: 0;
        width: 100%;
        display: block;
        text-align: center;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .hero-heading .heading-line.current {
        opacity: 1;
        position: relative;
    }

    .hero-content p {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        margin-bottom: 25px;
        letter-spacing: 0.5px;
    }

    .hero-buttons {
        margin-top: 20px;
    }

    .cta-button {
        font-size: 0.9rem;
        padding: 12px 20px;
        display: inline-block;
        width: auto;
        min-width: 200px;
    }

    .scroll-arrow-left {
        display: none;
    }

    /* About section */
    .about-firm-container {
        flex-direction: column;
    }

    .text-column,
    .logo-column,
    .quote-column {
        width: 100%;
        padding: 15px;
        text-align: center;
    }

    /*.logo-circle {
        margin: 30px auto;
    }*/

    /* Help section */
    .services-carousel-container {
        overflow-x: auto;
    }

    .services-carousel {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 15px;
    }

    .help-item {
        min-width: 200px;
        margin: 0 10px;
    }

    /* Ceremony section - treść nad slajderem */
    .ceremony-container {
        flex-direction: column;
        margin-bottom: 40px;
    }

    .ceremony-content,
    .ceremony-slider {
        width: 100%;
        padding: 15px;
    }

    /* Cremation section - slajder nad treścią (odwrócony układ w stosunku do ceremony) */
    .cremation-container {
        flex-direction: column-reverse;
        margin-bottom: 40px;
    }

    .cremation-content,
    .cremation-slider {
        width: 100%;
        padding: 15px;
    }

    /* Sekcja z usługami międzynarodowymi - poprawiona */
    .ceremony-section h2,
    .cremation-section h2 {
        word-wrap: break-word;
        hyphens: auto;
        width: 100%;
    }

    /* Sekcja z trumnami - poprawiona dla mobilki */
    .coffins-section {
        padding: 40px 0;
        overflow: hidden;
        position: relative;
        clear: both;
        margin-top: 40px;
    }

    .coffins-container {
        flex-direction: column;
    }

    .coffins-content {
        width: 100%;
        padding: 15px;
        margin-bottom: 15px;
    }

    /* Ukryj oryginalną galerię na mobilce */
    .coffins-gallery {
        display: none;
    }

    /* Mobilny slider dla trumien */
    .mobile-coffins-slider {
        display: block;
        width: 100%;
        overflow: hidden;
        margin: 0 auto 30px;
        position: relative;
    }

    .mobile-coffins-slider-inner {
        display: flex;
        transition: transform 0.5s ease;
    }

    .mobile-coffin-slide {
        min-width: 100%;
        padding: 0 15px;
    }

    .mobile-coffin-slide img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        display: block;
        object-fit: cover;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-coffins-controls {
        display: flex;
        justify-content: center;
        margin-top: 15px;
        gap: 10px;
    }

    .mobile-coffins-prev,
    .mobile-coffins-next {
        background-color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        cursor: pointer;
    }

    .mobile-coffins-prev i,
    .mobile-coffins-next i {
        font-size: 18px;
        color: #333;
    }

    /* Odstępy między sekcjami */
    section {
        margin-bottom: 30px;
        padding-top: 30px;
        padding-bottom: 30px;
        clear: both;
    }

    /* Testimonials section - poprawione dla mobilki */
    /*.testimonials-section {
        padding: 40px 0;
        overflow: hidden;
        position: relative;
        clear: both;
        margin-top: 60px;
    }*/

    .testimonials-container {
        flex-direction: column;
    }

    .testimonials-image,
    .testimonials-carousel {
        width: 100%;
    }

    .testimonials-image {
        margin-bottom: 30px;
        text-align: center;
    }

    .testimonials-image img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }

    .testimonial-items {
        position: relative;
        height: auto;
        min-height: 300px;
        /* Zwiększona minimalna wysokość dla kontenera */
        margin-bottom: 20px;
    }

    .testimonial-item {
        position: absolute;
        width: 100%;
        margin: 0;
        left: 0;
        transition: all 0.5s ease;
        opacity: 0;
        transform: translateX(50px);
        padding: 15px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        background-color: white;
        border-radius: 8px;
    }

    .testimonial-item.current {
        opacity: 1;
        transform: translateX(0);
        z-index: 10;
    }

    .testimonial-item.next {
        opacity: 0;
        transform: translateX(50px);
        z-index: 5;
    }

    .testimonial-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }

    .testimonial-content {
        margin-bottom: 10px;
    }

    .testimonial-content p {
        margin-bottom: 0;
        line-height: 1.5;
    }

    .testimonial-author {
        font-weight: bold;
        margin-bottom: 5px;
    }

    .testimonial-rating {
        color: #FFD700;
        margin-bottom: 5px;
    }

    .testimonial-controls {
        position: relative;
        z-index: 20;
        margin-top: 20px;
        display: flex;
        justify-content: center;
    }

    .testimonial-prev,
    .testimonial-next {
        margin: 0 10px;
        background-color: transparent;
        border: none;
        color: #333;
        cursor: pointer;
        padding: 5px 10px;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        background-color: white;
    }

    .testimonial-prev i,
    .testimonial-next i {
        font-size: 18px;
    }

    .testimonials-footer {
        text-align: center;
        margin-top: 20px;
    }

    .testimonials-link {
        display: inline-flex;
        align-items: center;
        text-decoration: none;
        color: #333;
        font-size: 0.9rem;
        padding: 10px 15px;
        border-radius: 30px;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .testimonials-link img {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    /* Footer */
    .footer-locations {
        flex-wrap: wrap;
    }

    .location-item {
        width: 100%;
        margin-bottom: 30px;
    }

    .footer-links .links-container {
        column-count: 1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links,
    .footer-realization {
        margin-top: 15px;
    }

    /* Footer dodatkowy padding */
    .footer {
        padding-bottom: 80px;
    }

    /* Floating elements - poprawione dla mobilki */
    .floating-contact,
    .floating-address,
    .call-button {
        position: fixed;
        z-index: 90;
        transition: all 0.3s ease;
    }

    /* Ukryj floating-contact-left na mobilce */
    .floating-contact-left {
        display: none;
    }

    /* Ukryj floating-contact z klasą mobile-position tylko na mobilce */
    .floating-contact.mobile-position,
    .floating-contact.visible {
        display: none !important;
    }

    .floating-contact {
        bottom: 80px;
        right: 20px;
        display: none;
    }

    .floating-address {
        display: none;
    }

    .call-button {
        bottom: 80px;
        left: 20px;
        display: flex;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .call-button a,
    .floating-contact a {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(0, 0, 0, 0.8);
        color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    /* Back to top button - poprawione */
    .back-to-top {
        position: fixed;
        bottom: 80px;
        right: 20px;
        z-index: 90;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .back-to-top.active {
        opacity: 1;
        visibility: visible;
        z-index: 999;
    }

    .scroll-progress {
        width: 40px;
        height: 40px;
        background-color: rgba(0, 0, 0, 0.7);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .progress-circle {
        display: none;
    }

    .back-to-top-icon {
        color: white;
        font-size: 24px;
    }

    /* Ulepszony wygląd sekcji kontaktowej */
    .mobile-contact-info {
        margin-top: 20px;
        background: #f8f8f8;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .mobile-contact-info p {
        margin: 10px 0;
        display: flex;
        align-items: center;
        font-size: 16px !important;
    }
    .mobile-contact-info p .material-icons-outlined {
        margin-right: 10px;
        color: #333;
        font-size: 20px;
    }
}

    .mobile-contact-info-href{
        display: flex !important;
        align-items: center !important;
        font-size: 16px !important;
    }

/* Dla bardzo małych ekranów (telefony) */
@media screen and (max-width: 576px) {

    /* Jeszcze mniejsze fonty */
    html {
        font-size: 90%;
    }

    /* Ujednolicone rozmiary nagłówków dla bardzo małych ekranów */
    h1,
    .hero-heading {
        font-size: clamp(1.8rem, 4.5vw, 2.1rem);
        line-height: 1.2;
    }

    h2,
    .section-header h2,
    .coffins-section .section-header h2 {
        font-size: clamp(1.6rem, 4vw, 1.9rem);
        line-height: 1.3;
    }

    h3 {
        font-size: clamp(1.4rem, 3.5vw, 1.6rem);
        line-height: 1.4;
    }

    /* Hero heading container z dostosowaną wysokością */
    .hero-heading-container {
        min-height: 100px;
    }

    /* Logo mniejsze dla telefonów */
    .logo-img {
        max-width: 130px;
        max-height: 40px;
    }

    /* Header mniejszy */
    .header-container {
        max-height: 50px;
    }

    /* Hero przesuń w dół od headera */
    .hero {
        margin-top: 50px;
    }

    .hero-content p {
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        margin-bottom: 20px;
    }

    .cta-button {
        font-size: 0.8rem;
        padding: 10px 15px;
        min-width: 180px;
    }

    .nav-tile {
        width: 100%;
        margin: 5px 0;
    }

    /* Dodatkowe poprawki dla sekcji trumien na małych ekranach */
    .coffin-image {
        margin-bottom: 15px;
    }

    .coffins-content p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .oval-button {
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    /* Mniejsze odstępy dla małych ekranów */
    section {
        margin-bottom: 20px;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    /* Testimonials dla bardzo małych ekranów */
    .testimonial-item {
        padding: 10px;
    }

    .testimonial-content p {
        font-size: 0.9rem;
    }

    .testimonial-author {
        font-size: 1rem;
    }

    /* Sekcja z usługami na małych ekranach */
    .ceremony-section h2,
    .cremation-section h2 {
        font-size: clamp(1.3rem, 4.5vw, 1.6rem);
    }

    /* Floating buttons - większy odstęp */
    .floating-contact,
    .call-button,
    .back-to-top {
        bottom: 75px;
    }

    .floating-contact {
        right: 15px;
    }

    .call-button {
        left: 15px;
    }

    .back-to-top {
        right: 15px;
    }

    .call-button a,
    .floating-contact a,
    .scroll-progress {
        width: 45px;
        height: 45px;
    }

    /* Poprawka dla mobilnej nawigacji */
    .mobile-nav-button span {
        font-size: 0.65rem;
    }
}

/* Mobilne menu */
.mobile-menu-toggle {
    display: none;
}

@media screen and (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Submenu w mobilnym menu */
.mobile-submenu {
    display: none;
    padding-left: 15px;
    background: #f9f9f9;
}

.mobile-submenu.active {
    display: block;
}

.submenu-toggle {
    transition: transform 0.3s ease;
}

.submenu-toggle.active {
    transform: rotate(180deg);
}

/* Bezwzględne ukrycie floating-contact z klasami mobile-position i visible tylko na urządzeniach mobilnych */
@media screen and (max-width: 991px) {
    .floating-contact.mobile-position.visible {
        display: none !important;
    }
}

/* Przywrócenie floating-contact dla desktopa */
@media screen and (min-width: 992px) {

    .floating-contact,
    .floating-address {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }

    /* Dodatkowa klasa dla przycisku na desktopie */
    .floating-contact.visible,
    .floating-address.visible {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }

    /* Ukryj menu mobilne na desktopie */
    .mobile-menu {
        display: none !important;
    }
}

/* Poprawa wyglądu przycisku zamykania */
.close-menu,
.close-mobile-menu {
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu span,
.close-mobile-menu span {
    font-size: 28px;
    color: #333;
}

.call-button span {
    color: white;
}

/* Mobilny slider - ukryty na desktopie */
.mobile-coffins-slider {
    display: none;
}

@media screen and (max-width: 991px) {

    /* Ukryj oryginalną galerię na mobilce */
    .coffins-gallery {
        display: none;
    }

    /* Mobilny slider dla trumien */
    .mobile-coffins-slider {
        display: block;
        width: 100%;
        overflow: hidden;
        margin: 0 auto 30px;
        position: relative;
    }
}

/* Nagłówki w specjalnych sekcjach - właściwości specyficzne*/
.ceremony-section h2,
.cremation-section h2 {
    word-wrap: break-word;
    hyphens: auto;
}