/* Responsive Styles */
/* Mobile-first responsive design with breakpoints */

/* ========================================
   LARGE TABLETS & SMALL LAPTOPS (max-width: 992px)
   ======================================== */

@media (max-width: 992px) {
  /* Typography adjustments */
  :root {
    --fs-hero: 2.5rem;      /* 40px */
    --fs-h1: 2rem;          /* 32px */
    --fs-h2: 1.75rem;       /* 28px */
    --fs-h3: 1.375rem;      /* 22px */
  }

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

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

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
  }

  .footer-column:last-child {
    grid-column: 1 / -1;
  }

  /* Timeline */
  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    justify-content: flex-start !important;
    text-align: left !important;
    padding-left: 60px;
  }

  .timeline-content {
    max-width: 100%;
  }

  .timeline-content::before {
    left: -28px !important;
  }
}

/* ========================================
   TABLETS (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
  /* Header adjustments */
  .header {
    height: var(--header-height-mobile);
  }

  .header-container {
    padding: 0 var(--space-md);
  }

  .logo-img {
    width: 40px;
    height: 40px;
  }

  .logo-title {
    font-size: var(--fs-body);
  }

  .logo-subtitle {
    font-size: var(--fs-caption);
  }

  /* Hide desktop navigation */
  .main-nav {
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--bg-cream);
    padding: var(--space-xl);
    gap: var(--space-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    transition: transform var(--transition-base);
    z-index: var(--z-dropdown);
  }

  .main-nav.active {
    transform: translateY(0);
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: var(--space-md);
    font-size: var(--fs-body);
  }

  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Navigation container adjustments */
  .nav-container {
    gap: var(--space-lg);
  }

  /* Typography adjustments */
  :root {
    --fs-hero: 2rem;        /* 32px */
    --fs-h1: 1.75rem;       /* 28px */
    --fs-h2: 1.5rem;        /* 24px */
    --fs-h3: 1.25rem;       /* 20px */
  }

  /* Sections */
  .section {
    padding: var(--space-3xl) 0;
  }

  .section-lg {
    padding: var(--space-4xl) 0;
  }

  /* Grid layouts */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  /* Hero */
  .hero {
    min-height: 400px;
    padding: var(--space-3xl) var(--space-md);
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: var(--fs-h4);
  }

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

  .hero-cta .btn {
    width: 100%;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-column:last-child {
    grid-column: 1;
  }

  /* Cards */
  .card {
    padding: var(--space-lg);
  }

  /* Timeline */
  .timeline {
    padding: var(--space-xl) 0;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    padding-left: 50px;
  }

  .timeline-content::before {
    left: -23px !important;
  }

  /* Map */
  .map-container {
    height: 300px;
  }

  /* Contact items */
  .contact-item {
    padding: var(--space-md);
  }

  /* Buttons */
  .btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--fs-body);
  }
}

/* ========================================
   MOBILE PHONES (max-width: 576px)
   ======================================== */

@media (max-width: 576px) {
  /* Container padding */
  .container {
    padding: 0 var(--space-sm);
  }

  /* Typography */
  :root {
    --fs-hero: 1.75rem;     /* 28px */
    --fs-h1: 1.5rem;        /* 24px */
    --fs-h2: 1.25rem;       /* 20px */
    --fs-h3: 1.125rem;      /* 18px */
    --fs-h4: 1rem;          /* 16px */
    --fs-body-lg: 1rem;     /* 16px */
  }

  /* Header */
  .header-container {
    padding: 0 var(--space-sm);
  }

  .logo-text {
    display: none; /* Hide text on very small screens, show logo only */
  }

  /* Sections */
  .section {
    padding: var(--space-2xl) 0;
  }

  .section-lg {
    padding: var(--space-3xl) 0;
  }

  .section-title {
    margin-bottom: var(--space-2xl);
  }

  /* Hero */
  .hero {
    min-height: 300px;
    padding: var(--space-2xl) var(--space-sm);
  }

  .hero-title {
    font-size: 1.75rem;
    margin-bottom: var(--space-md);
  }

  .hero-subtitle {
    font-size: var(--fs-h5);
    margin-bottom: var(--space-lg);
  }

  .hero-text {
    font-size: var(--fs-body);
    margin-bottom: var(--space-lg);
  }

  /* Buttons */
  .btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--fs-body-sm);
  }

  .btn-lg {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--fs-body-sm);
  }

  /* Cards */
  .card {
    padding: var(--space-md);
  }

  .card-icon {
    width: 48px;
    height: 48px;
  }

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

  /* Footer */
  .footer {
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
  }

  .footer-container {
    padding: 0 var(--space-sm);
  }

  .footer-content {
    gap: var(--space-lg);
  }

  .footer-column h3 {
    font-size: var(--fs-h5);
    margin-bottom: var(--space-md);
  }

  /* Timeline */
  .timeline {
    padding: var(--space-lg) 0;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item {
    padding-left: 40px;
    margin-bottom: var(--space-2xl);
  }

  .timeline-content {
    padding: var(--space-md);
  }

  .timeline-content::before {
    width: 14px;
    height: 14px;
    left: -19px !important;
    top: 15px;
  }

  .timeline-year {
    font-size: var(--fs-body-lg);
  }

  .timeline-title {
    font-size: var(--fs-body);
  }

  .timeline-description {
    font-size: var(--fs-body-sm);
  }

  /* Forms */
  .form-input,
  .form-textarea,
  .form-select {
    padding: var(--space-sm);
  }

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

  .contact-details h3 {
    font-size: var(--fs-body-sm);
  }

  .contact-details p,
  .contact-details a {
    font-size: var(--fs-body);
  }

  /* Language switcher */
  .lang-switcher {
    padding: var(--space-xs) var(--space-sm);
  }

  .lang-btn {
    font-size: var(--fs-caption);
    padding: var(--space-xs);
  }

  /* Map */
  .map-container {
    height: 250px;
    margin: var(--space-lg) 0;
  }

  /* Expertise items */
  .expertise-item {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }

  .expertise-icon {
    width: 24px;
    height: 24px;
  }

  .expertise-text {
    font-size: var(--fs-body-sm);
  }
}

/* ========================================
   VERY SMALL DEVICES (max-width: 375px)
   ======================================== */

@media (max-width: 375px) {
  /* Ultra-compact adjustments */
  :root {
    --space-xs: 0.375rem;   /* 6px */
    --space-sm: 0.625rem;   /* 10px */
    --space-md: 0.875rem;   /* 14px */
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .logo-img {
    width: 35px;
    height: 35px;
  }

  .btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
  }
}

/* ========================================
   LANDSCAPE MOBILE (max-height: 500px)
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
  }

  .main-nav {
    max-height: calc(100vh - var(--header-height-mobile));
    overflow-y: auto;
  }
}

/* ========================================
   LARGE SCREENS (min-width: 1400px)
   ======================================== */

@media (min-width: 1400px) {
  .container {
    max-width: var(--container-2xl);
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .section-lg {
    padding: var(--space-5xl) 0;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .header,
  .footer,
  .mobile-menu-toggle,
  .lang-switcher,
  .btn,
  .skip-link {
    display: none !important;
  }

  body {
    background-color: white;
    color: black;
  }

  .hero {
    background: none;
    color: black;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  a {
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
  }
}
