/* ========================================
   RESPONSIVE STYLES
   Matas Paulinas Consulting & Management
   ======================================== */

/* ===========================================
   BREAKPOINT: 1200px (Large Screens / Desktops)
   =========================================== */
@media (max-width: 1200px) {
    .container {
        max-width: 1100px;
    }

    /* Slightly reduce hero spacing */
    .hero {
        padding: 100px 0 80px;
    }

    /* Service cards - adjust grid */
    .services-grid {
        gap: 20px;
    }
}

/* ===========================================
   BREAKPOINT: 1024px (Tablets Landscape)
   =========================================== */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
        padding: 0 32px;
    }

    /* Typography adjustments */
    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    /* Timeline - stack on tablets */
    .timeline-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .timeline-item {
        grid-column: 1;
    }

    /* Footer - reduce columns */
    .footer-content.three-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .footer-col.contact {
        grid-column: 1 / -1;
    }

    /* Approach principles - adjust layout */
    .principles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ===========================================
   BREAKPOINT: 992px (Tablets / Small Laptops)
   =========================================== */
@media (max-width: 992px) {
    .container {
        padding: 0 28px;
    }

    /* Mobile Navigation - Hamburger appears here */
    .hamburger-menu {
        display: flex !important; /* Show hamburger on smaller screens */
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 8px;
        z-index: 1001;
        background: transparent;
        border: none;
        margin-left: auto;
        order: 3;
        position: relative;
    }

    .hamburger-menu span {
        display: block;
        width: 28px;
        height: 3px;
        background: var(--graphite);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    .hamburger-menu:hover span {
        background: var(--deep-olive);
    }

    .hamburger-menu:active {
        transform: scale(0.95);
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Header layout - logo left, hamburger right */
    .header-inner {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .brand {
        order: 1;
    }

    nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--bg);
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        padding: 80px 24px 32px;
        max-height: 100vh;
        overflow-y: auto;
        order: 2;
    }

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

    .nav {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav li {
        border-bottom: 1px solid var(--porcelain);
    }

    .nav li:last-child {
        border-bottom: none;
    }

    .nav a {
        font-size: 18px;
        font-weight: 500;
        padding: 20px 16px;
        display: block;
        color: var(--graphite);
        transition: all 0.3s ease;
    }

    .nav a:hover {
        background: var(--porcelain);
        padding-left: 24px;
    }

    .nav a::after {
        display: none;
    }

    /* Overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Hero adjustments */
    .hero {
        padding: 80px 0 60px;
    }

    .hero h1 {
        font-size: 34px;
    }

    /* Services grid - 2 columns */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Tiers grid - stack */
    .tiers-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Contact form - full width */
    .contact-form {
        max-width: 100%;
    }
}

/* ===========================================
   BREAKPOINT: 900px (Footer Adjustment)
   =========================================== */
@media (max-width: 900px) {
    .site-footer .footer-col.contact {
        justify-self: start;
        text-align: left;
        margin-top: 0;
    }
}

/* ===========================================
   BREAKPOINT: 768px (Tablets Portrait / Large Phones)
   =========================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    /* Typography - mobile scaling */
    h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 18px;
    }

    .intro-large {
        font-size: 18px;
        line-height: 1.6;
    }

    /* Header brand - slightly smaller */
    .brand-name {
        font-size: 16px;
    }

    .brand-sub {
        font-size: 8px;
    }

    /* Sections - reduce padding */
    section {
        padding: 64px 0;
    }

    .hero {
        padding: 60px 0 40px;
    }

    /* Services - single column */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Service card - adjust */
    .service-card {
        padding: 24px 20px;
    }

    /* Timeline items */
    .timeline-item {
        padding: 24px 20px;
    }

    /* Insights grid - single column */
    .insights-grid {
        grid-template-columns: 1fr;
    }

    /* Footer - stack columns */
    .footer-content.three-cols {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Contact form fields - stack */
    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .form-group {
        width: 100%;
    }

    /* FAQ accordion */
    .faq-item {
        padding: 20px;
    }

    /* Approach sections */
    .approach-section {
        padding: 48px 0;
    }
}

/* ===========================================
   BREAKPOINT: 480px (Mobile Phones)
   =========================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    /* Typography - aggressive mobile scaling */
    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 16px;
    }

    .eyebrow {
        font-size: 11px;
    }

    /* Navigation - stack or hamburger menu */
    .header-inner {
        flex-wrap: wrap;
        gap: 16px;
    }

    .nav {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding-top: 12px;
        display: none; /* Hidden by default on mobile */
    }

    .nav.mobile-open {
        display: flex;
    }

    .brand-name {
        font-size: 15px;
        letter-spacing: 0.12em;
    }

    .brand-sub {
        font-size: 7px;
    }

    /* Sections - tighter spacing */
    section {
        padding: 48px 0;
    }

    .hero {
        padding: 48px 0 32px;
    }

    /* Service cards */
    .service-card {
        padding: 20px 16px;
    }

    .service-card h3 {
        font-size: 18px;
    }

    /* Buttons */
    .btn, .cta-link {
        font-size: 13px;
        padding: 12px 24px;
    }

    /* Insight cards */
    .insight-card {
        padding: 20px 16px;
    }

    .card-title {
        font-size: 16px;
    }

    /* Footer - compact */
    .site-footer {
        padding: 40px 0 24px;
    }

    .footer-top {
        margin-bottom: 24px;
    }

    .footer-tagline {
        font-size: 12px;
    }

    .footer-content.three-cols {
        gap: 28px;
    }

    .footer-col h5 {
        font-size: 12px;
    }

    .footer-col a, .contact-list li {
        font-size: 13px;
    }

    /* Contact form */
    .contact-form {
        padding: 24px 20px;
    }

    input, textarea, select {
        font-size: 14px;
        padding: 12px;
    }

    /* Timeline */
    .timeline-item {
        padding: 20px 16px;
    }

    .timeline-year {
        font-size: 16px;
    }

    /* Filters on insights page */
    .filters {
        gap: 8px;
    }

    .chip {
        font-size: 12px;
        padding: 6px 12px;
    }

    .filter-label {
        font-size: 11px;
        width: 100%;
        margin-bottom: 4px;
    }

    /* Social icons - slightly smaller */
    .footer-social a svg {
        width: 20px;
        height: 20px;
    }

    /* Landing overlay - adjust */
    .landing-logo {
        font-size: 28px;
    }

    .landing-sub {
        font-size: 10px;
    }

    .landing-tagline {
        font-size: 11px;
    }
}

/* ===========================================
   EXTRA SMALL DEVICES: 360px
   =========================================== */
@media (max-width: 360px) {
    .container {
        padding: 0 16px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .hero {
        padding: 40px 0 28px;
    }

    section {
        padding: 40px 0;
    }

    /* Ensure no horizontal scroll */
    body {
        overflow-x: hidden;
    }

    .service-card,
    .insight-card,
    .timeline-item,
    .faq-item {
        padding: 16px 12px;
    }
}

/* ===========================================
   UTILITY CLASSES FOR RESPONSIVE BEHAVIOR
   =========================================== */

/* Hamburger menu - hidden by default on desktop */
.hamburger-menu {
    display: none;
}

/* Hide on mobile */
.hide-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

/* Show only on mobile */
.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block;
    }
}

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

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive tables */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
    }
}
