/* =============================================
   GLOBAL.CSS - ESTILOS COMPARTIDOS DEL SITIO
   Cooperativa de Servicios Múltiples CB
   Incluye: Variables, Reset, Navbar, Footer,
            Top-Bar, Menú Móvil, Back-To-Top
   ============================================= */

/* === 1. VARIABLES GLOBALES === */
:root {
  --primary-color: #1a73e8;
  --primary-hover: #1557b0;
  --secondary-color: #f8f9fa;
  --text-color: #333333;
  --text-light: #666666;
  --bg-color: #ffffff;
  --bg-alt: #f4f7f6;
  --accent-color: #fbbc04;
  --error-color: #dc3545;
  --success-color: #28a745;
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Open Sans", sans-serif;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
}

body.dark-mode {
  --primary-color: #64b5f6;
  --primary-hover: #90caf9;
  --secondary-color: #1e1e1e;
  --text-color: #e0e0e0;
  --text-light: #aaaaaa;
  --bg-color: #121212;
  --bg-alt: #1a1a1a;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* === 2. RESET Y BASE === */
html {
  scroll-behavior: smooth;
  width: 100%;
  scroll-padding-top: 80px;
  overflow-x: hidden;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  width: 100%;
  position: relative;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}


/* === 3. UTILIDADES Y ANIMACIONES === */
.global-section {
  padding: 80px 0;
}

.bg-light {
  background-color: var(--bg-color);
}

.bg-alt {
  background-color: var(--bg-alt);
}

.title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.subtitle-section,
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.highlight,
.highlight-yellow {
  color: var(--accent-color);
}

.reveal {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.from-bottom {
  transform: translateY(50px);
}

.zoom-in {
  transform: scale(0.9);
}

.from-left {
  transform: translateX(-50px);
}

.from-right {
  transform: translateX(50px);
}

.fade-only {
  transform: none;
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}

.delay-6 {
  transition-delay: 0.6s;
}

/* === 4. TOP-BAR === */
.top-bar {
  background-color: var(--primary-color);
  color: white;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 3px 20px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.top-bar a {
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.3s;
}

.top-bar a:hover {
  opacity: 0.8;
}

/* === 5. NAVBAR === */
.navbar {
  background-color: var(--bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.3rem 0;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo-link img {
  height: 50px;
  width: auto;
  border-radius: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 600;
  font-family: var(--font-heading);
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

/* Dropdown Premium */
.dropdown {
  position: relative;
}

.dropdown-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  border-radius: 8px;
  padding: 10px 0;
  z-index: 1001;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.dropdown:hover .dropdown-content {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-content li a {
  display: block;
  padding: 10px 20px;
  color: var(--text-color);
}

.dropdown-content li a:hover {
  background-color: var(--secondary-color);
  border-left: 3px solid var(--primary-color);
}

/* Dark Mode Toggle */
.dark-mode-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.3s ease;
}

.dark-mode-btn:hover {
  color: var(--primary-color);
  transform: rotate(20deg) scale(1.1);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1002;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  transition: 0.3s;
  border-radius: 2px;
}

.mobile-menu-header {
  display: none;
}

/* === 6. FOOTER === */
.map-section {
  padding: 50px 20px;
  text-align: center;
  background: var(--secondary-color);
}

.map-section .title {
  font-size: 2.2rem;
  margin-bottom: 24px;
  color: var(--primary-color);
  font-family: var(--font-heading);
}

.map-section iframe {
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

footer {
  background: linear-gradient(135deg, #1a2a6c, #2c3e50);
  color: #fff;
  padding: 60px 20px 40px;
  width: 100%;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
}

.footer-section h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #ffffff;
  position: relative;
  display: inline-block;
}

.footer-section h3::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: #ffffff;
}

.footer-section p {
  color: #ccc;
  margin-bottom: 18px;
  line-height: 1.6;
}

.footer-section li {
  margin-bottom: 12px;
}

.footer-section a {
  color: #ddd;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.footer-section a:hover {
  color: #ffffff;
  transform: translateX(5px);
}

.social-icons {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.social-icons a {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.social-icons a.facebook:hover {
  background: #1877f2;
}

.social-icons a.tiktok:hover {
  background: #000;
}

.copyright {
  background-color: rgba(0, 0, 0, 0.2);
  margin-top: 40px;
  text-align: center;
  padding: 25px 20px;
}

.copyright-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.copyright-link:hover {
  color: #fff;
  text-decoration: underline;
}

.LibroDeReclamaciones img {
  max-width: 200px;
  height: auto;
  margin: 0 auto;
}

/* === 7. EXTRAS === */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 999;
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
}

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.menu-overlay.active {
  display: block;
}

/* =============================================
   RESPONSIVE - COMPONENTES GLOBALES
   ============================================= */

/* TABLETS Y MÓVILES (Hasta 1024px) */
@media (max-width: 1024px) {

  /* Top-Bar y Navbar */
  .top-bar {
    display: none;
  }

  .navbar {
    position: fixed;
    top: 0 !important;
    left: 0;
    width: 100%;

  }

  .navbar-container {
    padding: 0 16px;
  }

  .logo-link img {
    height: 42px;
    transition: none !important;
  }

  /* Menú Móvil */
  .nav-links {
    position: fixed;
    top: 50px;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - 50px);
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0 40px 0;
    box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.1);
    transition: left 0.35s ease;
    z-index: 1000;
    gap: 0;
    overflow-y: auto;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links>li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links>li>a {
    width: 100%;
    padding: 18px 25px;
    display: block;
    font-weight: 600;
    border-left: 3px solid transparent;
  }

  .nav-links>li>a.active {
    background-color: rgba(26, 115, 232, 0.15) !important;
    color: var(--primary-color) !important;
    border-left: none !important;
  }

  .close-menu-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    font-size: 1.2rem;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.dark-mode .close-menu-btn {
    background: rgba(255, 255, 255, 0.1);
  }

  .dropdown-content {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    background: rgba(26, 115, 232, 0.05);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.35s ease;
    border-radius: 0;
  }

  .dropdown.active .dropdown-content {
    max-height: 400px;
    padding: 6px 0;
  }

  .dropdown-content li a {
    padding: 10px 25px 10px 40px;
  }

  .dropdown>a i.fa-chevron-down {
    transition: transform 0.3s;
    margin-top: 5px;
  }

  .dropdown.active>a i.fa-chevron-down {
    transform: rotate(180deg);
  }

  .nav-links .dark-mode-btn {
    margin: 10px 25px;
    width: calc(100% - 50px);
    justify-content: center;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    border: none;
  }

  .hamburger {
    display: flex;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Footer Móvil */
  .copyright-content {
    flex-direction: column;
    text-align: center;
  }
}

/* Ocultar header móvil en PC */
@media (min-width: 1025px) {
  .mobile-menu-header {
    display: none !important;
  }
}