/* =================================================================
   RESPONSIVE CSS PARA ANDESKAR CARGA EXPRESS
   Mobile First Approach
================================================================= */

/* =================================================================
   MEDIA QUERIES PARA TABLET (768px - 1024px)
================================================================= */
@media (max-width: 1024px) {
  
  /* TOPBAR */
  .topbar .container {
    width: 95%;
    padding: 12px 0;
  }

  .topbar-grid {
    gap: 15px;
  }

  .contact {
    gap: 20px;
  }

  .contact-item {
    font-size: 13px;
  }

  .icon-small {
    width: 18px;
    height: 18px;
    margin: 0 8px;
  }

  .logo-img {
    height: 45px;
  }

  /* NAVBAR */
  .navbar {
    width: 60%;
  }

  .main-nav {
    gap: 25px;
  }

  .main-nav a {
    font-size: 14px;
  }

  .nav-icon {
    width: 22px;
    height: 22px;
  }

  /* HERO */
  .hero {
    min-height: 70vh;
  }

  .hero h1 {
    font-size: 40px;
  }

  .destinos {
    font-size: 13px;
  }

  /* ABOUT */
  .about-grid {
    gap: 3rem;
    padding-left: 5%;
  }

  .about h2 {
    font-size: 36px;
  }

  .about p {
    font-size: 15px;
  }

  .about-img {
    width: 105%;
    transform: translateX(30px);
  }

  /* SERVICES */
  .services-grid {
    gap: 40px;
  }

  .services-title h2 {
    font-size: 40px;
  }

  .service-item h3 {
    font-size: 20px;
  }

  /* AGENCIES */
  .agency-header h2 {
    font-size: 36px;
    margin-left: 20%;
  }

  .mascota-img {
    width: 160px;
  }

  .agency-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }

  /* RASTREO */
  .rastreo-hero {
    min-height: 80vh;
  }

  .rastreo-header h1 {
    font-size: 36px;
  }

  .tabs {
    gap: 8px;
  }

  .tab {
    min-width: 130px;
    padding: 12px 15px;
  }

  .tab-icon {
    width: 26px;
    height: 26px;
  }

  .tab span {
    font-size: 13px;
  }
}

