/* Global responsive improvements */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    h1, .h1 {
        font-size: 1.75rem;
    }

    h2, .h2 {
        font-size: 1.5rem;
    }

    h3, .h3 {
        font-size: 1.25rem;
    }

    /* Spacing adjustments */
    section {
        padding: 2.5rem 0;
    }

    .section-title {
        margin-bottom: 1.5rem;
    }

    /* Hero section improvements */
    .hero-section {
        min-height: 400px;
        padding: 80px 0 100px;
    }

    .hero-section h1 {
        margin-bottom: 0.5rem;
    }

    .hero-section .lead {
        margin-bottom: 2rem;
    }

    .reservation-banner {
        margin: 0 10px;
        max-width: 100%;
    }

    .reservation-form {
        padding: 15px;
    }

    .reservation-form .row {
        row-gap: 0.75rem !important;
    }

    /* About section improvements */
    .about-image img {
        margin-bottom: 1.5rem;
    }

    .badge-item {
        padding: 8px 10px;
        margin-bottom: 0.5rem;
    }

    .badge-item i {
        font-size: 1.1rem;
        margin-right: 8px;
    }

    .badge-item span {
        font-size: 0.75rem;
    }

    /* Advantages section improvements */
    .usp-cards {
        margin-left: -8px;
        margin-right: -8px;
    }

    .usp-cards [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* Advantages cards - 2 columns on mobile, centered */
    .usp-cards {
        justify-content: center;
    }

    .value-prop-card {
        padding: 25px 20px;
        margin-bottom: 1.5rem;
        text-align: center;
        max-width: 100%;
    }

    .value-prop-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
        margin-left: auto;
        margin-right: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .value-prop-icon i {
        font-size: 2rem;
    }

    .value-prop-card h4 {
        font-size: 1.15rem;
        margin-bottom: 10px;
        text-align: center;
        width: 100%;
    }

    .value-prop-card p {
        font-size: 0.9rem;
        line-height: 1.5;
        text-align: center;
        width: 100%;
    }

    /* Amenities section improvements */
    .amenity-card {
        padding: 20px 12px;
        margin-bottom: 0;
        min-height: 180px;
    }

    .amenity-card i {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .amenity-card h5 {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .amenity-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    /* Ensure proper spacing in the amenities grid - 2 columns on mobile */
    .amenities-section .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    .amenities-section [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* Gallery section improvements */
    .gallery-item {
        margin-bottom: 10px;
    }

    /* Availability section improvements */
    .calendar-container {
        padding: 10px;
        margin: 0 -15px;
        border-radius: 0;
    }

    .calendar-legend {
        margin-top: 15px;
        font-size: 0.8rem;
    }

    .calendar-actions .btn {
        margin-bottom: 10px;
        width: 100%;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Location section improvements */
    .map-container {
        margin: 0 -15px;
        border-radius: 0;
    }

    .map-container iframe {
        height: 250px;
    }

    .location-info {
        padding: 15px;
        font-size: 0.9rem;
    }

    /* FAQ section improvements */
    .accordion-button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .accordion-body {
        padding: 15px;
        font-size: 0.85rem;
    }

    /* Final CTA section improvements */
    .final-cta-section {
        padding: 60px 0 40px;
    }

    .final-cta-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .final-cta-section p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .final-cta-section .btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Decorative elements adjustments */
    .ski-trail-decoration {
        transform: rotate(-15deg) scale(0.5);
        opacity: 0.1;
        top: 30px !important;
        right: -20px !important;
        width: 150px;
        height: 150px;
    }

    .wave-separator {
        height: 40px;
        margin: 0;
    }
}

/* Small devices (landscape phones, 576px to 767.98px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography adjustments */
    h1, .h1 {
        font-size: 2rem;
    }

    h2, .h2 {
        font-size: 1.75rem;
    }

    /* Spacing adjustments */
    section {
        padding: 3rem 0;
    }

    /* Hero section improvements */
    .hero-section {
        min-height: 450px;
    }

    .reservation-banner {
        max-width: 90%;
    }

    /* About section improvements */
    .badge-item {
        padding: 8px 12px;
    }

    .badge-item i {
        font-size: 1.3rem;
    }

    .badge-item span {
        font-size: 0.85rem;
    }

    /* Advantages section improvements */
    .value-prop-card {
        padding: 25px 20px;
    }

    .value-prop-icon {
        width: 70px;
        height: 70px;
    }

    /* Amenities section improvements - 2 columns layout maintained */
    .amenity-card {
        padding: 25px 15px;
        min-height: 200px;
    }

    .amenity-card i {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .amenity-card h5 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .amenity-card p {
        font-size: 0.85rem;
    }

    /* Ensure proper spacing and alignment for the amenities grid */
    .amenities-section .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .amenities-section [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Gallery section improvements */
    .gallery-item {
        margin-bottom: 20px;
    }

    /* Availability section improvements */
    .calendar-container {
        padding: 15px;
    }

    /* Location section improvements */
    .map-container iframe {
        height: 350px;
    }

    /* Decorative elements adjustments */
    .ski-trail-decoration {
        transform: rotate(-15deg) scale(0.65);
        opacity: 0.11;
        top: 40px !important;
        right: 10px !important;
    }

    .wave-separator {
        height: 50px;
        margin: 0;
    }
}

/* Medium devices (tablets, 768px to 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Spacing adjustments */

    /* Decorative elements adjustments */
    .ski-trail-decoration {
        transform: rotate(-15deg) scale(0.75);
        opacity: 0.12;
        top: 50px !important;
        right: 30px !important;
    }

    .wave-separator {
        height: 60px;
        margin: 0;
    }
    section {
        padding: 4rem 0;
    }

    /* Hero section improvements */
    .hero-section {
        min-height: 500px;
    }

    /* About section improvements */
    .about-image img {
        margin-bottom: 0;
    }

    /* Advantages section improvements */
    .value-prop-card {
        padding: 30px 20px;
    }

    /* Amenities section improvements - 4 columns layout */
    .amenity-card {
        height: 100%;
        min-height: 220px;
    }

    .amenity-card i {
        font-size: 2.3rem;
        margin-bottom: 12px;
    }

    .amenity-card h5 {
        font-size: 1.05rem;
    }

    .amenity-card p {
        font-size: 0.88rem;
    }

    /* Ensure proper spacing and alignment for the amenities grid - 4 columns */
    .amenities-section .row {
        margin-left: -12px;
        margin-right: -12px;
    }

    .amenities-section [class*="col-"] {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Footer improvements */
    footer .container > .row > div:nth-child(3) {
        margin-top: 2rem;
    }
}

/* Fix for layout shifts and overlapping elements */
.container {
    overflow-x: hidden;
}

/* Ensure images scale properly */
img {
    max-width: 100%;
    height: auto;
}

/* Improve button spacing on mobile */
.btn {
    margin-bottom: 0.5rem;
}

/* Fix for decorative elements on small screens */
@media (max-width: 767.98px) {
    .ski-trail-decoration {
        max-width: 150px;
        max-height: 150px;
    }

    .hero-section::after {
        height: 50px;
    }

    .advantages-section::after {
        height: 50px;
    }

    .final-cta-section::before {
        height: 50px;
    }
}

/* Improve text readability */
@media (max-width: 575.98px) {
    body {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    p {
        margin-bottom: 1rem;
    }

    .lead {
        font-size: 1rem;
        line-height: 1.5;
    }
}

/* Fix for sticky header on mobile */
@media (max-width: 767.98px) {
    body.has-sticky-header main {
        padding-top: 80px; /* Increased to accommodate larger logo */
    }

    .sticky-header .navbar {
        padding: 0.5rem 0;
    }
}

/* Fix for navbar on mobile */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 8px 8px;
    }

    .nav-link {
        padding: 0.5rem 0;
    }
}

/* Fix for footer on mobile */
@media (max-width: 767.98px) {
    footer {
        padding: 2rem 0 1rem;
    }

    footer h5 {
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }
}

/* Fix for calendar on mobile */
@media (max-width: 767.98px) {
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .fc .fc-toolbar-title {
        font-size: 1.2rem;
    }
}
