/* ==========================================================================
   D'REALDY WEBSITE
   Responsive Stylesheet
   File: css/responsive.css
   Version: 1.0.0
   ========================================================================== */

/* ==========================================================================
   1. LARGE DESKTOP — UP TO 1400PX
   ========================================================================== */

@media (max-width: 1400px) {
    :root {
        --container-width: 1180px;
        --container-wide-width: 1320px;
    }

    .section {
        padding-block: var(--space-16);
    }

    .section-lg {
        padding-block: var(--space-24);
    }

    .footer-grid {
        gap: var(--space-8);
    }
}

/* ==========================================================================
   2. DESKTOP — UP TO 1200PX
   ========================================================================== */

@media (max-width: 1200px) {
    :root {
        --container-width: 1080px;
        --container-wide-width: 1160px;
        --container-gutter: 22px;
        --header-height: 82px;
        --header-height-scrolled: 68px;
    }

    .main-nav ul {
        gap: var(--space-4);
    }

    .main-nav a {
        font-size: var(--font-size-14);
    }

    .grid-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
        gap: var(--space-6);
    }

    .card-title {
        font-size: var(--font-size-20);
    }

    .section-header {
        max-width: 700px;
    }
}

/* ==========================================================================
   3. LAPTOP AND TABLET LANDSCAPE — UP TO 1024PX
   ========================================================================== */

