/* Responsive Styles */
/* Ordered from largest to smallest breakpoints for proper CSS cascading */

@media (max-width: 2100px) {
    .why-us-img-wrapper {
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 1800px) {
    .why-us-img-wrapper {
        aspect-ratio: 1 / 1.2;
    }
}

/* Custom large breakpoint (≥1550px) */
@media (max-width: 1550px) {
    .hero-section {
        height: 92vh;
    }
    .hero-content {
        padding: 5rem 0;
    }
    .why-us-img-wrapper {
        aspect-ratio: 1 / 1.4;
    }
}

@media (max-width: 1399.98px) {
    .header .navbar-nav .nav-link {
        font-size: 0.85rem;
    }
    
    .district-card {
        height: 120px;
    }

    .header .navbar-nav {
        gap: 1.5rem !important;
    }

    .why-us-img-wrapper {
        aspect-ratio: 1 / 1.7;
    }
    .why-us-img-wrapper img {
        object-fit: cover;
        height: 100%;
    }
    .hero-detail-section {
        height: auto !important;
        min-height: auto !important;
        display: flex;
        flex-direction: column;
    }
    .hero-bg-image {
        position: relative !important;
        height: 350px !important;
        order: 1;
    }
    .property-cta-box {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        right: auto !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        order: 2;
        box-shadow: none !important;
    }
    .hero-content-overlay {
        position: absolute !important;
        height: 350px !important;
        top: 0;
        left: 0;
    }
}

@media (max-width: 1300px) {
    .why-us-img-wrapper {
        aspect-ratio: 1 / 1.9;
    }
}

@media (max-width: 1250px) {
    .why-us-img-wrapper {
        aspect-ratio: 1 / 2;
    }
}

/* XL - Extra large devices (large desktops, <1200px) */
@media (max-width: 1199.98px) {
    h1 {
        font-size: 3.4rem;
    }
    
    h2, h3, h4, h5, h6 {
        font-size: 2rem;
    }
    .why-us-section {
        position: relative;
        overflow: hidden;
        padding: 4rem 0;
    }
    .about-image-wrapper {
        position: relative;
        width: 100%;
        height: 500px;
    }
    
    .about-content-wrapper {
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .about-text-card {
        padding: 2.5rem 2rem;
        margin-top: -100px;
        margin-left: 1.5rem;
        margin-right: 1.5rem;
        margin-bottom: 3rem;
    }
}

/* LG - Large devices (desktops, <992px) */
@media (max-width: 991.98px) {
    .section-padding, .why-us-section {
        padding: 3.5rem 0rem;
    }
    .header-nav {
        display: none;
    }
    
    .header-spacer {
        display: block;
    }
    
    .header-mobile-toggler {
        display: block;
    }
    .header-contact-icons {
        display: none;
    }
    .hero-section {
        height: auto;
        min-height: 150vh;
    }
    .hero-content {
        padding: 5rem 0;
        height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-search {
        padding: 2rem;
    }
    
    /* Typography */
    h1 {
        font-size: 3rem;
    }
    

    .header .logo img {
        height: 35px;
    }

    .header .navbar-toggler {
        font-size: 2rem;
    }

    /* Mobile Menu */
    #mobileNav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        background-color: #f5f5f5;
        padding: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1050;
        display: flex;
        flex-direction: column;
    }

    #mobileNav.show {
        transform: translateX(0);
    }

    #mobileNav .navbar-nav {
        text-align: center;
        margin-top: 3rem;
        order: 1;
    }

    .mobile-contact-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 0;
        margin-top: 2rem;
        order: 2;
        width: 100%;
    }

    .mobile-contact-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem 1.5rem;
        background-color: #930e33;
        color: white;
        text-decoration: none;
        border-radius: 4px;
        font-size: 1rem;
        transition: background-color 0.3s ease;
        width: 100%;
    }

    .mobile-contact-btn:hover {
        background-color: #b01340;
        color: white;
    }

    .mobile-contact-btn i {
        font-size: 1.2rem;
    }

    #mobileNav .navbar-nav .nav-link {
        color: #930e33;
        font-size: 1.1rem;
        padding: 1.5rem 0;
        border-bottom: 1px solid #ddd;
    }

    #mobileNav .navbar-nav .nav-link:hover {
        color: #b01340;
    }

    .hero-search select.form-control.custom-select {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        transform: none !important;
        display: block !important;
    }

    .about-text-card {
        margin-bottom: 0rem;
    }

    .footer-map-section {
        display: flex;
        flex-direction: column;
        height: auto;
        margin-top: 0;
        padding-bottom: 0;
    }
    
    .footer-map-section .map-container {
        position: relative !important;
        height: 400px !important;
        order: 2;
    }
    
    .footer-map-section > .container {
        order: 1;
        pointer-events: auto !important;
        padding-top: 3rem;
        padding-bottom: 3rem;
        background-color: #f8f9fa;
    }
    
    .footer-contact-card {
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.05) !important;
        padding-top: 0rem !important;
    }

    .sticky-lg-content {
        position: static;
    }
}

