/* =========================================================
   MAIN.CSS - SISTEMAS DE NICARAGUA
   ========================================================= */

/* =========================================
   00. IMPORTS 
   ========================================= */
   @import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600;700;800&family=Roboto:wght@400;500;700&display=swap');

   /* =========================================
      01. VARIABLES GLOBALES
      ========================================= */
   :root {
     --navy: #0B2545;
     --blue: #134074;
     --accent: #E85D04;     
     --highlight: #FCA311;  
     --whatsapp: #25D366;
     --bg: #FFFFFF;
     --surface: rgba(255, 255, 255, 0.75);
     --surface-hover: rgba(255, 255, 255, 0.90);
     --border: rgba(255, 255, 255, 0.6);
     --text: #334155;
     --muted: #64748B;
     --radius: 8px;
     --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
     --max: 1200px;
     --font-tech: 'Barlow', sans-serif;
     --font-read: 'Roboto', sans-serif;
   }
   
   /* =========================================
      02. RESET & BASE
      ========================================= */
   * { box-sizing: border-box; }
   html { scroll-behavior: smooth; }
   
   body {
     margin: 0;
     font-family: var(--font-read);
     color: var(--text);
     min-height: 100vh;
     background-color: #f0f2f5;
   }
   
   a { color: inherit; text-decoration: none; }
   img { max-width: 100%; display: block; }
   
   /* =========================================
      03. LAYOUT
      ========================================= */
   .container { max-width: var(--max); margin: auto; padding: 0 20px; }
   
   .section { 
     padding: 80px 0; 
     padding-top: 240px !important;
   }
   .section.small { padding: 50px 0; }
   
   .page-index { background-position: center top !important; }
   
   /* =========================================
      04. TYPOGRAPHY
      ========================================= */
   h1, h2, h3, .h1, .h2, .brand, .btn {
     font-family: var(--font-tech);
     color: var(--navy);
   }
   
   .h1 {
     font-size: clamp(2.2rem, 4.5vw, 3.5rem);
     line-height: 1.1;
     margin: 10px 0 20px;
     font-weight: 800;
     text-transform: uppercase;
   }
   
   .h2 {
     font-size: clamp(1.8rem, 3vw, 2.5rem);
     margin: 0 0 15px;
     font-weight: 700;
   }
   
   .p {
     color: var(--muted);
     line-height: 1.6;
     font-size: 1.1rem;
     margin-bottom: 20px;
   }
   
   .kicker {
     color: var(--accent);
     letter-spacing: .1em;
     text-transform: uppercase;
     font-weight: 700;
     font-size: .85rem;
     display: block;
     margin-bottom: 8px;
   }
   
   /* =========================================
      05. HEADER & NAVBAR
      ========================================= */
   .nav {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     z-index: 1000;
     background: rgba(255, 255, 255, 0.1);
     backdrop-filter: blur(5px);
     border-bottom: 1px solid rgba(255,255,255,0.2);
     padding: 15px 0; 
     transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
   }
   
   .nav.scrolled {
     padding: 8px 0;
     background: rgba(255, 255, 255, 0.98);
     box-shadow: 0 4px 20px rgba(0,0,0,0.08);
     border-bottom: 1px solid var(--border);
   }
   
   .navbar { display: flex; align-items: center; justify-content: space-between; padding: 0; }
   
   .brand {
     display: flex;
     align-items: center;
     gap: 15px;
     text-align: left;
     transition: all 0.4s ease;
   }
   
   .brand-logo {
     height: 125px; 
     width: auto;
     object-fit: contain;
     padding-right: 15px;
     border-right: 2px solid rgba(11, 37, 69, 0.15); 
     transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
   }
   
   .brand div {
     color: var(--navy);
     font-family: var(--font-tech);
     font-weight: 800;
     font-size: 1.5rem;
     line-height: 1;
     text-transform: uppercase;
     letter-spacing: -0.5px;
     transition: all 0.4s ease;
   }
   
   .brand small {
     display: block;
     color: var(--muted); 
     font-family: var(--font-read);
     font-weight: 500;
     font-size: 0.85rem;
     margin-top: 3px;
     text-transform: none;
     transition: all 0.4s ease;
   }
   
   .nav.scrolled .brand-logo {
     height: 60px; 
     padding-right: 12px;
   }
   .nav.scrolled .brand div { font-size: 1.2rem; }
   .nav.scrolled .brand small { font-size: 0.75rem; opacity: 0.9; }
   
   .menu { 
     display: flex; 
     gap: 30px; 
     align-items: center; 
   }
   
   .menu a {
     color: var(--text);
     font-weight: 700;
     font-size: 1.05rem;
     padding: 10px 5px;
     transition: .2s all;
     white-space: nowrap; 
   }
   
   .menu a:hover { color: var(--accent); background: transparent; }
   .menu a.active { color: var(--blue); font-weight: 800; }
   
   @media (max-width: 1150px) {
     .brand div { font-size: 1.2rem; }
     .menu { gap: 15px; }
     .menu a { font-size: 0.95rem; }
   }
   
   .hamburger {
     display: none;
     background: transparent;
     border: 1px solid var(--border);
     color: var(--navy);
     font-size: 1.5rem; 
     width: 44px;
     height: 44px;
     border-radius: 6px;
     align-items: center;
     justify-content: center;
     cursor: pointer;
     z-index: 1100;
   }
   
   .mobile {
     display: none !important; 
     position: absolute;
     top: 100%;
     left: 0;
     width: 100%;
     background: rgba(255, 255, 255, 0.95);
     backdrop-filter: blur(10px);
     -webkit-backdrop-filter: blur(10px);
     border-top: 1px solid #f1f5f9;
     box-shadow: 0 10px 20px rgba(0,0,0,0.1);
     padding: 10px 0;
     z-index: 1050;
     animation: slideDown 0.3s ease forwards;
   }
   
   .mobile.show { display: block !important; }
   
   .mobile a {
     display: block;
     padding: 14px 16px;
     color: var(--navy);
     font-weight: 800;
     font-size: 1.05rem;
     border-bottom: 1px solid #f1f5f9;
   }
   
   .mobile a:active {
     background-color: rgba(232, 93, 4, 0.1);
     color: var(--accent);
     border-left: 4px solid var(--accent);
   }
   
   @keyframes slideDown {
     from { opacity: 0; transform: translateY(-10px); }
     to { opacity: 1; transform: translateY(0); }
   }
   
   @media (max-width: 900px) {
     .menu { display: none; }
     .hamburger { display: flex; }
   }
   
   /* =========================================
      06. BUTTONS
      ========================================= */
   .btn {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     padding: 12px 24px;
     border-radius: 6px;
     font-weight: 700;
     text-transform: uppercase;
     letter-spacing: 0.05em;
     cursor: pointer;
     border: 1px solid var(--border);
     transition: .2s all;
     background: rgba(255,255,255,0.8);
     color: var(--navy);
   }
   
   .btn:hover { transform: translateY(-2px); border-color: var(--navy); background: white; }
   
   .btn.primary {
     background: var(--accent);
     color: white;
     border: none;
     box-shadow: 0 4px 10px rgba(232, 93, 4, 0.3);
   }
   .btn.primary:hover { background: #d05304; }
   
   .btn.navy { background: var(--navy); color: white; border: none; }
   .btn.navy:hover { background: var(--blue); }
   
   /* =========================================
      07. CARDS
      ========================================= */
   .card {
     background: var(--surface);
     backdrop-filter: blur(20px);
     -webkit-backdrop-filter: blur(20px);
     border: 1px solid var(--border);
     border-radius: var(--radius);
     padding: 25px;
     box-shadow: var(--shadow);
     transition: .2s transform, .2s background;
     color: var(--text);
     display: flex;
     flex-direction: column;
     height: 100%; 
   }
   
   .card:hover {
     transform: translateY(-5px);
     background: var(--surface-hover);
     border-color: var(--accent);
   }
   
   .card h3 {
     margin-top: 0;
     font-size: 1.3rem;
     color: var(--blue);
     text-shadow: 0 0 1px rgba(255,255,255,0.5);
   }
   
   .card-list {
     padding-left: 20px;
     margin: 10px 0 15px 0;
     color: var(--muted);
     font-size: 0.95rem;
     line-height: 1.5;
   }
   
   .card-list li { margin-bottom: 8px; }
   
   .card .btn-container {
     margin-top: auto; 
     padding-top: 15px;
   }
   
   /* =========================================
      08. GRIDS
      ========================================= */
   .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
   .grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
   .split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
   
   .list { list-style: none; padding: 0; display: grid; gap: 15px; }
   .li { display: flex; gap: 12px; }
   .dot { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; margin-top: 8px; flex-shrink: 0; }
   .li b { display: block; color: var(--navy); }
   
   /* =========================================
      09. FOOTER
      ========================================= */
   .footer {
     background: linear-gradient(180deg, #0B2545 0%, #081C33 35%, #06182D 65%, #041225 100%);
     border-top: 4px solid var(--accent);
     padding: 30px 0 15px;
     color: #cbd5e1;
     margin-top: 60px;
     position: relative;
     z-index: 10;
   }
   
   .footer .cols {
     display: grid;
     grid-template-columns: 1.5fr 1fr 1fr;
     gap: 40px;
     margin-bottom: 20px;
     align-items: start;
   }
   
   .footer b {
     color: white;
     font-family: var(--font-tech);
     font-size: 1rem;
     text-transform: uppercase;
     letter-spacing: 0.05em;
     display: block;
     margin-bottom: 12px;
     border-left: 3px solid var(--accent);
     padding-left: 10px;
   }
   
   .footer p, .footer a, .footer span {
     color: #94a3b8;
     font-size: 0.9rem;
     line-height: 1.5;
     margin-bottom: 6px;
     display: block;
     transition: all 0.3s ease;
   }
   
   .footer a:hover { color: var(--highlight); transform: translateX(5px); }
   .footer .brand { margin-bottom: 15px; color: white; align-items: center; }
   .footer .brand-logo { filter: brightness(0) invert(1); opacity: 1; height: 100px; border-right: none; }
   .footer .brand div { margin-top: -5px; color: #ffffff !important; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
   .footer .brand small { color: rgba(255, 255, 255, 0.7) !important; font-weight: 400; }
   
   .footer .container:last-child {
     border-top: 1px solid rgba(255, 255, 255, 0.1);
     padding-top: 15px;
     text-align: center;
     font-size: 0.85rem;
     color: rgba(255, 255, 255, 0.4);
     display: flex !important;
     flex-direction: row !important;
     justify-content: center;
     align-items: baseline !important;
     gap: 4px;
     white-space: nowrap;
   }
   .footer .container:last-child span { font-size: inherit; font-family: inherit; color: inherit; }
   
   /* =========================================
      10. FAB (BOTONES FLOTANTES)
      ========================================= */
   .fab {
     position: fixed;
     right: 20px;
     bottom: 20px;
     z-index: 1000;
     display: flex;
     flex-direction: column;
     align-items: center;
     gap: 15px;
   }
     
   .fab a {
     width: 55px;
     height: 55px;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     text-decoration: none;
     color: white !important;
     box-shadow: 0 4px 12px rgba(0,0,0,0.3);
     transition: transform 0.2s;
     margin-bottom: 10px;
   }
     
   .fab a:last-child { margin-bottom: 0; }
   .fab a:hover { transform: scale(1.1); }
     
   .fab .map { background-color: #0056b3 !important; font-size: 22px; }
   .fab .wa { background-color: #25D366 !important; font-size: 30px; }
   .fab .top { background-color: #0B2545 !important; font-size: 20px; }
   
   /* =========================================
      11. MODAL GENÉRICO
      ========================================= */
   .modal { position: fixed; inset: 0; z-index: 999; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.6); padding: 20px; }
   .modal.open { display: flex; }
   .modal .panel { background: white; width: 100%; max-width: 600px; padding: 30px; border-radius: var(--radius); position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
   .modal .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
   #modalTitle { color: var(--navy); font-size: 1.4rem; font-weight: 700; }
   hr { border: none; border-top: 1px solid var(--border); margin: 15px 0; }
   
   /* =========================================
      12. CARRUSEL & MODAL GRANDE
      ========================================= */
   .modal-overlay { position: fixed; inset: 0; background: rgba(11, 37, 69, 0.85); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; backdrop-filter: blur(5px); }
   .modal-overlay.active { opacity: 1; pointer-events: auto; }
   .modal-content { background: var(--bg); width: 90%; max-width: 800px; border-radius: var(--radius); padding: 30px; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.3); max-height: 90vh; overflow-y: auto; animation: slideUp 0.4s ease forwards; }
   @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
   .modal-close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 2rem; color: var(--muted); cursor: pointer; line-height: 1; }
   .modal-close-btn:hover { color: var(--accent); }
   .modal-header-empresa { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.1); }
   .empresa-text { color: var(--text); line-height: 1.7; }
   .empresa-text ul { padding-left: 20px; margin-bottom: 15px; }
   
   .carousel-box { position: relative; width: 100%; height: 400px; background: #0B2545; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
   .carousel-track { width: 100%; height: 100%; display: flex; }
   .carousel-track img { width: 100%; height: 100%; object-fit: contain !important; display: none; }
   .carousel-track img.active { display: block; animation: fade 0.5s; }
   .c-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.9); color: var(--navy); border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; z-index: 10; }
   .c-btn:hover { background: var(--accent); color: white; }
   .c-prev { left: 15px; }
   .c-next { right: 15px; }
   @keyframes fade { from { opacity: .4 } to { opacity: 1 } }
   
   /* =========================================
      13. BACKGROUNDS
      ========================================= */
   .page-index, .page-quienes, .page-servicios, .page-proyectos, .page-contacto, .page-empresas {
     background: linear-gradient(rgba(241, 245, 249, 0.70), rgba(241, 245, 249, 0.70)), url('../img/fondos/ejemplo.jpeg') no-repeat center center fixed;
     background-size: cover; color: var(--text);
   }
   .page-catalogo {
     background-color: #0b2545;
     background: linear-gradient(to bottom, rgba(11, 37, 69, 0.5) 0%, rgba(11, 37, 69, 0.8) 300px, #0b2545 600px), url('../img/fondos/servicio.jpg') no-repeat center top fixed;
     background-size: cover; color: white;
   }
   .page-catalogo .nav { background-color: rgba(11, 37, 69, 0.95) !important; box-shadow: 0 4px 20px rgba(0,0,0,0.4); border-bottom: 1px solid rgba(255,255,255,0.1); }
   .page-catalogo .menu a, .page-catalogo .brand, .page-catalogo .hamburger { color: white !important; }
   
   /* =========================================
      14. RESPONSIVE
      ========================================= */
   @media (max-width: 900px) {
     .grid3, .grid2, .split, .footer .cols { grid-template-columns: 1fr; }
     .menu { display: none; }
     .hamburger { display: flex; }
     .nav { padding: 12px 0 !important; }
     .brand-logo { height: 70px !important; border-right: none; padding-right: 0; }
     .brand div { font-size: 1.1rem; line-height: 1.1; }
     .brand small { display: none; } 
     .nav.scrolled { padding: 6px 0 !important; }
     .nav.scrolled .brand-logo { height: 50px !important; }
     .footer .cols { text-align: center; }
     .footer b { border-left: none; border-bottom: 2px solid var(--accent); padding-left: 0; padding-bottom: 10px; display: inline-block; }
     .footer .brand { justify-content: center; text-align: left; }
     .footer .container:last-child { flex-wrap: wrap; white-space: normal; }
     .page-index, .page-quienes, .page-servicios, .page-proyectos, .page-contacto, .page-empresas, .page-catalogo { background-attachment: scroll; }
     .service-text-card { width: 95%; margin: -40px auto 0 !important; }
     .carousel-box { height: 200px; }
     .modal-content { padding: 20px; width: 95%; }
   }
   
   @media (max-width: 768px) {
     .page-catalogo {
       background: linear-gradient(to bottom, rgba(11,37,69,0.5) 0%, #0b2545 400px), url('../img/fondos/servicio.jpg') no-repeat top center fixed;
       background-size: cover;
     }
   }
   
   /* =========================================
      15. MAPS MODAL
      ========================================= */
   .maps-content {
     max-width: 350px !important; 
     padding: 25px !important;
     text-align: center;
   }
   
   .maps-grid {
     display: flex;
     flex-direction: column;
     gap: 15px;
     margin-bottom: 20px;
   }
   
   .btn-app {
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 10px;
     padding: 15px;
     border-radius: 8px;
     font-weight: 700;
     font-size: 1.1rem;
     color: white !important;
     text-decoration: none;
     transition: transform 0.2s;
   }
   
   .btn-app:active { transform: scale(0.98); }
   .waze-btn { background-color: #33ccff; box-shadow: 0 4px 10px rgba(51, 204, 255, 0.4); }
   .google-btn { background-color: #4285F4; box-shadow: 0 4px 10px rgba(66, 133, 244, 0.4); }
   .btn-cancelar { background: transparent; border: none; color: #64748B; text-decoration: underline; cursor: pointer; font-size: 0.9rem; }
   
   /* =========================================
      16. MODAL DESCRIPTIONS
      ========================================= */
   .modal-desc-text {
     color: var(--text);
     font-size: 1.05rem;
     line-height: 1.6;
     margin-bottom: 20px;
   }
   
   .modal-features {
     display: grid;
     gap: 12px;
     margin-top: 15px;
   }
   
   .modal-feature-item {
     display: flex;
     align-items: flex-start;
     gap: 12px;
     background: #f8fafc; 
     padding: 12px 15px;
     border-radius: 6px;
     border-left: 3px solid var(--accent); 
     font-size: 0.95rem;
     color: var(--navy); 
     font-weight: 500;
   }
   
   .modal-feature-item i {
     color: var(--accent); 
     font-size: 1.1rem;
     margin-top: 2px;
   }