@media (max-width: 1024px) {
    :root {
        --container-gutter: 20px;
        --header-height: 78px;
        --header-height-scrolled: 66px;
    }

    h1 {
        font-size: clamp(2.3rem, 6vw, 4rem);
    }

    h2 {
        font-size: clamp(1.9rem, 4.5vw, 3rem);
    }

    h3 {
        font-size: clamp(1.4rem, 3vw, 2rem);
    }

    .section {
        padding-block: var(--space-14);
    }

    .section-lg {
        padding-block: var(--space-20);
    }

    .header-inner {
        gap: var(--space-5);
    }

    .header-brand {
        gap: var(--space-3);
    }

    .site-logo {
        font-size: var(--font-size-20);
    }

    .site-logo img {
        max-height: 46px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-horizontal {
        grid-template-columns: minmax(220px, 38%) 1fr;
    }

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

    .footer-brand {
        max-width: none;
    }

    .search-dialog {
        width: min(100%, 680px);
    }

    .breadcrumb [aria-current="page"] {
        max-width: 220px;
    }
}

/* ==========================================================================
   4. TABLET PORTRAIT — UP TO 768PX
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --container-gutter: 18px;
        --header-height: 74px;
        --header-height-scrolled: 64px;
    }

    body {
        font-size: var(--font-size-15);
    }

    h1 {
        font-size: clamp(2.15rem, 10vw, 3.5rem);
    }

    h2 {
        font-size: clamp(1.8rem, 8vw, 2.75rem);
    }

    h3 {
        font-size: clamp(1.35rem, 6vw, 1.9rem);
    }

    .section {
        padding-block: var(--space-12);
    }

    .section-sm {
        padding-block: var(--space-10);
    }

    .section-lg {
        padding-block: var(--space-16);
    }

    .section-header {
        margin-bottom: var(--space-8);
    }

    .section-description {
        font-size: var(--font-size-16);
    }

    .header-inner {
        gap: var(--space-3);
    }

    .header-brand {
        min-width: 0;
    }

    .site-logo {
        font-size: var(--font-size-18);
    }

    .site-logo img {
        max-height: 42px;
    }

    .breadcrumb {
        display: none;
    }

    .header-actions {
        margin-left: auto;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .grid {
        gap: var(--space-5);
    }

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

    .card-horizontal .card-media {
        aspect-ratio: 16 / 10;
    }

    .card-body {
        padding: var(--space-5);
    }

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

    .footer-main {
        padding-block: var(--space-12);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-bottom-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-panel {
        padding-top: 96px;
    }

    .search-dialog {
        padding: var(--space-6);
        border-radius: var(--radius-lg);
    }

    .search-form {
        flex-direction: column;
    }

    .search-form .btn {
        width: 100%;
    }

    .modal {
        padding: var(--space-4);
    }

    .modal-dialog {
        max-height: calc(100vh - 32px);
        border-radius: var(--radius-lg);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--space-5);
    }

    .modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .table th,
    .table td {
        padding: var(--space-3);
        white-space: nowrap;
    }

    .hide-tablet {
        display: none !important;
    }

    .show-tablet {
        display: block !important;
    }

    .text-center-tablet {
        text-align: center !important;
    }

    .w-100-tablet {
        width: 100% !important;
    }
}

/* ==========================================================================
   5. MOBILE LARGE — UP TO 576PX
   ========================================================================== */

@media (max-width: 576px) {
    :root {
        --container-gutter: 16px;
        --header-height: 70px;
        --header-height-scrolled: 62px;
    }

    body {
        font-size: var(--font-size-15);
        line-height: 1.6;
    }

    h1 {
        font-size: clamp(2rem, 12vw, 3rem);
        line-height: 1.08;
    }

    h2 {
        font-size: clamp(1.7rem, 10vw, 2.35rem);
    }

    h3 {
        font-size: clamp(1.3rem, 8vw, 1.75rem);
    }

    h4 {
        font-size: var(--font-size-20);
    }

    .section {
        padding-block: var(--space-10);
    }

    .section-sm {
        padding-block: var(--space-8);
    }

    .section-lg {
        padding-block: var(--space-14);
    }

    .section-header {
        margin-bottom: var(--space-6);
    }

    .section-eyebrow {
        font-size: var(--font-size-12);
    }

    .section-description {
        font-size: var(--font-size-15);
    }

    .header-inner {
        min-height: inherit;
    }

    .site-logo {
        max-width: 180px;
        font-size: var(--font-size-17);
    }

    .site-logo img {
        max-height: 38px;
    }

    .header-actions {
        gap: var(--space-2);
    }

    .menu-toggle,
    .search-toggle {
        width: 40px;
        height: 40px;
    }

    .btn {
        min-height: 46px;
        padding-inline: var(--space-5);
    }

    .btn-lg {
        min-height: 52px;
        padding-inline: var(--space-6);
    }

    .btn-mobile-block {
        width: 100%;
    }

    .cluster {
        gap: var(--space-3);
    }

    .stack-lg {
        gap: var(--space-8);
    }

    .card {
        border-radius: var(--radius-md);
    }

    .card-body {
        padding: var(--space-4);
    }

    .card-title {
        font-size: var(--font-size-20);
    }

    .card-text {
        margin-bottom: var(--space-4);
    }

    .form {
        gap: var(--space-4);
    }

    .form-control,
    .form-select,
    .form-textarea {
        min-height: 46px;
        font-size: var(--font-size-16);
    }

    .footer-main {
        padding-block: var(--space-10);
    }

    .footer-grid {
        gap: var(--space-7);
    }

    .footer-logo {
        font-size: var(--font-size-24);
    }

    .footer-bottom {
        padding-block: var(--space-4);
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .search-panel {
        align-items: start;
        padding:
            calc(var(--header-height) + var(--space-4))
            var(--container-gutter)
            var(--space-4);
    }

    .search-dialog {
        padding: var(--space-5);
    }

    .modal {
        padding: var(--space-3);
    }

    .modal-dialog {
        max-height: calc(100vh - 24px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--space-4);
    }

    .alert {
        padding: var(--space-3);
    }

    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    .text-center-mobile {
        text-align: center !important;
    }

    .items-center-mobile {
        align-items: center !important;
    }

    .justify-center-mobile {
        justify-content: center !important;
    }

    .w-100-mobile {
        width: 100% !important;
    }

    .order-first-mobile {
        order: -1 !important;
    }

    .order-last-mobile {
        order: 99 !important;
    }
}

/* ==========================================================================
   6. MOBILE SMALL — UP TO 375PX
   ========================================================================== */

@media (max-width: 375px) {
    :root {
        --container-gutter: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .site-logo {
        max-width: 150px;
        font-size: var(--font-size-16);
    }

    .site-logo img {
        max-height: 34px;
    }

    .header-actions {
        gap: 6px;
    }

    .menu-toggle,
    .search-toggle {
        width: 38px;
        height: 38px;
    }

    .btn {
        min-height: 44px;
        padding-inline: var(--space-4);
        font-size: var(--font-size-14);
    }

    .card-body {
        padding: var(--space-4);
    }

    .search-dialog {
        padding: var(--space-4);
    }
}

/* ==========================================================================
   7. MOBILE NAVIGATION STATES
   ========================================================================== */

@media (max-width: 1024px) {
    .mobile-nav {
        position: fixed;
        top: 0;
        right: 0;
        z-index: var(--z-modal);
        width: min(88vw, 420px);
        height: 100dvh;
        overflow-y: auto;
        padding:
            calc(var(--header-height) + var(--space-6))
            var(--space-6)
            var(--space-8);
        background: var(--color-white);
        box-shadow: var(--shadow-xl);
        transform: translateX(104%);
        transition: transform var(--transition-base);
    }

    .mobile-nav.is-open {
        transform: translateX(0);
    }

    .mobile-nav ul {
        display: grid;
        gap: var(--space-2);
        list-style: none;
    }

    .mobile-nav a {
        display: flex;
        min-height: 50px;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-3) 0;
        font-size: var(--font-size-18);
        font-weight: var(--font-weight-semibold);
        color: var(--color-heading);
        border-bottom: 1px solid var(--color-border);
    }

    .mobile-nav a:hover,
    .mobile-nav a.is-active,
    .mobile-nav a[aria-current="page"] {
        color: var(--color-primary);
    }

    .mobile-nav-close {
        position: absolute;
        top: 18px;
        right: 18px;
        display: inline-flex;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        background: var(--color-gray-50);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-full);
    }
}

@media (min-width: 1025px) {
    .menu-toggle,
    .mobile-nav,
    .mobile-nav-close {
        display: none !important;
    }
}

/* ==========================================================================
   8. POINTER AND HOVER OPTIMIZATION
   ========================================================================== */

@media (hover: none) {
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-xs);
    }

    .card:hover .card-media img {
        transform: none;
    }

    .btn:hover,
    .social-link:hover {
        transform: none;
    }
}