/* MD - Medium devices (tablets, <768px) */
@media (max-width: 767.98px) {
    body {
        text-align: center;
    }
    
    h1 {
        font-size: 2.4rem;
    }
    
    h2, h3, h4, h5, h6 {
        font-size: 1.8rem;
    }

    .property-description ul {
        padding-left: 0;
    }

    .property-description ul li {
        padding-left: 0;
    }

    .property-description ul li::before {
        position: static;
        margin-right: 0.5rem;
    }

    /* Building Info Table Responsive */
    .building-info-table tr {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .building-info-table td {
        display: block;
        width: auto !important;
        padding: 0 !important;
        border: none;
    }
    .offer-address {
        justify-content: center;
    }
    .district-link {
        font-size: 1rem;
    }
    
    .references-controls {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .references-controls .references-arrows {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 0 !important;
        justify-content: center;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    .why-us-card {
        align-items: center !important;
    }

    .about-text-card {
        margin-left: 0;
        margin-right: 0;
    }
}

/* SM - Small devices (phones, <576px) */
@media (max-width: 575.98px) {
    body {
        font-size: 0.875rem;
        text-align: center;
    }
    footer {
      font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    }
    .section-padding, .why-us-section {
        padding: 3rem 0rem;
    }
    h1 {
        font-size: 2rem;
    }
    
    h2, h3, h4, h5, h6, .advice-modal-title {
        font-size: 1.8rem;
    }
    
    .btn-primary,
    .white-btn,
    .btn-white-custom {
        font-size: 0.875rem;
        padding: 0.6rem 1.5rem;
    }

    .hero-content {
        padding: 3rem 0;
    }
    .hero-section {
        min-height: 130vh;
    }

    /* Splide adjustments */
    .hero-slider .splide__pagination {
        bottom: 7rem;
    }

    .hero-slider .splide__arrows {
        left: 50%;
        transform: translateX(-50%);
    }

    .district-link {
        font-size: 0.9rem;
    }
    .references-arrows .custom-arrow {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    .reference-text {
        font-size: 0.875rem !important;
    }
    .reference-name {
        font-size: 1rem !important;
    }
    .reference-meta {
        font-size: 0.75rem !important;
    }
    .why-us-card h5 {
        font-size: 1.125rem;
    }

    .about-text-card {
        margin-left: 1rem;
        margin-right: 1rem;
        padding: 2rem 1.5rem;
    }

    .offer-detail-section .small {
        font-size: 0.875rem;
    }

    .gallery-container .splide__slide {
        min-height: 0px;
    }

    .advice-modal-text {
        font-size: 0.9rem !important;
    }

    .custom-pagination-container .page-link {
        font-size: 0.875rem;
        padding: 0.4rem 0.75rem;
    }

    .commercial-terms-list .term-label {
        font-size: 0.875rem;
        text-align: start;
    }
    .property-map-container {
        height: 40vh !important;
        min-height: 300px !important;
    }
    .districts-grid-wrapper {
        border-radius: 0px;
    }
}

@media (max-width: 500px) {
    .email-indent {
        padding-left: 0;
        display: block;
    }
}