/* ==========================================================================
   Responsive Styles - McMillan Woods Theme
   Breakpoints:
   - Mobile: < 640px
   - Tablet: 640px - 1024px
   - Desktop: > 1024px
   ========================================================================== */

/* ==========================================================================
   Tablet Landscape (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
    }

    /* Typography */
    h1, .hero__title, .page-header__title {
        font-size: var(--text-4xl);
    }

    h2, .section__title {
        font-size: var(--text-3xl);
    }

    h3 {
        font-size: var(--text-2xl);
    }

    /* Section */
    .section {
        padding: var(--space-16) 0;
    }

    /* Hero */
    .hero__content {
        padding: var(--space-6);
    }

    .hero__subtitle {
        font-size: var(--text-lg);
    }

    /* About */
    .about__content {
        gap: var(--space-8);
    }

    .vision-mission {
        gap: var(--space-6);
    }

    /* People Grid */
    .people__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* People Grid Home - 2 columns on tablet */
    .people__grid--home {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Clients Grid */
    .clients__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Clients Carousel */
    .clients-carousel .slider__slide {
        flex: 0 0 25%;
    }

    /* Publications Grid */
    .publications__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact */
    .contact__grid {
        gap: var(--space-8);
    }

    /* Japan Desk */
    .japan-desk__content {
        gap: var(--space-8);
    }

    /* M&A Corner */
    .ma-corner__services {
        gap: var(--space-4);
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }

    .footer__brand {
        grid-column: span 2;
        max-width: 100%;
    }
}

