/* ========================================
   Salud Aguilar - Responsive Design
   Mobile First Approach
   ======================================== */

/* ========== Extra Small devices (default - phones, less than 576px) ========== */
/* Estilos base ya definidos en styles.css */

/* ========== Small devices (landscape phones, 576px and up) ========== */
@media (min-width: 576px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .hero h1 {
    font-size: 3rem;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* ========== Medium devices (tablets, 768px and up) ========== */
@media (min-width: 768px) {
  :root {
    --h1-size: 3.5rem;
    --h2-size: 2.8rem;
    --h3-size: 2.2rem;
    --h4-size: 1.6rem;
  }

  .header-content {
    padding: var(--spacing-sm) 0;
  }

  .nav-menu {
    gap: var(--spacing-md);
  }

  .hero {
    padding-top: 120px;
  }

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

  .hero .slogan {
    font-size: 1.6rem;
  }

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

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

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

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

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

/* ========== Large devices (desktops, 992px and up) ========== */
@media (min-width: 992px) {
  :root {
    --h1-size: 4rem;
    --h2-size: 3rem;
    --h3-size: 2.5rem;
    --h4-size: 1.8rem;
  }

  .container {
    max-width: 1200px;
  }

  .nav-menu {
    gap: var(--spacing-lg);
  }

  .hero h1 {
    font-size: 4rem;
  }

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

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

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

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

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

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

/* ========== Extra large devices (large desktops, 1200px and up) ========== */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }

  .cards-grid {
    gap: var(--spacing-lg);
  }

  .section {
    padding: calc(var(--spacing-xl) * 1.5) 0;
  }
}

/* ========== Mobile Menu (max-width: 1100px) ========== */
@media (max-width: 1100px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

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

  .nav-menu a {
    width: 100%;
    padding: var(--spacing-sm);
    text-align: center;
  }

  .btn-cta {
    width: 100%;
    margin-top: var(--spacing-sm);
  }

  /* Hero ajustes móvil */
  .hero {
    min-height: 80vh;
    padding-top: 80px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .slogan {
    font-size: 1.2rem;
  }

  /* Cards en columna en móvil */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

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

  .contact-info {
    grid-template-columns: 1fr;
  }

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

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

  /* Formulario en móvil */
  .form-row {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .contact-form {
    padding: var(--spacing-md);
  }

  /* Botones flotantes ajustes móvil */
  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    bottom: 20px;
    right: 20px;
  }

  .scroll-top {
    width: 40px;
    height: 40px;
    bottom: 80px;
    right: 20px;
  }

  /* PDF Viewer en móvil */
  .pdf-controls {
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
  }

  .pdf-controls button {
    width: 100%;
  }

  /* Mapa más pequeño en móvil */
  .map-container {
    height: 300px;
  }

  /* Sección valores más compacta */
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }

  /* Reducir padding en secciones móvil */
  .section {
    padding: var(--spacing-lg) 0;
  }

  .section-header h2 {
    font-size: 2rem;
  }
}

/* ========== Ajustes para pantallas muy pequeñas (max-width: 375px) ========== */
@media (max-width: 375px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .slogan {
    font-size: 1rem;
  }

  .card {
    padding: var(--spacing-sm);
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .team-member img {
    width: 150px;
    height: 150px;
  }

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

/* ========== Landscape Mode Adjustments ========== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--spacing-xl) 0;
  }

  .header-content {
    padding: var(--spacing-xs) 0;
  }

  .nav-menu {
    max-height: 60vh;
  }
}

/* ========== Print Styles ========== */
@media print {
  .header,
  .footer,
  .whatsapp-float,
  .scroll-top,
  .menu-toggle,
  .btn-cta {
    display: none;
  }

  .hero {
    padding-top: 0;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  h1 {
    font-size: 24pt;
  }

  h2 {
    font-size: 20pt;
  }

  h3 {
    font-size: 16pt;
  }

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

/* ========== Logo Responsive ========== */
/* Logo Horizontal en todas las pantallas */
.logo img {
  display: block;
  height: 60px;
  width: auto;
  transition: all 0.3s ease;
}

/* En móviles, logo un poco más pequeño */
@media (max-width: 768px) {
  .logo img {
    height: 50px;
  }
}

/* ========== High DPI Displays ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ajustes para pantallas Retina */
  .logo img {
    image-rendering: -webkit-optimize-contrast;
  }
}
