/* ========================================
   GABSSA - Responsive Styles
   ======================================== */

/* Base responsive font sizing */
html {
  font-size: 14px !important;
}

/* Navbar responsive improvements */
.navbar {
  padding: 0.5rem 1rem !important;
}

.navbar img {
  height: 50px !important;
  max-height: 50px !important;
}

.nav-links a {
  font-size: 16px !important;
}

/* Tablet styles */
@media only screen and (max-width: 991px) {
  html {
    font-size: 15px !important;
  }
  
  #menu-horizontal .ui.container {
    padding: 0 15px !important;
  }
  
  #cuerpo {
    padding: 15px !important;
  }
}

/* Mobile styles */
@media only screen and (max-width: 768px) {
  html {
    font-size: 16px !important;
  }

  /* Navbar mobile adjustments */
  .navbar {
    padding: 0.3rem 1rem !important;
  }

  .navbar img {
    height: 40px !important;
  }

  .nav-links a {
    font-size: 18px !important;
    padding: 1rem 0 !important;
  }

  .menu-toggle {
    font-size: 1.8rem !important;
  }
  
  /* Navigation improvements */
  #menu-horizontal {
    padding: 0 !important;
    height: auto !important;
    min-height: 50px;
  }
  
  #menu-horizontal .ui.container {
    padding: 0 10px !important;
    flex-wrap: wrap;
  }
  
  #menu-horizontal .item {
    padding: 0.5rem 0.3rem !important;
    font-size: 0.8rem !important;
    min-width: auto !important;
    flex: none !important;
  }
  
  /* Hide complex dropdown forms on mobile */
  #menu-horizontal .ui.form {
    display: none !important;
  }
  
  /* Logo adjustments */
  #logo {
    width: 20px !important;
    margin-right: 8px !important;
  }
  
  /* Body content adjustments */
  #cuerpo {
    margin-top: 60px !important;
    padding: 10px !important;
  }
  
  /* Sidebar adjustments */
  #menu-izquierdo {
    width: 280px !important;
  }
  
  /* Message alerts */
  .ui.negative.message {
    margin: 0 10px !important;
    font-size: 0.9rem !important;
  }
  
  /* Interaccion bar adjustments */
  .ui.fixed.inverted.blue.menu {
    padding: 0 10px !important;
  }
  
  .ui.fixed.inverted.blue.menu .item {
    padding: 0.3rem 0.2rem !important;
    font-size: 0.7rem !important;
  }
  
  .ui.fixed.inverted.blue.menu textarea {
    font-size: 0.8rem !important;
    min-height: 60px !important;
  }
}

/* Small mobile styles */
@media only screen and (max-width: 480px) {
  html {
    font-size: 18px !important;
  }

  /* Navbar extra small screens */
  .navbar {
    padding: 0.2rem 0.5rem !important;
  }

  .navbar img {
    height: 35px !important;
  }

  .nav-links a {
    font-size: 16px !important;
    padding: 0.8rem 0 !important;
  }

  .menu-toggle {
    font-size: 1.5rem !important;
  }
  
  /* Navigation brand */
  #menu-horizontal .navbar-brand {
    font-size: 0.7rem !important;
    padding: 0.3rem !important;
  }
  
  /* Body adjustments */
  #cuerpo {
    margin-top: 50px !important;
    padding: 5px !important;
  }
  
  /* Logo further reduction */
  #logo {
    width: 18px !important;
    margin-right: 6px !important;
  }
  
  /* Menu items even smaller */
  #menu-horizontal .item {
    padding: 0.3rem 0.2rem !important;
    font-size: 0.7rem !important;
  }
  
  /* Social buttons adjustments are already in app.css */
}

/* Landscape orientation adjustments */
@media only screen and (max-height: 500px) and (orientation: landscape) {
  #cuerpo {
    margin-top: 45px !important;
  }
  
  #menu-horizontal {
    min-height: 40px !important;
  }
  
  .social-buttons {
    bottom: 5px !important;
    left: 5px !important;
  }
  
  .social-item img {
    width: 35px !important;
    height: 35px !important;
  }
}

/* High DPI displays */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi) {
  #logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
  .social-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print styles */
@media print {
  .social-buttons,
  #menu-horizontal,
  #menu-izquierdo,
  .ui.fixed.inverted.blue.menu {
    display: none !important;
  }
  
  #cuerpo {
    margin-top: 0 !important;
    padding: 0 !important;
  }
  
  body {
    font-size: 12pt !important;
    line-height: 1.4 !important;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .social-item img {
    transition: none !important;
  }
  
  html {
    scroll-behavior: auto !important;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .ui.button,
  .nav-links a,
  .social-item a,
  #menu-horizontal .item {
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 0.8rem 1rem !important;
  }

  /* Improve form inputs for touch */
  .ui.form input,
  .ui.form textarea,
  .ui.form select {
    min-height: 44px !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
  }

  /* Remove hover effects on touch devices */
  .social-item img:hover {
    transform: none !important;
  }

  .nav-links a:hover {
    color: #2e2c31 !important;
  }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Placeholder for dark mode styles */
}
