/* Mobile responsive - show only 1 image on mobile */
@media (max-width: 767px) {
    .apartment-preview-img:nth-child(2),
    .apartment-preview-img:nth-child(3) {
        display: none;
    }
}

/* Custom Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
}

.custom-modal-content {
    position: relative;
    margin: 2% auto;
    padding: 20px;
    max-width: 90%;
    max-height: 90vh;
}

.booking-modal-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 700px;
    padding: 40px;
}

.custom-modal-close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s;
}

.booking-modal-content .custom-modal-close {
    color: #333;
}

.custom-modal-close:hover,
.custom-modal-close:focus {
    color: #999;
}

/* Gallery Styles */
.gallery-image-container {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.gallery-image-container img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    z-index: 10001;
}

.gallery-nav:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-counter {
    text-align: center;
    color: white;
    font-size: 18px;
    margin-top: 20px;
}

/* Contact Options */
.contact-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.contact-option:hover {
    border-color: var(--primary-color, #c5a47e);
    background-color: #f9f9f9;
    transform: translateY(-5px);
}

.contact-option i {
    color: var(--primary-color, #c5a47e);
}

/* Calendar Styles */
.calendar {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.calendar-header button {
    background: var(--primary-color, #c5a47e);
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.calendar-header button:hover {
    opacity: 0.8;
}

.calendar-header h5 {
    margin: 0;
    font-size: 18px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px 5px;
    background-color: #f5f5f5;
    font-size: 14px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    padding: 4px 2px;
}

.calendar-date {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.calendar-price {
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
    line-height: 1;
}

.calendar-day:hover {
    background-color: #f0f0f0;
}

.calendar-day.other-month {
    color: #ccc;
}

.calendar-day.other-month .calendar-price {
    opacity: 0.5;
}

.calendar-day.reserved {
    background-color: #ffebee;
    color: #c62828;
}

.calendar-day.reserved .calendar-date {
    font-weight: bold;
}

.calendar-day.available {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.calendar-day.today {
    border: 2px solid var(--primary-color, #c5a47e);
}

.calendar-day.today .calendar-date {
    font-weight: bold;
}

.calendar-legend-available,
.calendar-legend-reserved {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 5px;
}

.calendar-legend-available {
    background-color: #e8f5e9;
    border: 1px solid #2e7d32;
}

.calendar-legend-reserved {
    background-color: #ffebee;
    border: 1px solid #c62828;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-modal-content {
        max-width: 95%;
    }

    .booking-modal-content {
        padding: 20px;
    }

    .gallery-nav {
        font-size: 20px;
        padding: 10px 15px;
    }

    .gallery-prev {
        left: 5px;
    }

    .gallery-next {
        right: 5px;
    }

    .calendar-day-header {
        font-size: 11px;
        padding: 8px 2px;
    }

    .calendar-day {
        padding: 3px 1px;
    }

    .calendar-date {
        font-size: 13px;
    }

    .calendar-price {
        font-size: 9px;
        margin-top: 1px;
    }

    /* Amenities mobile adjustments */
    #apartments .bg-light .d-flex.align-items-center i {
        font-size: 14px !important;
    }

    #apartments .bg-light .d-flex.align-items-center span {
        font-size: 13px;
    }

    #apartment2 .bg-light .d-flex.align-items-center i {
        font-size: 14px !important;
    }

    #apartment2 .bg-light .d-flex.align-items-center span {
        font-size: 13px;
    }

    /* Footer mobile adjustments */
    footer .fs-60 {
        font-size: 36px !important;
    }

    footer h4 {
        font-size: 16px !important;
        margin-bottom: 4px !important;
    }

    footer p {
        font-size: 13px !important;
        margin-bottom: 0 !important;
    }

    footer .ms-3 {
        margin-left: 12px !important;
    }

    footer .row.g-4 {
        gap: 0 !important;
    }

    footer .col-lg-4.mb-sm-30 {
        margin-bottom: 0 !important;
    }

    footer .subfooter {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        font-size: 12px !important;
    }

    footer .container {
    }
}

/* ========================================= */
/* ENHANCED BURGER MENU FOR MOBILE */
/* ========================================= */

/* Modern burger icon styling */
@media (max-width: 991px) {
    #menu-btn {
        display: block !important;
        position: relative;
        width: 40px;
        height: 40px;
        background: rgba(197, 164, 126, 0.1);
        border-radius: 8px;
        transition: all 0.3s ease;
        padding: 8px;
    }

    #menu-btn:hover {
        background: rgba(197, 164, 126, 0.2);
        transform: scale(1.05);
    }

    #menu-btn:before {
        font-size: 22px;
        color: #c5a47e;
        transition: all 0.3s ease;
    }

    header.transparent #menu-btn:before,
    header:not(.scrolled) #menu-btn:before {
        color: #ffffff;
    }

    header.transparent #menu-btn {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }

    header.transparent #menu-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* Animated burger to X transformation */
    #menu-btn.menu-open {
        background: rgba(197, 164, 126, 0.2);
    }

    #menu-btn.menu-open:before {
        content: "\f00d";
        transform: rotate(90deg);
        color: #c5a47e;
    }

    /* Enhanced mobile menu overlay */
    header.header-mobile #mainmenu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: linear-gradient(135deg, rgba(40, 40, 40, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
        backdrop-filter: blur(20px);
        overflow-y: auto;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        padding: 80px 0 40px 0;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }

    header.header-mobile #mainmenu.show {
        left: 0;
    }

    /* Backdrop overlay */
    .mobile-menu-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    .mobile-menu-backdrop.show {
    }

    /* Mobile menu items styling */
    header.header-mobile #mainmenu > li {
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 0;
        transform: translateX(-20px);
        animation: slideInMenu 0.5s ease forwards;
    }

    header.header-mobile #mainmenu.show > li:nth-child(1) {
        animation-delay: 0.1s;
    }

    header.header-mobile #mainmenu.show > li:nth-child(2) {
        animation-delay: 0.2s;
    }

    header.header-mobile #mainmenu.show > li:nth-child(3) {
        animation-delay: 0.3s;
    }

    header.header-mobile #mainmenu.show > li:nth-child(4) {
        animation-delay: 0.4s;
    }

    @keyframes slideInMenu {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    header.header-mobile #mainmenu > li > a {
        display: block;
        padding: 18px 30px;
        color: #ffffff !important;
        font-size: 18px;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.3s ease;
        position: relative;
    }

    header.header-mobile #mainmenu > li > a:hover {
        background: rgba(197, 164, 126, 0.15);
        color: #c5a47e !important;
        padding-left: 40px;
    }

    header.header-mobile #mainmenu > li > a:before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 2px;
        background: #c5a47e;
        transition: width 0.3s ease;
    }

    header.header-mobile #mainmenu > li > a:hover:before {
        width: 20px;
        margin-left: 15px;
    }

    /* Close button in menu */
    header.header-mobile #mainmenu:before {
        content: '\f00d';
        font-family: FontAwesome;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 28px;
        color: #ffffff;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        transition: all 0.3s ease;
        z-index: 10000;
    }

    header.header-mobile #mainmenu:before:hover {
        background: rgba(197, 164, 126, 0.2);
        transform: rotate(90deg);
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Logo in mobile header adjustment */
    header.header-mobile .col-center a img {
        max-height: 50px;
        width: auto;
    }
}