/* ===== COMPREHENSIVE RESPONSIVE STYLES ===== */
/* Mobile-first approach with breakpoints: 320px, 480px, 576px, 768px, 992px, 1200px, 1400px */

/* ===== UNIVERSAL IMAGE & VIDEO RESPONSIVE ===== */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Images in containers */
figure img,
.image img,
[class*="__img"],
[class*="__image"] img,
[class*="-img"],
[class*="-image"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Background images containers */
[class*="__bg"],
[class*="__background"],
[class*="-bg"],
[class*="-background"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Video responsive */
video {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Responsive video container (16:9) */
.video-container,
.video-wrapper,
[class*="__video"],
[class*="-video"] {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container video,
.video-container iframe,
.video-wrapper video,
.video-wrapper iframe,
[class*="__video"] video,
[class*="__video"] iframe,
[class*="-video"] video,
[class*="-video"] iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* iframes (YouTube, Vimeo, Maps) */
iframe {
    max-width: 100%;
    border: 0;
}

/* Map containers */
.map,
[class*="__map"],
[class*="-map"] {
    width: 100%;
    height: 100%;
    min-height: 200px;
}

.map iframe,
[class*="__map"] iframe,
[class*="-map"] iframe {
    width: 100%;
    height: 100%;
    min-height: 200px;
}

/* Gallery images */
.gallery img,
[class*="gallery"] img,
[class*="__gallery"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card images */
[class*="card"] img,
[class*="Card"] img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Hero images */
[class*="hero"] img,
[class*="Hero"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slider/Carousel images */
[class*="slide"] img,
[class*="Slide"] img,
[class*="swiper"] img,
[class*="carousel"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== CSS VARIABLES FOR RESPONSIVE ===== */
:root {
    --container-padding: 40px;
}

@media (max-width: 768px) {
    :root {
        --container-padding: 20px;
        --header-h: 70px;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 16px;
        --header-h: 60px;
    }
}

/* ===== GLOBAL RESPONSIVE ===== */
html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}

/* Container responsive padding */
.container,
[class*="__container"] {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ===== HEADER RESPONSIVE ===== */
@media (max-width: 1200px) {
    .header__nav {
        display: none;
    }

    .header__phone span {
        display: none;
    }

    .header__phone {
        width: 44px;
        height: 44px;
        justify-content: center;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }

    .header__inner {
        height: 70px;
        padding: 0 20px;
    }

    .header__logo img {
        height: 32px !important;
    }

    .header__cta {
        display: none;
    }

    .header__right {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .header {
        height: 60px;
    }

    .header__inner {
        height: 60px;
        padding: 0 16px;
    }

    .header__logo img {
        height: 28px !important;
    }

    .header__phone {
        width: 40px;
        height: 40px;
    }

    .header__burger {
        width: 40px;
        height: 40px;
    }
}

/* ===== HERO SPLIT RESPONSIVE ===== */
.hero-split__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--header-h));
}

@media (max-width: 1200px) {
    .hero-split__container {
        grid-template-columns: 1.2fr 1fr;
    }

    .hero-split__heading {
        font-size: clamp(36px, 5vw, 56px);
    }
}

@media (max-width: 992px) {
    .hero-split__container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-split__left {
        padding: 80px 40px 60px;
        order: 1;
    }

    .hero-split__right {
        order: 0;
        height: 50vh;
        min-height: 300px;
        max-height: 500px;
    }

    .hero-split__heading {
        font-size: clamp(32px, 6vw, 48px);
    }

    .hero-split__text {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .hero-split__left {
        padding: 60px 20px 50px;
    }

    .hero-split__right {
        height: 40vh;
        min-height: 250px;
    }

    .hero-split__heading {
        font-size: clamp(28px, 7vw, 40px);
        margin-bottom: 16px;
    }

    .hero-split__text {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .hero-split__btn {
        width: 100%;
        justify-content: center;
        padding: 16px 32px;
    }

    .breadcrumb {
        font-size: 12px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .hero-split__left {
        padding: 40px 16px;
    }

    .hero-split__right {
        height: 35vh;
        min-height: 200px;
    }

    .hero-split__heading {
        font-size: 28px;
    }
}

/* ===== STATS SECTIONS RESPONSIVE ===== */
.invest-stats__grid,
.mgmt-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .invest-stats__grid,
    .mgmt-stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .invest-stat,
    .mgmt-stat {
        padding: 32px 16px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .invest-stat:nth-child(odd),
    .mgmt-stat:nth-child(odd) {
        border-right: 1px solid rgba(255,255,255,0.1);
    }

    .invest-stat:nth-child(3),
    .invest-stat:nth-child(4),
    .mgmt-stat:nth-child(3),
    .mgmt-stat:nth-child(4) {
        border-bottom: none;
    }

    .invest-stat__value,
    .mgmt-stat__value {
        font-size: 40px;
    }
}

@media (max-width: 576px) {
    .invest-stats__grid,
    .mgmt-stats__grid {
        grid-template-columns: 1fr;
    }

    .invest-stat,
    .mgmt-stat {
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 24px 16px;
    }

    .invest-stat:last-child,
    .mgmt-stat:last-child {
        border-bottom: none;
    }

    .invest-stat__value,
    .mgmt-stat__value {
        font-size: 36px;
    }

    .invest-stat__label,
    .mgmt-stat__label {
        font-size: 14px;
    }
}

/* ===== GRID SECTIONS RESPONSIVE ===== */
/* Services, Why-us, Formats grids */
.mgmt-services__grid,
.why-us__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 1200px) {
    .mgmt-services__grid,
    .why-us__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .mgmt-services__grid,
    .why-us__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mgmt-service,
    .why-us__item {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .mgmt-service,
    .why-us__item {
        padding: 24px 20px;
    }

    .mgmt-service__icon,
    .why-us__icon {
        width: 56px;
        height: 56px;
        margin-bottom: 20px;
    }

    .mgmt-service__title,
    .why-us__item h3 {
        font-size: 20px;
    }
}

/* ===== ADVANTAGES SECTION RESPONSIVE ===== */
.mgmt-advantages__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

@media (max-width: 768px) {
    .mgmt-advantages__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .mgmt-advantage {
        padding: 32px 24px;
        gap: 20px;
    }

    .mgmt-advantage__number {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .mgmt-advantage {
        padding: 24px 20px;
        flex-direction: column;
        gap: 16px;
    }

    .mgmt-advantage__number {
        font-size: 36px;
    }
}

/* ===== INVEST FORMATS SECTION RESPONSIVE ===== */
.invest-formats__item {
    display: grid;
    grid-template-columns: 80px 1fr 400px;
    gap: 40px;
    align-items: center;
}

@media (max-width: 1200px) {
    .invest-formats__item {
        grid-template-columns: 60px 1fr 300px;
        gap: 24px;
    }

    .invest-formats__image {
        width: 300px;
        height: 200px;
    }
}

@media (max-width: 992px) {
    .invest-formats__item {
        grid-template-columns: 60px 1fr;
    }

    .invest-formats__image {
        display: none;
    }

    .invest-formats__number {
        font-size: 36px;
    }
}

@media (max-width: 576px) {
    .invest-formats__item {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 24px 0;
    }

    .invest-formats__number {
        font-size: 32px;
    }

    .invest-formats__content h3 {
        font-size: 22px;
    }

    .invest-formats__content ul {
        flex-direction: column;
        gap: 8px;
    }
}

/* ===== CALCULATOR SECTION RESPONSIVE ===== */
.invest-calc__layout,
.calc-request__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

@media (max-width: 1200px) {
    .invest-calc__layout,
    .calc-request__content {
        gap: 40px;
    }
}

@media (max-width: 992px) {
    .invest-calc__layout,
    .calc-request__content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .invest-calc__left,
    .invest-calc__right,
    .calc-request__left,
    .calc-request__right {
        padding: 32px 24px;
    }

    .invest-calc__title,
    .calc-request__title {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .invest-calc__left,
    .invest-calc__right,
    .calc-request__left,
    .calc-request__right {
        padding: 24px 20px;
    }

    .calculator__toggle {
        flex-direction: column;
        gap: 8px;
    }

    .calculator__toggle-btn {
        width: 100%;
    }
}

/* ===== INVESTOR BOOKING RESPONSIVE ===== */
.investor-booking__layout {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 80px;
}

@media (max-width: 1200px) {
    .investor-booking__layout {
        grid-template-columns: 1fr 450px;
        gap: 60px;
    }
}

@media (max-width: 992px) {
    .investor-booking__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .investor-booking__form {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .investor-booking {
        padding: 80px 0;
    }

    .investor-booking__content h2 {
        font-size: 32px;
    }

    .investor-booking__form {
        padding: 32px 24px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .investor-booking {
        padding: 60px 0;
    }

    .investor-booking__content h2 {
        font-size: 28px;
    }

    .investor-booking__form {
        padding: 24px 20px;
    }
}

/* ===== BOOKING SECTION RESPONSIVE ===== */
.booking__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 992px) {
    .booking__layout {
        grid-template-columns: 1fr;
    }

    .booking__left {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .booking {
        padding: 60px 0;
    }

    .booking__left {
        height: 250px;
    }

    .booking__right {
        padding: 40px 24px;
    }

    .booking__title {
        font-size: 28px;
    }

    .booking__fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .booking__left {
        height: 200px;
    }

    .booking__right {
        padding: 32px 20px;
    }
}

/* ===== FORMAT COMPARISON TABLE RESPONSIVE ===== */
.format-comparison__table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.format-comparison__table-wrapper table {
    min-width: 600px;
}

@media (max-width: 992px) {
    .format-comparison {
        padding: 60px 0;
    }

    .format-comparison h2 {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .format-comparison__table-wrapper table th,
    .format-comparison__table-wrapper table td {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .format-comparison h2 {
        font-size: 26px;
    }

    .format-comparison__subtitle {
        font-size: 15px;
    }
}

/* ===== SPACES CATALOG TABLE RESPONSIVE ===== */
@media (max-width: 992px) {
    .spaces-catalog__table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .spaces-catalog__table {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    .spaces-catalog {
        padding: 40px 0 60px;
    }

    .catalog-filters__row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .catalog-filters__actions {
        margin-left: 0;
        width: 100%;
    }

    .catalog-filters__btn,
    .catalog-filters__reset {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .catalog-filters__container,
    .spaces-catalog__container {
        padding: 0 16px;
    }

    .catalog-filters__buttons {
        flex-wrap: wrap;
    }

    .catalog-filters__chip {
        flex: 1;
        min-width: calc(50% - 4px);
        text-align: center;
    }
}

/* ===== FOOTER RESPONSIVE ===== */
.footer__main {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 60px;
}

@media (max-width: 1200px) {
    .footer__main {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer__right {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    .footer__main {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer__nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .footer__right {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 60px 0 24px;
    }

    .footer__nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__contacts {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .footer__map-block {
        flex-direction: column;
    }

    .footer__map {
        width: 100%;
        height: 200px;
    }

    .footer__map iframe {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 576px) {
    .footer__nav {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer__contacts {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer__divider {
        display: none;
    }
}

/* ===== MODAL RESPONSIVE ===== */
@media (max-width: 768px) {
    .space-modal__content {
        grid-template-columns: 1fr;
    }

    .space-modal__gallery {
        min-height: 250px;
    }

    .space-modal__info {
        padding: 24px;
    }

    .space-modal__title {
        font-size: 24px;
    }

    .space-modal__specs {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .space-modal__container {
        width: 95%;
        border-radius: 12px;
    }

    .space-modal__gallery {
        min-height: 200px;
    }

    .space-modal__specs {
        grid-template-columns: 1fr;
    }

    .space-modal__actions {
        flex-direction: column;
    }
}

/* ===== CHAT WIDGET RESPONSIVE ===== */
@media (max-width: 768px) {
    .chat-widget {
        bottom: 16px;
        right: 16px;
    }

    .chat-widget__btn {
        width: 56px;
        height: 56px;
    }

    .chat-widget__panel {
        width: calc(100vw - 32px);
        max-width: 360px;
        right: 0;
        bottom: 72px;
    }
}

@media (max-width: 480px) {
    .chat-widget__panel {
        width: calc(100vw - 32px);
        max-height: 70vh;
    }
}

/* ===== COOKIE BANNER RESPONSIVE ===== */
@media (max-width: 768px) {
    .cookie-banner__content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .cookie-banner__actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        padding: 16px;
    }

    .cookie-banner__actions {
        flex-direction: column;
        gap: 8px;
    }

    .cookie-banner__btn {
        width: 100%;
    }
}

/* ===== LEAD POPUP RESPONSIVE ===== */
@media (max-width: 576px) {
    .lead-popup__box {
        width: 95%;
        padding: 32px 24px;
        margin: 16px;
    }

    .lead-popup__title {
        font-size: 24px;
    }
}

/* ===== NEWS GRID RESPONSIVE ===== */
.news-grid__container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 1200px) {
    .news-grid__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-grid__container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .news-card--featured {
        grid-template-columns: 1fr;
    }

    .news-card--featured .news-card__image {
        height: 250px;
    }
}

/* ===== SECTION HEADINGS RESPONSIVE ===== */
@media (max-width: 992px) {
    .mgmt-services__title,
    .mgmt-advantages__title,
    .invest-formats__title,
    .why-us__title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .mgmt-services__title,
    .mgmt-advantages__title,
    .invest-formats__title,
    .why-us__title {
        font-size: 32px;
    }

    .mgmt-services__subtitle,
    .invest-formats__subtitle,
    .why-us__subtitle {
        font-size: 16px;
    }

    .mgmt-services__header,
    .mgmt-advantages__header,
    .invest-formats__header,
    .why-us__header {
        margin-bottom: 40px;
    }
}

@media (max-width: 576px) {
    .mgmt-services__title,
    .mgmt-advantages__title,
    .invest-formats__title,
    .why-us__title {
        font-size: 28px;
    }
}

/* ===== SECTIONS PADDING RESPONSIVE ===== */
@media (max-width: 992px) {
    .mgmt-services,
    .mgmt-advantages,
    .invest-formats,
    .why-us,
    .invest-calc {
        padding: 80px 0;
    }

    .mgmt-stats,
    .invest-stats {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .mgmt-services,
    .mgmt-advantages,
    .invest-formats,
    .why-us,
    .invest-calc {
        padding: 60px 0;
    }

    .mgmt-stats,
    .invest-stats {
        padding: 48px 0;
    }
}

@media (max-width: 576px) {
    .mgmt-services,
    .mgmt-advantages,
    .invest-formats,
    .why-us,
    .invest-calc {
        padding: 48px 0;
    }

    .mgmt-stats,
    .invest-stats {
        padding: 40px 0;
    }
}

/* ===== FORMS RESPONSIVE ===== */
@media (max-width: 768px) {
    .investor-booking__fields,
    .booking__fields {
        gap: 16px;
    }

    .investor-booking__field input,
    .investor-booking__field select,
    .booking__input,
    .booking__select {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .investor-booking__submit,
    .booking__submit,
    .calculator__btn {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .mgmt-service:hover,
    .why-us__item:hover,
    .mgmt-advantage:hover {
        transform: none;
        box-shadow: inherit;
    }

    /* Larger touch targets */
    .header__burger,
    .header__phone,
    .chat-widget__btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* Prevent sticky hover states */
    a:hover,
    button:hover {
        opacity: 1;
    }
}

/* ===== LANDSCAPE PHONE OPTIMIZATIONS ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-split__container {
        min-height: auto;
    }

    .hero-split__left {
        padding: 40px;
    }

    .hero-split__right {
        height: 100vh;
        max-height: none;
    }
}

/* ===== SPECIFIC IMAGE FIXES ===== */
/* Hero split image */
.hero-split__right {
    overflow: hidden;
}

.hero-split__right img,
.hero-split__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Booking section image */
.booking__left {
    overflow: hidden;
}

.booking__left img,
.booking__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Invest formats images */
.invest-formats__image {
    overflow: hidden;
}

.invest-formats__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* News card images */
.news-card__image {
    overflow: hidden;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Space modal gallery */
.space-modal__gallery {
    overflow: hidden;
}

.space-modal__gallery img,
.space-modal__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* About page images */
.about__image,
.about__img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Infrastructure images */
.infrastructure__image img,
.infra__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Projects/Genplan images */
.projects__image img,
.queue-section__image img,
.territory-map img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Residents logos */
.residents__logo img,
.resident__logo img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Footer map - responsive aspect ratio container */
.footer__map {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 83.33%; /* 300/250 = 1.2, 100/1.2 = 83.33% */
    overflow: hidden;
}

.footer__map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

@media (max-width: 768px) {
    .footer__map {
        padding-bottom: 66.67%; /* 3:2 aspect ratio */
    }
}

@media (max-width: 480px) {
    .footer__map {
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
    }
}

/* Logo images */
.header__logo img,
.footer__logo img,
.preloader__logo img {
    max-width: 100%;
    height: auto;
}

/* Icon images */
[class*="__icon"] img,
[class*="-icon"] img {
    max-width: 100%;
    height: auto;
}

/* Background images on sections */
.investor-booking::before {
    background-size: cover;
    background-position: center;
}

/* ===== ASPECT RATIO CONTAINERS ===== */
.aspect-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-4-3 {
    aspect-ratio: 4 / 3;
}

.aspect-1-1 {
    aspect-ratio: 1 / 1;
}

.aspect-3-2 {
    aspect-ratio: 3 / 2;
}

/* For browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
    .aspect-16-9 {
        position: relative;
        padding-bottom: 56.25%;
    }

    .aspect-16-9 > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .aspect-4-3 {
        position: relative;
        padding-bottom: 75%;
    }

    .aspect-4-3 > * {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* ===== OVERFLOW HANDLING ===== */
.overflow-hidden {
    overflow: hidden;
}

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Fix for elements that might cause horizontal scroll */
@media (max-width: 768px) {
    img,
    video,
    iframe,
    embed,
    object {
        max-width: 100% !important;
    }

    /* Tables that might overflow */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Pre/code blocks */
    pre, code {
        max-width: 100%;
        overflow-x: auto;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .footer,
    .chat-widget,
    .cookie-banner,
    .lead-popup,
    .preloader {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }
}

/* ===== HIGH DPI / RETINA ADJUSTMENTS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Thinner borders on retina */
    .format-comparison__table-wrapper table td,
    .format-comparison__table-wrapper table th {
        border-width: 0.5px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== DARK MODE SUPPORT (OPTIONAL) ===== */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --black: #fff;
        --white: #1a1a1a;
        --grey-50: #262626;
        --grey-100: #2d2d2d;
    }
    */
}
