/* ==========================================================================
   Responsive Design - Mobile First
   ========================================================================== */

/* Tablet y Desktop */
@media (min-width: 768px) {
  .col-md-3 { width: 25%; }
  .col-md-4 { width: 33.333%; }
  .col-md-6 { width: 50%; }
  .col-md-8 { width: 66.666%; }
  .col-md-9 { width: 75%; }
  .col-md-12 { width: 100%; }
}

@media (min-width: 992px) {
  .col-lg-3 { width: 25%; }
  .col-lg-4 { width: 33.333%; }
  .col-lg-6 { width: 50%; }
  .col-lg-8 { width: 66.666%; }
  .col-lg-12 { width: 100%; }
}

/* Mobile - Menos de 768px */
@media (max-width: 767px) {
  /* Navegación móvil */
  .navbar-toggler {
    display: block;
  }
  
  .navbar .container {
    padding: 15px;
    min-height: 70px;
  }
  
  .navbar-logo img {
    height: 4rem;
  }
  
  .navbar-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: var(--shadow-md);
  }
  
  .navbar-menu.active {
    max-height: 100vh;
    padding: 20px 0;
  }
  
  .navbar-menu li {
    margin: 0;
    border-bottom: 1px solid var(--color-gray-light);
  }
  
  .navbar-menu a {
    padding: 15px 30px;
  }
  
  .dropdown-menu {
    position: static;
    box-shadow: none;
    display: none;
    background-color: var(--color-gray-light);
  }
  
  .dropdown.active .dropdown-menu {
    display: block;
  }
  
  .dropdown-menu a {
    padding: 12px 50px;
  }
  
  /* Textos centrados en móvil */
  .text-left,
  .text-right,
  .text-center {
    text-align: center !important;
  }
  
  /* Cards apiladas */
  [class*="col-"] {
    width: 100%;
  }
  
  .card {
    margin-bottom: 20px;
  }
  
  /* Gallery grid responsive */
  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  /* Blog grid responsive */
  #blog-grid {
    display: flex;
    flex-direction: column;
  }
  
  #blog-grid .col-12,
  #blog-grid .col-md-6,
  #blog-grid .col-lg-4 {
    width: 100%;
    margin-bottom: 20px;
  }
  
  /* Imágenes responsive */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Secciones */
  section {
    padding: 40px 0;
  }
  
  /* Botones */
  .btn {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }
  
  /* Footer */
  footer {
    padding: 20px 0 15px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .footer-left {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .footer-logo-img {
    width: 42px;
  }
  
  .footer-text {
    align-items: center;
  }
  
  .footer-text p {
    font-size: 0.9rem;
  }
  
  .social-list {
    justify-content: center;
  }
  
  /* WhatsApp */
  .whatsapp-float {
    width: 55px;
    height: 55px;
    font-size: 1.7rem;
    bottom: 20px;
    left: 20px;
  }
  
  .whatsapp-popup {
    width: calc(100% - 40px);
    left: 20px;
    bottom: 90px;
  }
  
  /* Scroll to top */
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
  
  /* Tipografía responsive */
  .display-1 {
    font-size: clamp(2rem, 7vw, 3.5rem);
  }
  
  .display-2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }
  
  .display-4 {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
  }
  
  .display-5 {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
  }
  
  .display-7 {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  }
  
  /* Hero simple responsive */
  .hero-simple {
    padding: 80px 15px 20px !important;
  }
  
  .hero-simple h1 {
    font-size: 1.8rem !important;
  }
  
  .hero-simple h2 {
    font-size: 1.1rem !important;
  }
  
  /* Post header responsive */
  .post-header {
    padding: 30px 15px 20px !important;
  }
  
  .post-header h1 {
    font-size: 1.5rem !important;
   
  }
  
  .post-content {
    padding: 30px 0 !important;
  }
  
  .post-body {
    padding: 0 15px;
  }
  
  /* Formularios responsive */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important; /* Previene zoom en iOS */
    padding: 12px 15px;
    width: 100%;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  
  .contact-form,
  .contact-info {
    padding: 25px 20px !important;
  }
  
  /* Tablas responsive */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Parallax deshabilitado en móvil */
  .parallax-background {
    background-attachment: scroll;
  }
}

/* Tablet - 768px a 991px */
@media (min-width: 768px) and (max-width: 991px) {
  .navbar-logo img {
    height: 5rem;
  }
  
  .navbar-menu a {
    font-size: 1rem;
    padding: 8px 12px;
  }
  
  .navbar-menu li {
    margin: 0 10px;
  }
  
  section {
    padding: 50px 0;
  }
}

/* Desktop grande - más de 1200px */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }
}

/* Print styles */
@media print {
  .navbar,
  .whatsapp-float,
  .whatsapp-popup,
  .scroll-to-top,
  footer .social-list {
    display: none !important;
  }
  
  section {
    page-break-inside: avoid;
  }
  
  a {
    text-decoration: underline;
  }
}

/* Modo oscuro (si se desea implementar) */
@media (prefers-color-scheme: dark) {
  /* Comentado por ahora
  :root {
    --color-bg: #1a1a1a;
    --color-text: #ffffff;
  }
  */
}

/* Reducir movimiento para accesibilidad */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