/* =================================================================
   MEDIA QUERIES PARA MÓVIL (max-width: 768px)
================================================================= */
@media (max-width: 768px) {

  /* CONTENEDOR GENERAL */
  .container {
    width: 95%;
    padding: 0 15px;
  }

  .section {
    padding: 60px 0;
  }

  /* TOPBAR */
  .topbar {
    padding: 10px 0;
  }

  .topbar .container {
    width: 100%;
    padding: 10px 15px;
  }

  .topbar-grid {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .topbar-logo {
    order: 1;
  }

  .logo-img {
    height: 40px;
  }

  .contact {
    order: 2;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .contact-item {
    font-size: 12px;
    justify-content: center;
  }

  .icon-small {
    width: 16px;
    height: 16px;
    margin: 0 6px;
  }

  .btn-small {
    order: 3;
    padding: 10px 30px;
    font-size: 13px;
    width: auto;
  }

  /* NAVBAR */
  .navbar {
    width: 100%;
    position: relative;
    margin-left: 0;
  }

  .navbar .container {
    width: 100%;
    padding: 12px 15px;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
  }

  .main-nav a {
    font-size: 12px;
    padding: 8px 12px;
  }

  .nav-icon {
    width: 20px;
    height: 20px;
  }

  /* HERO */
  .hero {
    min-height: 60vh;
    background-position: center center;
    padding: 40px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px 0;
  }

  .hero-text {
    text-align: center;
  }

  .hero h1 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 20px;
  }

  .hero h1 br {
    display: none;
  }

  .destinos {
    font-size: 11px;
    flex-direction: column;
    text-align: left;
    gap: 8px;
    padding-left: 15px;
    margin-bottom: 25px;
  }

  .btn-primary {
    padding: 14px 35px;
    font-size: 14px;
  }

  /* ABOUT SECTION */
  .about {
    padding: 60px 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-left: 0;
    padding-right: 0;
  }

  .about-grid > div:first-child {
    padding: 0 20px;
    text-align: center;
  }

  .about h2 {
    font-size: 32px;
    margin-bottom: 20px;
  }

  .about-grid img {
    margin-bottom: 30px;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }

  .about p {
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
  }

  .about-image {
    order: -1;
    justify-content: center;
    padding: 0;
  }

  .about-img {
    width: 100%;
    max-width: 100%;
    transform: translateX(0);
    margin-right: 0;
    padding: 0 15px;
  }

  /* SERVICES */
  .services {
    padding: 60px 0;
  }

  .services::before {
    width: 250px;
    height: 250px;
    bottom: -200px;
    left: -100px;
    border-width: 60px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px;
  }

  .services-title {
    text-align: center;
  }

  .services-title h2 {
    font-size: 32px;
    line-height: 1.2;
  }

  .services-title h2 br {
    display: none;
  }

  .services-title h2 span {
    display: block;
  }

  .service-list {
    gap: 20px;
  }

  .service-item {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px;
  }

  .service-icon {
    margin-bottom: 15px;
  }

  .icon-service {
    width: 60px;
    height: 60px;
  }

  .service-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .service-item p {
    font-size: 14px;
  }

  /* AGENCIES */
  .agencies {
    padding: 60px 0;
  }

  .agency-header {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
  }

  .agency-header h2 {
    font-size: 28px;
    text-align: center;
    margin-left: 0;
    line-height: 1.2;
  }

  .agency-header h2 br {
    display: none;
  }

  .mascota-img {
    width: 120px;
  }

  .agency-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .agency-card {
    border-radius: 12px;
  }

  .agency-info {
    padding: 20px;
  }

  .agency-info h4 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .agency-info p {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .agency-info p img {
    height: 24px;
  }

  .agency-map {
    height: 180px;
  }

  /* FOOTER */
  .footer {
    padding: 40px 0 30px;
  }

  .footer-container {
    padding: 0 20px;
  }

  .footer-logo-box {
    margin-bottom: 20px;
  }

  .footer-logo {
    width: 120px !important;
  }

  .footer-links {
    margin-bottom: 20px;
  }

  .footer-link {
    font-size: 13px;
  }

  .footer-bottom p {
    font-size: 11px;
    line-height: 1.5;
  }

  /* RASTREO PAGE */
  .rastreo-hero {
    min-height: auto;
    padding: 40px 0;
  }

  .rastreo-content {
    padding: 30px 15px;
  }

  .rastreo-header {
    margin-bottom: 30px;
  }

  .rastreo-header h1 {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .rastreo-header p {
    font-size: 14px;
    line-height: 1.6;
  }

  .rastreo-card {
    padding: 25px 20px;
  }

  /* TABS EN MÓVIL */
  .tabs {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .tab {
    flex: 1 1 calc(50% - 10px);
    min-width: auto;
    max-width: calc(50% - 5px);
    padding: 12px 10px;
  }

  .tab-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
  }

  .tab span {
    font-size: 11px;
    line-height: 1.2;
  }

  /* FORMULARIOS */
  .rastreo-form {
    padding: 20px 0;
  }

  .input-group {
    margin-bottom: 15px;
  }

  .input-group label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .input-group input {
    padding: 12px;
    font-size: 14px;
  }

  .btn-rastreo {
    padding: 14px 20px;
    font-size: 14px;
    gap: 8px;
  }

  .btn-rastreo i {
    font-size: 16px;
  }
}

/* =================================================================
   MEDIA QUERIES PARA MÓVIL PEQUEÑO (max-width: 480px)
================================================================= */
@media (max-width: 480px) {

  /* TOPBAR */
  .logo-img {
    height: 35px;
  }

  .contact-item {
    font-size: 11px;
  }

  .btn-small {
    padding: 8px 20px;
    font-size: 12px;
  }

  /* NAVBAR */
  .main-nav a {
    font-size: 11px;
    padding: 6px 10px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
  }

  /* HERO */
  .hero {
    min-height: 50vh;
    padding: 30px 0;
  }

  .hero h1 {
    font-size: 24px;
  }

  .destinos {
    font-size: 10px;
    padding-left: 12px;
  }

  .btn-primary {
    padding: 12px 28px;
    font-size: 13px;
  }

  /* ABOUT */
  .about h2 {
    font-size: 26px;
  }

  .about-grid img {
    max-width: 200px;
  }

  .about p {
    font-size: 13px;
  }

  /* SERVICES */
  .services-title h2 {
    font-size: 26px;
  }

  .icon-service {
    width: 50px;
    height: 50px;
  }

  .service-item h3 {
    font-size: 16px;
  }

  .service-item p {
    font-size: 13px;
  }

  /* AGENCIES */
  .agency-header h2 {
    font-size: 24px;
  }

  .mascota-img {
    width: 100px;
  }

  .agency-info h4 {
    font-size: 15px;
  }

  .agency-info p {
    font-size: 11px;
  }

  .agency-info p img {
    height: 20px;
  }

  /* RASTREO */
  .rastreo-header h1 {
    font-size: 24px;
  }

  .rastreo-header p {
    font-size: 13px;
  }

  .rastreo-card {
    padding: 20px 15px;
  }

  .tab {
    padding: 10px 8px;
  }

  .tab-icon {
    width: 20px;
    height: 20px;
  }

  .tab span {
    font-size: 10px;
  }

  .input-group label {
    font-size: 12px;
  }

  .input-group input {
    padding: 10px;
    font-size: 13px;
  }

  .btn-rastreo {
    padding: 12px 18px;
    font-size: 13px;
  }
}

/* =================================================================
   AJUSTES ADICIONALES PARA MEJOR EXPERIENCIA RESPONSIVE
================================================================= */

/* Asegurar que las imágenes sean responsive */
@media (max-width: 768px) {
  img {
    max-width: 100%;
    height: auto;
  }

  /* Ajustar iframes de mapas */
  iframe {
    max-width: 100%;
  }

  /* Ocultar overflow horizontal */
  body {
    overflow-x: hidden;
  }

  /* Ajustar animaciones en móvil */
  .about-img,
  .hero-img,
  .mascota-img {
    animation: none;
  }

  /* Botones más táctiles en móvil */
  button,
  .btn-primary,
  .btn-small,
  .btn-rastreo,
  a {
    min-height: 44px;
    min-width: 44px;
  }

  /* Mejorar legibilidad de textos */
  p,
  li,
  span {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* =================================================================
   ORIENTACIÓN LANDSCAPE EN MÓVILES
================================================================= */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
  }

  .rastreo-hero {
    min-height: 100vh;
  }

  .hero-grid {
    padding: 30px 0;
  }
}

/* =================================================================
   MODO OSCURO (Opcional - Solo si lo implementas)
================================================================= */
@media (prefers-color-scheme: dark) {
  /* Aquí puedes agregar estilos para modo oscuro si lo deseas */
}

/* =================================================================
   ALTA RESOLUCIÓN / RETINA DISPLAYS
================================================================= */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimizaciones para pantallas de alta resolución */
  .logo-img,
  .icon-small,
  .icon-service,
  .tab-icon {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* =================================================================
   ACCESIBILIDAD - REDUCE MOTION
================================================================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}