/* ==========================================================================
   9. HIGH-RESOLUTION AND WIDE SCREENS
   ========================================================================== */

@media (min-width: 1600px) {
    :root {
        --container-width: 1360px;
        --container-wide-width: 1520px;
    }

    .section {
        padding-block: var(--space-24);
    }

    .section-lg {
        padding-block: var(--space-32);
    }
}

/* ==========================================================================
   10. LANDSCAPE MOBILE
   ========================================================================== */

@media (max-height: 520px) and (orientation: landscape) {
    .search-panel {
        padding-top: var(--space-4);
        overflow-y: auto;
    }

    .search-dialog {
        margin-block: auto;
    }

    .mobile-nav {
        padding-top: var(--space-16);
    }

    .modal {
        align-items: start;
        overflow-y: auto;
    }
}

/* ==========================================================================
   11. PRINT RESPONSIVE SUPPORT
   ========================================================================== */

@media print {
    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-auto,
    .footer-grid,
    .form-row,
    .card-horizontal {
        display: block !important;
    }

    .card,
    .alert,
    .table-wrap {
        break-inside: avoid;
        border: 1px solid #cccccc !important;
    }

    .section,
    .section-sm,
    .section-lg {
        padding-block: 20px !important;
    }
}

/* ========================================
   HOME HERO RESPONSIVE
======================================== */

@media (max-width: 1024px) {

    .home-hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + var(--space-8));
    }

    .home-hero .container {
        gap: var(--space-8);
    }

    .home-hero h1 {
        font-size: clamp(2.75rem, 6vw, 4.5rem);
    }

    .home-hero-media {
        min-height: 520px;
    }

    .home-hero-media .image-placeholder {
        min-height: 520px;
    }

}

@media (max-width: 768px) {

    .home-hero {
        padding-top: calc(var(--header-height) + var(--space-6));
        padding-bottom: var(--space-10);
    }

    .home-hero .container {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .home-hero-content {
        max-width: 100%;
    }

    .home-hero h1 {
        max-width: 100%;
        font-size: clamp(2.5rem, 12vw, 4rem);
        line-height: 1.02;
    }

    .home-hero-description {
        max-width: 100%;
        font-size: 1rem;
        line-height: 1.7;
    }

    .home-hero-media {
        min-height: 440px;
    }

    .home-hero-media .image-placeholder {
        min-height: 440px;
    }

    .home-hero-media::before {
        top: -18px;
        right: -12px;
        width: 110px;
        height: 110px;
    }

    .home-hero-media::after {
        bottom: -18px;
        left: -12px;
        width: 150px;
        height: 150px;
    }

}

@media (max-width: 480px) {

    .home-hero {
        padding-top: calc(var(--header-height) + var(--space-5));
        padding-bottom: var(--space-8);
    }

    .home-hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.25rem);
        letter-spacing: -0.04em;
    }

    .home-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .home-hero-actions .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .home-hero-media {
        min-height: 340px;
    }

    .home-hero-media .image-placeholder {
        min-height: 340px;
    }

}

/* ========================================
   HOME ABOUT RESPONSIVE
======================================== */

@media (max-width: 1024px) {

    .home-about-layout {
        gap: var(--space-8);
    }

    .home-about-media {
        min-height: 560px;
    }

    .home-about-media .image-placeholder {
        min-height: 560px;
    }

    .home-about-value {
        grid-template-columns: 52px minmax(0, 1fr);
    }

}

