/**
 * Responsive Design - DataLab UERJ
 * Mobile-first baseado no design original
 */

/* ============================================
   BREAKPOINTS

   Mobile:  < 768px   (default - mobile-first)
   Tablet:  768px - 1024px
   Desktop: > 1024px
   ============================================ */

/* ============================================
   TABLET (768px and up)
   ============================================ */

@media (min-width: 768px) {

  /* Typography adjustments */
  h1 {
    font-size: var(--font-size-5xl);
  }

  h2 {
    font-size: var(--font-size-4xl);
  }

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

  p {
    font-size: var(--font-size-base);
  }

  /* Header navigation */
  nav {
    gap: var(--spacing-xl);
    display: flex;
  }

  /* Navigation visibility */
  .nav-toggle {
    display: none;
  }

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

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

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

  /* Hero section */
  .hero {
    padding: var(--spacing-3xl) 0;
  }

  .hero p {
    font-size: var(--font-size-lg);
  }

  /* Footer adjustments */
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .section-alt {
    padding: var(--spacing-3xl) 0;
  }

}

/* ============================================
   DESKTOP (1024px and up)
   ============================================ */

@media (min-width: 1024px) {

  /* Typography - larger on desktop */
  h1 {
    font-size: var(--font-size-6xl);
  }

  h2 {
    font-size: var(--font-size-5xl);
  }

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

  /* Spacing adjustments */
  .section {
    padding: var(--spacing-3xl) 0;
  }

  .section-alt {
    padding: var(--spacing-3xl) 0;
  }

  /* Hero section enhancement */
  .hero {
    padding: var(--spacing-4xl) 0;
  }

  .hero-buttons {
    gap: var(--spacing-lg);
  }

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

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

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

  /* Footer grid */
  .footer-columns {
    grid-template-columns: repeat(4, 1fr);
  }

}

/* ============================================
   LARGE DESKTOP (1440px and up)
   ============================================ */

@media (min-width: 1440px) {

  .container {
    max-width: 1320px;
  }

}

/* ============================================
   SMALL MOBILE (< 480px)
   ============================================ */

@media (max-width: 479px) {

  /* Typography on small screens */
  h1 {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
  }

  h2 {
    font-size: var(--font-size-3xl);
  }

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

  p {
    font-size: var(--font-size-base);
  }

  /* Reduce spacing on mobile */
  .section {
    padding: var(--spacing-2xl) 0;
  }

  .section-alt {
    padding: var(--spacing-2xl) 0;
  }

  /* Stack buttons on small screens */
  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .btn {
    width: 100%;
  }

  /* Navigation hidden by default on small mobile */
  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg-light);
    padding: var(--spacing-md);
    gap: 0;
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-md);
    z-index: 50;
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-border-light);
    display: block;
  }

  nav a:last-child {
    border-bottom: none;
  }

  nav a::after {
    display: none;
  }

  /* Menu toggle visible */
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    color: var(--color-primary);
    font-size: var(--font-size-lg);
  }

  /* Reduce padding in containers */
  .container {
    padding: 0 var(--spacing-md);
  }

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

  /* Footer single column */
  .footer-columns {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  /* Header adjustments */
  .header-content {
    padding: var(--spacing-md) 0;
    gap: var(--spacing-md);
  }

  .logo-name {
    font-size: var(--font-size-base);
  }

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

  .header-lang-selector {
    margin-left: auto;
    gap: var(--spacing-sm);
  }

  /* Hero section mobile */
  .hero {
    padding: var(--spacing-2xl) 0;
  }

  .hero h1 {
    font-size: var(--font-size-4xl);
  }

  .hero p {
    font-size: var(--font-size-base);
  }

}

/* ============================================
   TABLET LANDSCAPE (768px - 1024px landscape)
   ============================================ */

@media (min-width: 768px) and (orientation: landscape) {

  .hero {
    padding: var(--spacing-2xl) 0;
  }

  .hero p {
    font-size: var(--font-size-base);
  }

}

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

@media print {

  header, footer, .nav-toggle, .language-selector {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
  }

  .container {
    max-width: 100%;
  }

  .section {
    page-break-inside: avoid;
  }

}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}

/* ============================================
   UTILITIES - RESPONSIVE
   ============================================ */

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

@media (min-width: 768px) and (max-width: 1023px) {
  .hide-tablet {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .hide-desktop {
    display: none !important;
  }
}
