/* ==========================================================
   INGRACE GLOBAL RESPONSIVE LAYOUT
   ========================================================== */

html {
    box-sizing: border-box;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    width: 100%;
    overflow-x: hidden;
}

img,
video,
iframe,
embed,
object,
svg {
    max-width: 100%;
}

img {
    height: auto;
}

.container {
    width: min(calc(100% - 40px), 1180px);
    margin-inline: auto;
}

.mobile-nav-toggle {
    display: none;
}

body.mobile-nav-open {
    overflow: hidden;
}

/* Tablet */
@media (max-width: 900px) {
    .container {
        width: min(calc(100% - 32px), 860px);
    }

    .topbar {
        display: none;
    }

    .site-header {
        position: relative;
        z-index: 1000;
    }

    .header-inner {
        position: relative;
        min-height: 90px !important;
        padding: 14px 0 !important;
    }

    .brand {
        position: relative;
        z-index: 1002;
        max-width: calc(100% - 72px);
    }

    .header-logo {
        width: auto;
        max-width: 118px !important;
        max-height: 72px !important;
    }

    .mobile-nav-toggle {
        display: grid;
        position: relative;
        z-index: 1002;
        width: 46px;
        height: 46px;
        place-content: center;
        gap: 5px;
        padding: 0;
        border: 1px solid #d6dfe6;
        border-radius: 4px;
        background: #ffffff;
        cursor: pointer;
    }

    .mobile-nav-toggle span {
        display: block;
        width: 23px;
        height: 2px;
        background: #004c8e;
        transition:
            transform 0.2s ease,
            opacity 0.2s ease;
    }

    .mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .primary-nav {
        display: none !important;
        position: absolute;
        z-index: 1001;
        top: 100%;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        padding: 12px 16px 20px;
        border-top: 1px solid #e3e8ec;
        background: #ffffff;
        box-shadow: 0 18px 36px rgba(0, 49, 91, 0.16);
    }

    .primary-nav.is-open {
        display: grid !important;
    }

    .primary-nav a {
        display: block;
        width: 100%;
        padding: 15px 12px !important;
        border-bottom: 1px solid #edf1f4;
        font-size: 17px !important;
        line-height: 1.35;
    }

    .primary-nav a:last-child {
        border-bottom: 0;
    }

    /* Homepage */
    .hero {
        min-height: 650px !important;
    }

    .hero-content {
        padding-top: 130px !important;
        padding-bottom: 130px !important;
    }

    .hero h1 {
        font-size: clamp(48px, 9vw, 72px) !important;
    }

    .hero p {
        font-size: 21px !important;
    }

    .who-row,
    .location-row,
    .about-split,
    .about-feature-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 36px !important;
    }

    .operations-grid,
    .news-list-grid,
    .article-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    /* News */
    .news-hero-layout,
    .featured-article {
        grid-template-columns: 1fr 1fr !important;
        gap: 30px !important;
    }

    .featured-article-content {
        padding: 32px !important;
    }

    .article-detail-layout {
        grid-template-columns: minmax(0, 1fr) 250px !important;
        gap: 34px !important;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr) !important;
        gap: 28px !important;
    }

    .contact-form-row {
        grid-template-columns: 1fr !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 34px !important;
    }
}

/* Mobile */
@media (max-width: 700px) {
    .container {
        width: min(calc(100% - 28px), 620px);
    }

    h1,
    h2,
    h3,
    p,
    a,
    span,
    li {
        overflow-wrap: anywhere;
    }

    .header-inner {
        min-height: 82px !important;
    }

    .header-logo {
        max-width: 104px !important;
        max-height: 64px !important;
    }

    /* Homepage */
    .hero {
        min-height: 520px !important;
    }

    .hero-content {
        padding-top: 90px !important;
        padding-bottom: 90px !important;
    }

    .hero h1 {
        font-size: clamp(42px, 12vw, 60px) !important;
        line-height: 1.08 !important;
    }

    .hero p {
        font-size: 18px !important;
        line-height: 1.55 !important;
    }

    .who-row,
    .location-row,
    .about-split,
    .about-feature-grid,
    .owner-profile-grid,
    .news-hero-layout,
    .featured-article,
    .article-detail-layout,
    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    .who-row,
    .location-row,
    .owner-profile-grid {
        gap: 30px !important;
    }

    .operations-grid,
    .about-three-images,
    .about-gallery-grid,
    .news-list-grid,
    .article-card-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .who-image,
    .location-image,
    .owner-profile-image {
        max-width: 100% !important;
        margin-inline: auto;
    }

    .section,
    .who-section,
    .operations-section,
    .location-section,
    .about-text-row,
    .about-images-row,
    .owner-profile-section,
    .news-page,
    .contact-main {
        padding-top: 54px !important;
        padding-bottom: 62px !important;
    }

    /* About */
    .about-page-banner,
    .news-hero,
    .contact-banner {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    .about-small-images {
        gap: 18px !important;
    }

    /* Owner */
    .owner-profile-image {
        max-width: 430px !important;
    }

    .owner-profile-content h1 {
        font-size: 28px !important;
    }

    /* News */
    .news-search {
        grid-template-columns: minmax(0, 1fr) auto !important;
        width: 100% !important;
    }

    .featured-article-image img,
    .featured-article-image .news-image-placeholder {
        min-height: 260px !important;
    }

    .featured-article-content {
        padding: 26px 22px !important;
    }

    .article-detail-header {
        padding-top: 50px !important;
        padding-bottom: 40px !important;
    }

    .article-detail-header h1 {
        font-size: clamp(38px, 11vw, 58px) !important;
    }

    .article-summary {
        font-size: 18px !important;
    }

    .article-body {
        font-size: 17px !important;
    }

    .article-sidebar {
        order: 2;
    }

    /* Contact */
    .contact-info-card,
    .contact-form-card {
        padding: 26px 22px !important;
    }

    .contact-map iframe {
        height: 270px !important;
    }

    /* Footer */
    .site-footer {
        padding-top: 54px !important;
    }

    .footer-column,
    .footer-logo-column {
        min-width: 0;
    }

    .footer-bottom {
        padding-top: 28px !important;
        padding-bottom: 28px !important;
    }

    /* Touch targets */
    button,
    input,
    textarea,
    select,
    .news-action,
    .contact-submit,
    .news-pagination a {
        min-height: 44px;
    }
}

/* Small phones */
@media (max-width: 420px) {
    .container {
        width: min(calc(100% - 22px), 390px);
    }

    .news-search {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }

    .news-search input,
    .news-search button {
        width: 100%;
        border-radius: 4px !important;
    }

    .contact-info-card,
    .contact-form-card,
    .article-card-content {
        padding: 22px 18px !important;
    }
}