@media (max-width: 768px) {

    .home-about-layout {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .home-about-media {
        min-height: 440px;
    }

    .home-about-media .image-placeholder {
        min-height: 440px;
    }

    .home-about-content {
        max-width: 100%;
    }

    .home-about-intro {
        font-size: 1rem;
        line-height: 1.7;
    }

}

@media (max-width: 480px) {

    .home-about-media {
        min-height: 320px;
    }

    .home-about-media .image-placeholder {
        min-height: 320px;
    }

    .home-about-value {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: var(--space-3);
        padding: var(--space-4) 0;
    }

    .home-about-value h3 {
        font-size: 1.125rem;
    }

    .home-about-content .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

}

/* ========================================
   HOME SECTORS RESPONSIVE
======================================== */

@media (max-width: 1024px) {

    .home-sector-grid {
        gap: var(--space-6);
    }

}

@media (max-width: 768px) {

    .home-sector-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .home-sector-card-content {
        padding: var(--space-5);
    }

}

@media (max-width: 480px) {

    .home-sector-card-content {
        padding: var(--space-4);
    }

    .home-sector-card-content h3 {
        font-size: 1.25rem;
    }

}

/* ========================================
   HOME FEATURED BRANDS RESPONSIVE
======================================== */

@media (max-width: 1024px) {

    .home-featured-brand-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-5);
    }

}

@media (max-width: 768px) {

    .home-featured-brand-grid {
        grid-template-columns: 1fr;
    }

    .home-featured-brand-card {
        padding: var(--space-5);
    }

}

@media (max-width: 480px) {

    .home-featured-brand-card {
        padding: var(--space-4);
    }

    .home-featured-brand-card h3 {
        font-size: 1.25rem;
    }

}

/* ========================================
   HOME SUSTAINABILITY RESPONSIVE
======================================== */

@media (max-width: 1024px) {

    .home-sustainability-layout {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

}

@media (max-width: 768px) {

    .home-sustainability-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .home-sustainability-card {
        padding: var(--space-5);
    }

}

@media (max-width: 480px) {

    .home-sustainability-layout {
        gap: var(--space-6);
    }

    .home-sustainability-card {
        padding: var(--space-4);
    }

    .home-sustainability-card h3 {
        font-size: 1.25rem;
    }

}

/* ========================================
   HOME NEWS RESPONSIVE
======================================== */

@media (max-width: 1024px) {

    .home-news-layout {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .home-news-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-5);
    }

    .home-news-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

}

@media (max-width: 768px) {

    .home-news .section-header .section-link {
        display: none;
    }

    .home-news-list {
        grid-template-columns: 1fr;
    }

    .home-news-featured-content {
        padding: var(--space-5);
    }

    .home-news-mobile-action {
        display: block;
    }

}

@media (max-width: 480px) {

    .home-news-featured-content {
        padding: var(--space-4);
    }

    .home-news-card {
        padding: var(--space-3);
    }

    .home-news-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--space-2);
    }

    .home-news-featured h3 {
        font-size: 1.375rem;
    }

    .home-news-card h3 {
        font-size: 1.05rem;
    }

}

/* ========================================
   HOME CAREERS RESPONSIVE
======================================== */

@media (max-width: 1024px) {

    .home-careers-layout {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

}

@media (max-width: 768px) {

    .home-careers-highlights {
        gap: var(--space-3);
    }

    .home-careers-item {
        gap: var(--space-4);
        padding: var(--space-4);
    }

    .home-careers-item:hover {
        transform: none;
    }

}

@media (max-width: 480px) {

    .home-careers-layout {
        gap: var(--space-6);
    }

    .home-careers-item {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .home-careers-item h3 {
        font-size: 1.25rem;
    }

}

/* ========================================
   HOME CONTACT CTA RESPONSIVE
======================================== */

@media (max-width: 1024px) {

    .home-contact-cta-layout {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--space-6);
    }

}

@media (max-width: 768px) {

    .home-contact-cta-layout {
        padding: var(--space-6);
    }

    .home-contact-cta-action {
        width: 100%;
    }

    .home-contact-cta-action .button-primary {
        width: 100%;
        justify-content: center;
    }

}

@media (max-width: 480px) {

    .home-contact-cta-layout {
        gap: var(--space-5);
        padding: var(--space-5);
    }

    .home-contact-cta-content h2 {
        font-size: 1.75rem;
    }

}

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */

@media (max-width: 1200px) {

    .about-introduction-layout {
        grid-template-columns: 1fr;
        gap: var(--space-10);
    }

    .about-introduction-content {
        max-width: 100%;
    }

    .about-introduction-media {
        order: -1;
    }

    .about-introduction-media .image-placeholder {
        min-height: 480px;
    }

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

}

@media (max-width: 992px) {

    .about-mission-vision {
        grid-template-columns: 1fr;
    }

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

}

@media (max-width: 768px) {

    .about-values-grid,
    .about-highlights-grid {
        grid-template-columns: 1fr;
    }

    .about-introduction-media .image-placeholder {
        min-height: 380px;
    }

    .about-mission,
    .about-vision,
    .about-value-card,
    .about-highlight-card {
        padding: var(--space-6);
    }

}

@media (max-width: 576px) {

    .about-introduction-layout {
        gap: var(--space-8);
    }

    .about-introduction-media .image-placeholder {
        min-height: 300px;
    }

    .about-highlight-card strong {
        font-size: var(--font-size-32);
    }

}