/* ==========================================================================
   Tablet Portrait (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
    }

    /* Typography */
    h1, .hero__title, .page-header__title {
        font-size: var(--text-3xl);
    }

    h2, .section__title {
        font-size: var(--text-2xl);
    }

    h3 {
        font-size: var(--text-xl);
    }

    .section__subtitle {
        font-size: var(--text-base);
    }

    /* Navigation */
    .nav__list {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: var(--space-8);
        gap: var(--space-4);
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        overflow-y: auto;
    }

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

    .nav__link {
        font-size: var(--text-lg);
        padding: var(--space-3) 0;
    }

    .nav__toggle {
        display: flex;
    }

    .nav__cta {
        display: none;
    }

    .nav__cta--mobile {
        display: block;
        margin-top: var(--space-6);
    }

    /* Mobile Dropdown */
    .nav__dropdown {
        width: 100%;
        text-align: center;
    }

    .nav__dropdown-toggle {
        justify-content: center;
    }

    .nav__dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background-color: var(--bg-secondary);
        border-radius: var(--radius-md);
        margin-top: var(--space-2);
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        padding: 0;
        transition: max-height var(--transition-normal), padding var(--transition-normal);
    }

    .nav__dropdown.is-open .nav__dropdown-menu {
        max-height: 200px;
        padding: var(--space-2) 0;
    }

    .nav__dropdown-link {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-base);
    }

    .nav__item--mobile {
        margin-top: var(--space-4);
    }

    /* Hero */
    .hero {
        min-height: 80vh;
    }

    .hero__buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero__buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    /* About */
    .about__content {
        grid-template-columns: 1fr;
    }

    .about__image {
        order: -1;
    }

    .about__image::before {
        display: none;
    }

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

    /* People Grid */
    .people__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    /* People Grid Home - 2 columns on tablet portrait */
    .people__grid--home {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Clients Grid */
    .clients__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Clients Carousel */
    .clients-carousel .slider__slide {
        flex: 0 0 33.333%;
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }

    /* Career Cards */
    .career-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .career-card .btn {
        margin-top: var(--space-4);
    }

    /* Contact */
    .contact__grid {
        grid-template-columns: 1fr;
    }

    .contact__form {
        padding: var(--space-6);
    }

    /* Japan Desk */
    .japan-desk__content {
        grid-template-columns: 1fr;
    }

    .japan-desk__image {
        order: -1;
    }

    /* M&A Corner */
    .ma-corner__services {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__brand {
        grid-column: span 1;
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .footer__bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }

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

    /* Quick Links - Tablet */
    .quick-links__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
}

/* ==========================================================================
   Mobile (max-width: 640px)
   ========================================================================== */
@media (max-width: 640px) {
    :root {
        --header-height: 60px;
    }

    /* Typography */
    h1, .hero__title, .page-header__title {
        font-size: var(--text-2xl);
    }

    h2, .section__title {
        font-size: var(--text-xl);
    }

    h3 {
        font-size: var(--text-lg);
    }

    h4 {
        font-size: var(--text-base);
    }

    /* Section */
    .section {
        padding: var(--space-12) 0;
    }

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

    /* Header */
    .header__logo-text {
        font-size: var(--text-base);
    }

    .header__logo-img {
        max-height: 40px;
    }

    /* Hero */
    .hero {
        min-height: 70vh;
    }

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

    .hero__subtitle {
        font-size: var(--text-base);
    }

    /* Buttons */
    .btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
    }

    .btn--lg {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
    }

    /* Service Cards */
    .service-card__header {
        padding: var(--space-4);
    }

    .service-card__title {
        font-size: var(--text-base);
    }

    .service-card__icon {
        width: 40px;
        height: 40px;
    }

    .service-card__icon i {
        font-size: var(--text-base);
    }

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

    /* People Grid */
    .people__grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* People Grid Home - 1 column on mobile */
    .people__grid--home {
        grid-template-columns: 1fr;
    }

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

    /* Clients Grid */
    .clients__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .client-card {
        padding: var(--space-4);
        min-height: 80px;
    }

    /* Clients Carousel */
    .clients-carousel .slider__slide {
        flex: 0 0 50%;
    }

    .clients-carousel__controls .slider__prev,
    .clients-carousel__controls .slider__next {
        width: 36px;
        height: 36px;
    }

    /* VM Cards */
    .vm-card {
        padding: var(--space-5);
    }

    .vm-card__icon {
        width: 50px;
        height: 50px;
    }

    /* Publication Cards */
    .publications__grid {
        grid-template-columns: 1fr;
    }

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

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .lightbox__prev,
    .lightbox__next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox__prev {
        left: var(--space-2);
    }

    .lightbox__next {
        right: var(--space-2);
    }

    /* Career Cards */
    .career-card {
        padding: var(--space-4);
    }

    .career-card__title {
        font-size: var(--text-base);
    }

    .career-card__meta {
        flex-direction: column;
        gap: var(--space-1);
    }

    /* Contact */
    .contact__item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

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

    .contact__map iframe {
        height: 300px;
    }

    /* Japan Desk Features */
    .japan-desk__feature {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    /* MA Service Cards */
    .ma-service-card {
        padding: var(--space-4);
    }

    .ma-service-card__icon {
        width: 60px;
        height: 60px;
    }

    /* Footer */
    .footer {
        padding: var(--space-10) 0 var(--space-6);
    }

    .footer__logo {
        font-size: var(--text-xl);
    }

    .footer__social {
        justify-content: flex-start;
    }

    /* Page Header */
    .page-header {
        padding: calc(var(--header-height) + var(--space-10)) 0 var(--space-10);
    }

    .page-header__breadcrumb {
        flex-wrap: wrap;
    }

    /* Quick Links - Mobile */
    .quick-links__grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* ==========================================================================
   Small Mobile (max-width: 375px)
   ========================================================================== */
@media (max-width: 375px) {
    :root {
        --container-padding: 0.75rem;
    }

    h1, .hero__title, .page-header__title {
        font-size: var(--text-xl);
    }

    h2, .section__title {
        font-size: var(--text-lg);
    }

    .hero__buttons .btn {
        max-width: 100%;
    }

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

    /* Clients Carousel - Small Mobile */
    .clients-carousel .slider__slide {
        flex: 0 0 100%;
    }

    /* Quick Links - Small Mobile */
    .quick-links__grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* ==========================================================================
   Large Desktop (min-width: 1400px)
   ========================================================================== */
@media (min-width: 1400px) {
    :root {
        --container-max: 1320px;
    }

    h1, .hero__title {
        font-size: var(--text-6xl);
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .header,
    .footer,
    .nav__toggle,
    .loader,
    .btn {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: var(--space-8) 0;
    }

    .hero__background,
    .hero__overlay {
        display: none;
    }

    .hero__content {
        color: var(--color-dark);
    }

    .hero__title,
    .hero__subtitle {
        color: var(--color-dark);
    }

    .section {
        padding: var(--space-8) 0;
        break-inside: avoid;
    }

    a {
        color: var(--color-dark);
        text-decoration: underline;
    }

    img {
        max-width: 100% !important;
    }
}
