﻿/* ========== Responsive Styles ========== */

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    /* --- Typography Scaling (Tablet) --- */
    h1, .h1 {
        font-size: 40px;
        line-height: normal;
    }

    h2, .h2 {
        font-size: 32px;
        line-height: 36px;
    }

    h3, .h3 {
        font-size: 26px;
        line-height: 30px;
    }

    h4, .h4 {
        font-size: 24px;
        line-height: normal;
    }

    h5, .h5 {
        font-size: 22px;
        line-height: normal;
    }

    .subhead-lg {
        font-size: 18px;
        line-height: 24px;
    }

    .special-h1 {
        font-size: 44px;
    }

    .special-button {
        font-size: 28px;
    }

    /* --- Container & Section Spacing (Tablet) --- */
    .container {
        padding: 0 var(--spacing-5);
    }

    .solutions,
    .products,
    .services {
        padding: var(--spacing-9) 0;
    }

    .section-title {
        margin-bottom: var(--spacing-7);
    }

    /* --- Header (Tablet) --- */
    .header-nav {
        gap: var(--spacing-4);
    }

    .nav-item > a {
        font-size: 13px;
    }

    /* --- Hero (Tablet) --- */
    .hero-title {
        font-size: 32px;
    }

    .hero-icons {
        gap: var(--spacing-5);
    }

    /* --- Service Flow (Tablet) --- */
    .service-flow {
        gap: var(--spacing-2);
    }

    .flow-button {
        font-size: 11px;
        padding: var(--spacing-1) var(--spacing-2);
    }

    /* --- Solutions Grid (Tablet) --- */
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .solutions-grid .solution-card:nth-child(1),
    .solutions-grid .solution-card:nth-child(2),
    .solutions-grid .solution-card:nth-child(3),
    .solutions-grid .solution-card:nth-child(4),
    .solutions-grid .solution-card:nth-child(5) {
        grid-column: span 1;
    }

    /* --- Products Grid (Tablet) --- */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Service Cards (Tablet) --- */
    .service-card {
        height: 240px;
    }

    .service-card__content {
        max-width: 50%;
    }

    .service-card__title {
        font-size: 20px;
    }

    /* --- Footer (Tablet) --- */
    .footer-content {
        grid-template-columns: repeat(2, 1fr) 1.2fr;
        gap: var(--spacing-5);
    }

    .footer-column:nth-child(4) {
        grid-column: 1;
    }

    .footer-column-right {
        grid-column: 3;
        grid-row: 1 / 3;
        text-align: center;
        margin-top: 0;
    }

    .footer-logo {
        justify-content: center;
        align-items: center;
    }`n
    .footer-social {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 767px) {
    /* --- Typography Scaling (Mobile) --- */
    h1, .h1 {
        font-size: 32px;
        line-height: normal;
    }

    h2, .h2 {
        font-size: 28px;
        line-height: 32px;
    }

    h3, .h3 {
        font-size: 24px;
        line-height: 28px;
    }

    h4, .h4 {
        font-size: 22px;
        line-height: normal;
    }

    h5, .h5 {
        font-size: 20px;
        line-height: normal;
    }

    .subhead-lg {
        font-size: 18px;
        line-height: 24px;
    }

    .subhead-md {
        font-size: 16px;
        line-height: 26px;
    }

    .special-h1 {
        font-size: 36px;
    }

    .special-h2 {
        font-size: 20px;
        line-height: 30px;
    }

    .special-button {
        font-size: 24px;
    }

    .section-title h2 {
        font-size: 24px;
        line-height: 28px;
    }

    /* --- Container & Section Spacing (Mobile) --- */
    .container {
        padding: 0 var(--spacing-4);
    }

    .solutions,
    .products,
    .services {
        padding: var(--spacing-8) 0;
    }

    .section-title {
        margin-bottom: var(--spacing-6);
    }

    /* --- Button Scaling (Mobile) --- */
    .btn,
    .primary-button {
        font-size: 16px;
        padding: var(--spacing-3) var(--spacing-5);
    }

    .cta-button {
        font-size: 24px;
    }

    /* --- Header (Mobile) --- */
    .header > .container {
        height: 56px;
    }

    .header-nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-5);
        gap: var(--spacing-3);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    /* Dark Mode Mobile Nav */
    body.dark-mode .header-nav {
        background: var(--color-black-95);
        box-shadow: 2px 0 10px rgba(255, 255, 255, 0.05);
    }

    body.dark-mode .dropdown-menu {
        background: var(--color-black);
    }

    body.dark-mode .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    body.dark-mode .dropdown-menu--five-columns .dropdown-column {
        border-bottom-color: var(--color-gray-700-cool);
    }

    .header-nav.active {
        transform: translateX(0);
    }

    .nav-item {
        width: 100%;
    }

    .nav-item.has-dropdown {
        flex-wrap: wrap;
    }

    .nav-item > a {
        font-size: 16px;
        padding: var(--spacing-3) 0;
        color: var(--color-gray-900-warm);
    }

    .dropdown-arrow {
        color: var(--color-gray-600);
    }

    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background: var(--color-gray-100);
        border-radius: var(--radius-2);
        padding: var(--spacing-2) 0;
        width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
        margin-top: var(--spacing-2);
    }

    .nav-item.has-dropdown:hover .dropdown-menu,
    .nav-item.has-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        color: var(--color-gray-700-warm);
        padding: var(--spacing-2) var(--spacing-4);
    }

    .dropdown-menu a:hover {
        background: var(--color-gray-200);
        color: var(--color-green-500);
    }

    /* Mobile: Two-column dropdown becomes single column */
    .dropdown-menu--two-columns {
        flex-direction: column;
        min-width: 100%;
        padding: var(--spacing-2) 0;
        gap: 0;
    }

    .dropdown-menu--two-columns .dropdown-column a {
        padding: var(--spacing-2) var(--spacing-4);
    }

    /* Mobile: Five-column dropdown becomes single column */
    .dropdown-menu--five-columns {
        flex-direction: column;
        min-width: 100%;
        padding: var(--spacing-2) 0;
        gap: 0;
    }

    .dropdown-menu--five-columns .dropdown-column {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--color-gray-200);
        padding-bottom: var(--spacing-2);
        margin-bottom: var(--spacing-2);
    }

    .dropdown-menu--five-columns .dropdown-column:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .dropdown-menu--five-columns .dropdown-column-title {
        padding: var(--spacing-2) var(--spacing-4);
        margin-bottom: 0;
    }

    .dropdown-menu--five-columns .dropdown-column a {
        padding: var(--spacing-1) var(--spacing-4) var(--spacing-1) var(--spacing-6);
        font-size: 13px;
    }

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

    .lang-selector__trigger {
        min-width: 0;
        padding: 7px 10px;
        gap: 8px;
    }

    .lang-selector__label {
        display: none;
    }

    .lang-selector__menu {
        min-width: 180px;
        right: 0;
    }

    /* --- Hero (Mobile) --- */
    .hero {
        margin-top: 56px;
        padding: var(--spacing-8) 0;
    }

    /* --- Solutions Grid (Mobile) --- */
    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .solutions-grid .solution-card:nth-child(1),
    .solutions-grid .solution-card:nth-child(2),
    .solutions-grid .solution-card:nth-child(3),
    .solutions-grid .solution-card:nth-child(4),
    .solutions-grid .solution-card:nth-child(5) {
        grid-column: span 1;
    }

    .solution-card--large,
    .solution-card--small {
        height: 200px;
    }

    .solution-card__content {
        padding: var(--spacing-3) var(--spacing-3);
    }

    .solution-card__title {
        font-size: 16px;
    }

    .solution-card__list a {
        font-size: 13px;
    }

    /* --- Products Grid (Mobile) --- */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-4);
    }

    .product-image {
        height: 120px;
    }

    .product-info {
        padding: var(--spacing-3);
    }

    .home-product-info {
        min-height: 104px;
    }

    .product-code {
        font-size: 13px;
    }

    .product-description {
        font-size: 11px;
    }

    .home-product-description {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    /* --- Service Cards (Mobile) --- */
    .service-card {
        height: 220px;
    }

    .service-card__overlay {
        width: 70%;
    }

    .service-card__content {
        max-width: 65%;
        padding: var(--spacing-4);
    }

    .service-card__title {
        font-size: 18px;
        margin-bottom: var(--spacing-3);
    }

    .service-card__description {
        font-size: 13px;
        line-height: 1.5;
    }

    /* --- Footer (Mobile) --- */
    .footer {
        padding: var(--spacing-8) 0 var(--spacing-5);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-5);
    }

    .footer-column h4 {
        font-size: 16px;
    }

    .footer-column ul li a {
        font-size: 13px;
    }

    .footer-column-right {
        grid-column: span 2;
        text-align: center;
        margin-top: var(--spacing-4);
    }

    .footer-logo {
        justify-content: center;
        align-items: center;
    }

    .footer-logo__img {
        width: 190px;
    }`n
    .footer-social {
        justify-content: center;
    }

    /* Dark Mode Mobile: page content */
    body.dark-mode .main-content {
        margin-top: 56px;
        min-height: calc(100vh - 56px - 300px);
    }

    body.dark-mode .content-inner {
        padding: var(--spacing-5);
    }
}

