/* --------------------------------------------------
   IMPER SAN JUAN — 2026 BRAND IDENTITY STYLE SHEET
   -------------------------------------------------- */

:root {
  --primary: #1a3a8f;          /* Azul marino corporativo */
  --primary-mid: #0d2a6e;      /* Azul marino oscuro */
  --primary-light: #2563eb;    /* Azul brillante */
  --accent: #2563eb;           /* Azul acento (botón CTA principal) */
  --dark: #071a4a;             /* Azul muy oscuro (fondos hero/beneficios) */
  --dark-card: #0d2358;        /* Azul oscuro cards */
  --surface: #ffffff;
  --surface-alt: #f0f4ff;      /* Azul muy claro para fondos alternos */
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --gold: #2563eb;             /* Reemplaza el dorado con azul brillante */
  --gold-hover: #1d4ed8;

  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 15px 35px rgba(26, 58, 143, 0.08);
  --shadow-hover: 0 20px 45px rgba(37, 99, 235, 0.15);
}

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

img, video {
  max-width: 100%;
  height: auto;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--surface);
}

body {
  overflow-x: hidden;
  line-height: 1.7;
  color: #334155;
}

/* Headings font */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  letter-spacing: -0.7px;
  line-height: 1.25;
}

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

.hidden {
  display: none !important;
}

button, input, textarea {
  font-family: inherit;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--surface-alt);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* --------------------------------------------------
   COMMON STYLES & LAYOUT
   -------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
  padding: 100px 0 140px; /* space for waves */
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 60px;
}

.section-eyebrow {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--primary-light);
  margin-bottom: 10px;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary);
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Wave Separators styling */
.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  z-index: 5;
}

.wave-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

/* Scroll Reveal classes */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: var(--transition-smooth);
}

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

/* --------------------------------------------------
   SUBPAGE HEADER HERO BANNER
   -------------------------------------------------- */
.subpage-hero {
  position: relative;
  height: 40vh;
  min-height: 280px;
  background-color: var(--primary);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: #ffffff;
  z-index: 5;
}

.subpage-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(4, 22, 26, 0.75) 0%, rgba(4, 22, 26, 0.95) 100%);
  z-index: 1;
}

.subpage-hero-content {
  position: relative;
  z-index: 10;
  padding-top: 60px; /* navbar offset */
}

.subpage-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.subpage-breadcrumbs {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.subpage-breadcrumbs a {
  transition: var(--transition-smooth);
}

.subpage-breadcrumbs a:hover {
  color: var(--accent);
}

.subpage-breadcrumbs span {
  margin: 0 8px;
  color: var(--accent);
}

/* --------------------------------------------------
   NAVBAR
   -------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 25px 0;
  background: rgba(13, 42, 110, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1000;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 15px 0;
  background: rgba(7, 26, 74, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 8px 32px rgba(4, 22, 26, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  transition: var(--transition-smooth);
  border-radius: 6px;
}

.logo-img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  position: relative;
  padding: 6px 0;
}

/* Hide navigation icons on desktop by default */
.nav-links a i {
  display: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2.5px;
  background-color: var(--accent);
  transition: width 0.35s cubic-bezier(0.68, -0.6, 0.32, 1.6), left 0.35s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  transform: translateX(-50%);
  border-radius: 4px;
}

.nav-links a:hover, .nav-links li.active a {
  color: #ffffff;
}

.nav-links a:hover::after, .nav-links li.active a::after {
  width: 100%;
}

.menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  padding: 0 !important;
  flex-shrink: 0 !important;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: scale(1.05);
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2.5px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: absolute;
}

.menu-btn span:nth-child(1) { transform: translateY(-6px); }
.menu-btn span:nth-child(2) { transform: translateY(0); }
.menu-btn span:nth-child(3) { transform: translateY(6px); }

/* Active morphing styles */
.menu-btn.active span:nth-child(1) {
  transform: rotate(45deg);
  background-color: var(--accent);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg);
  background-color: var(--accent);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 30, 0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------
   FOOTER
   -------------------------------------------------- */
.footer {
  background-color: var(--dark);
  color: #ffffff;
  padding: 80px 0 40px;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 50px;
  margin-bottom: 60px;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.footer-brand h3 i {
  color: var(--accent);
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 28px;
  font-size: 0.95rem;
  max-width: 320px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.social-icon-btn:hover {
  background-color: var(--accent);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.footer-links h4 {
  font-size: 1.1rem;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 8px;
}

.footer-links h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent);
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 6px;
}

.footer-providers h4 {
  font-size: 1.1rem;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 8px;
}

.footer-providers h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent);
}

.providers-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.provider-logo-link {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.provider-logo-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.provider-logo-img {
  height: 32px;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.8);
  transition: var(--transition-smooth);
}

.provider-logo-link:hover .provider-logo-img {
  filter: brightness(0) invert(1) opacity(1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

/* --------------------------------------------------
   FLOATING INTERACTIVE BUTTONS
   -------------------------------------------------- */
/* Floating WhatsApp */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.45) !important;
  z-index: 990;
  transition: var(--transition-smooth);
}

.whatsapp-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background-color: #25D366;
  z-index: -1;
  opacity: 0;
  animation: whatsappSonar 2.2s infinite ease-out;
}

@keyframes whatsappSonar {
  0% { transform: scale(1); opacity: 0.65; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* WhatsApp Tooltip styling */
.whatsapp-tooltip {
  position: absolute;
  right: 76px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: var(--transition-smooth);
  z-index: 10 !important;
}

.whatsapp-btn:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

/* Chatbot Floating Button */
.chatbot-btn {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-mid) 0%, var(--accent) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 8px 32px rgba(0, 151, 167, 0.4);
  z-index: 990;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chatbot-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 38px rgba(0, 151, 167, 0.6);
}

/* Pulsing Greeting Badge */
.chatbot-badge {
  position: absolute;
  top: -12px;
  left: -20px;
  background-color: #f44336;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(244, 67, 54, 0.4);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition-smooth);
}

.chatbot-badge.active {
  opacity: 1;
  transform: scale(1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(244, 67, 54, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

/* Tooltip */
.chatbot-tooltip {
  position: absolute;
  right: 76px;
  background: var(--primary);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: var(--transition-smooth);
}

.chatbot-btn:hover .chatbot-tooltip,
.chatbot-tooltip.visible {
  opacity: 1 !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

/* --------------------------------------------------
   CHATBOT WINDOW
   -------------------------------------------------- */
.chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 370px;
  height: 520px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 151, 167, 0.15);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(30px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chatbot-window.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Chat Header */
.chat-header {
  background: linear-gradient(135deg, var(--primary-mid) 0%, var(--accent) 100%);
  color: #ffffff;
  padding: 20px;
  display: flex;
  align-items: center;
  position: relative;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 40px; /* Safe padding to prevent text from overlapping the close button */
}

.chat-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.chat-header-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.chat-status {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-close-btn {
  position: absolute;
  top: 24px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.15) rotate(90deg);
}

/* Messages Area */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 151, 167, 0.2);
  border-radius: 10px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 151, 167, 0.4);
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: messageFadeIn 0.3s ease forwards;
}

@keyframes messageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.bot {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-line; /* preserves system format and newlines */
  word-wrap: break-word;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.chat-message.bot .chat-bubble {
  background-color: var(--primary-mid);
  color: #ffffff;
  border-bottom-left-radius: 4px;
}

.chat-message.user .chat-bubble {
  background-color: #e8eaf6;
  color: var(--text-dark);
  border-bottom-right-radius: 4px;
}

.chat-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  align-self: flex-end;
}

.chat-message.bot .chat-time {
  align-self: flex-start;
}

/* Typing Indicator dots */
.chat-message.typing .chat-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 18px;
}

.chat-message.typing .dot {
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.chat-message.typing .dot:nth-child(1) { animation-delay: -0.32s; }
.chat-message.typing .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Input Area */
.chat-input-area {
  padding: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
}

.chat-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-input {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  background: #fafbfc;
  transition: var(--transition-smooth);
}

.chat-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background-color: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.chat-send-btn:hover {
  background-color: var(--gold);
  transform: translateY(-1px);
}

/* --------------------------------------------------
   RESPONSIVE BREAKPOINTS
   -------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2.0rem !important;
  }
  
  .section-subtitle {
    font-size: 0.95rem !important;
  }

  .navbar nav {
    display: contents;
  }

  .menu-btn {
    display: flex !important;
    flex-shrink: 0 !important;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -310px;
    width: 290px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(10, 20, 30, 0.8) 0%, rgba(5, 10, 15, 0.95) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    padding: 120px 0 40px 0;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.45);
    z-index: 999;
  }
  
  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
    opacity: 0;
    transform: translateX(40px) scale(0.95);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  /* Cascade entrance delays */
  .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
  .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
  .nav-links.active li:nth-child(6) { transition-delay: 0.35s; }

  .nav-links a {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    width: 100%;
    padding: 12px 32px;
    transition: all 0.3s ease;
    box-sizing: border-box;
  }

  .nav-links li.active a {
    color: #ffffff !important;
    background: rgba(37, 99, 235, 0.15);
    border-left: 4px solid var(--accent);
    padding-left: 28px;
  }

  /* Show and style icons in mobile drawer */
  .nav-links a i {
    display: inline-block !important;
    margin-right: 12px;
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.3s ease;
  }

  .nav-links li.active a i {
    color: var(--accent) !important;
  }
  
  .nav-links a:hover i {
    color: #ffffff;
  }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  .chatbot-window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 2000 !important;
    transform: none !important;
    transition: opacity 0.25s ease !important;
  }

  .chatbot-window.active {
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .chat-header {
    padding: 16px 20px !important;
    border-radius: 0 !important;
  }

  .chat-input-area {
    padding-bottom: 24px !important;
  }
}

/* Freeze background scrolling when chatbot is active on mobile */
body.chat-open {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  position: fixed !important;
  width: 100% !important;
}

/* ==================================================
   PREMIUM VISUAL IMPROVEMENTS (ADDITIONS)
   ================================================== */

/* 1. Scroll Progress Bar */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  background: transparent;
  z-index: 10002;
  pointer-events: none;
}
.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 100%);
  width: 0%;
  transition: width 0.1s ease-out;
}

/* 2. Glow and Dynamic Translations on CTA & Form Buttons */
.hero-cta-btn, .form-submit-btn, .chat-send-btn {
  transition: background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.hero-cta-btn:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45), 0 0 15px rgba(37, 99, 235, 0.2) !important;
}

.hero-cta-btn i {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero-cta-btn:hover i {
  transform: translateX(5px) scale(1.15);
}

.navbar-cta-btn, .cta-banner-btn {
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.navbar-cta-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.40) !important;
}

.cta-banner-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.40) !important;
}

.form-submit-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35), 0 0 12px rgba(37, 99, 235, 0.15) !important;
}

.form-submit-btn i {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.form-submit-btn:hover i {
  transform: translateX(4px);
}

/* 3. Cards Multilayer Volumetric Shadow and Hover Glow */
.service-card, .benefit-card, .brand-card, .catalog-card, .contacto-form-card, .contacto-info-card, .stat-card, .nosotros-img-wrapper {
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.45s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.45s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.service-card:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 10px 25px rgba(26, 58, 143, 0.05), 0 25px 50px rgba(37, 99, 235, 0.15) !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
}

.service-card .service-icon-box {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.45s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.service-card:hover .service-icon-box {
  background: var(--accent) !important;
  color: #ffffff !important;
  transform: rotateY(360deg) translateY(-4px) scale(1.08) !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.benefit-card:hover {
  transform: translateY(-10px) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 25px 55px rgba(37, 99, 235, 0.25) !important;
}
.benefit-card .benefit-icon {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.benefit-card:hover .benefit-icon {
  transform: scale(1.2) rotate(8deg) translateY(-2px) !important;
  color: var(--gold) !important;
}

.brand-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 30px rgba(26, 58, 143, 0.08), 0 5px 15px rgba(37, 99, 235, 0.05) !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
}

.catalog-card:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03), 0 25px 50px rgba(37, 99, 235, 0.15) !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
}

.stat-card:hover {
  transform: translateY(-8px) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
  box-shadow: 0 12px 35px rgba(26, 58, 143, 0.08) !important;
}

/* 4. Glassmorphism Chatbot Window and Message bounce */
.chatbot-window {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-radius: 24px !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08), 0 30px 70px rgba(26, 58, 143, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

@media (min-width: 769px) {
  .chatbot-window {
    height: 520px !important;
    max-height: calc(100vh - 120px) !important;
    max-height: calc(100dvh - 120px) !important;
    bottom: 80px !important;
    right: 24px !important;
  }
}

.chat-header {
  background: linear-gradient(135deg, var(--primary-mid) 0%, var(--primary) 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.chat-status i {
  position: relative;
}
.chat-status i::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #4caf50;
  animation: statusPulse 1.8s infinite ease-in-out;
}
@keyframes statusPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

.chat-message.bot .chat-bubble {
  background: linear-gradient(135deg, var(--primary-mid) 0%, var(--primary) 100%) !important;
  border-bottom-left-radius: 4px !important;
  box-shadow: 0 4px 15px rgba(0, 122, 135, 0.12) !important;
}

.chat-message.user .chat-bubble {
  background-color: var(--surface-alt) !important;
  border-bottom-right-radius: 4px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
}

.chat-message {
  transform-origin: bottom left;
  animation: messageEntrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}
.chat-message.user {
  transform-origin: bottom right;
}
@keyframes messageEntrance {
  from { opacity: 0; transform: translateY(15px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 5. Staggered Catalog & Gallery Load Animation */
.catalog-card:not(.hidden) {
  animation: fadeScaleIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 6. Form focus glowing outline */
.form-control:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15) !important;
}

/* ==================================================
   CHATBOT PREMIUM DESIGN ENHANCEMENTS
   ================================================== */

/* 7. Chatbot Suggested Questions (Pills) */
.chat-suggestions {
  display: flex;
  gap: 8px;
  padding: 8px 14px 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  transition: opacity 0.3s ease;
  background-color: #ffffff;
}

.suggestion-pill {
  background: var(--surface-alt);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.suggestion-pill:hover {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* 8. Floating Scroll Down Button */
.chat-scroll-down-btn {
  position: absolute;
  bottom: 75px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-scroll-down-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chat-scroll-down-btn:hover {
  background-color: var(--surface-alt);
  color: var(--accent);
  transform: scale(1.05);
}

/* 9. Branded Initials Avatar Box */
.avatar-initials {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 3px rgba(0, 122, 135, 0.2);
}

.chat-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* 10. Message Bubbles with WhatsApp Style Tails */
.chat-message.bot .chat-bubble {
  position: relative;
}
.chat-message.bot .chat-bubble::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -6px;
  width: 8px;
  height: 12px;
  background: var(--primary-mid);
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.chat-message.user .chat-bubble {
  position: relative;
}
.chat-message.user .chat-bubble::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -6px;
  width: 8px;
  height: 12px;
  background: var(--surface-alt);
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

/* 11. Custom Chat messages scrollbar styling */
.chat-messages::-webkit-scrollbar {
  width: 6px !important;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent !important;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(26, 58, 143, 0.18) !important;
  border-radius: 10px !important;
  transition: var(--transition-smooth);
}
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 58, 143, 0.35) !important;
}

/* 12. Apple iMessage Wave Animation for Typing Indicator */
.chat-message.typing .chat-bubble {
  display: flex;
  align-items: center;
  gap: 5px !important;
  padding: 14px 20px !important;
}

.chat-message.typing .dot {
  width: 6px !important;
  height: 6px !important;
  background-color: #ffffff !important;
  border-radius: 50% !important;
  animation: typingWave 1.2s infinite ease-in-out !important;
  opacity: 0.65;
}

.chat-message.typing .dot:nth-child(1) { animation-delay: 0s !important; }
.chat-message.typing .dot:nth-child(2) { animation-delay: 0.2s !important; }
.chat-message.typing .dot:nth-child(3) { animation-delay: 0.4s !important; }

@keyframes typingWave {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.65;
  }
  50% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* 13. Chatbot Avatar and Button Image Styling */
.chatbot-btn-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid #ffffff;
  box-sizing: border-box;
  z-index: 2;
  animation: chatbotBorderGlow 2s infinite ease-in-out;
}

.chatbot-btn {
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: 0 8px 32px rgba(26, 58, 143, 0.35) !important;
}

.chatbot-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--accent); /* Azul acento de la página */
  opacity: 0;
  animation: chatbotSonarPulse 2s infinite ease-out;
  z-index: 1;
  pointer-events: none;
  box-sizing: border-box;
}

.chatbot-btn:hover {
  transform: scale(1.1) translateY(-2px);
}

.chatbot-badge,
.chatbot-tooltip {
  z-index: 10 !important;
}

@keyframes chatbotSonarPulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@keyframes chatbotBorderGlow {
  0%, 100% {
    border-color: #ffffff;
    box-shadow: 0 0 0 rgba(37, 99, 235, 0);
  }
  50% {
    border-color: var(--accent); /* Parpadea con el azul de la página */
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
  }
}

.chat-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.chat-avatar-box {
  overflow: hidden;
}

/* ==================================================
   CUSTOM CHATBOT BUTTONS & LINKS (BY ANTIGRAVITY)
   ================================================== */
.chat-custom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  margin: 6px 0;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
}

.chat-custom-btn:active {
  transform: scale(0.96);
}

.chat-custom-btn.chat-btn-whatsapp {
  background-color: #25d366;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.22);
}

.chat-custom-btn.chat-btn-whatsapp:hover {
  background-color: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.38);
}

.chat-custom-btn.chat-btn-action {
  background-color: var(--accent);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.chat-custom-btn.chat-btn-action:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.38);
}

/* Ensure paragraph layout inside chat bubble handles blocks nicely */
.chat-bubble {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ==================================================
   ADDITIONAL PREMIUM INTERACTION STYLES (BY ANTIGRAVITY)
   ================================================== */

/* Glassmorphism Header */
.chat-header {
  background: rgba(13, 42, 110, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Reset Conversation Button */
.chat-reset-btn {
  background: rgba(255, 255, 255, 0.12) !important;
  border: none !important;
  color: #ffffff !important;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-right: 8px;
}

.chat-reset-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: rotate(-180deg) scale(1.1);
}

/* Chat Message layout adjustment for relative absolute placement */
.chat-message {
  position: relative;
}

/* Copy Button styles */
.chat-copy-btn {
  position: absolute;
  right: -32px;
  top: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.chat-message.bot:hover .chat-copy-btn {
  opacity: 0.7;
}

.chat-copy-btn:hover {
  opacity: 1 !important;
  color: var(--accent);
}

/* Helpfulness Feedback rating styles */
.chat-feedback-wrapper {
  position: absolute;
  right: -32px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transition: all 0.3s ease;
}

.chat-message.bot:hover .chat-feedback-wrapper {
  opacity: 0.7;
}

.chat-feedback-wrapper:hover {
  opacity: 1 !important;
}

.feedback-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px;
  transition: all 0.2s ease;
}

.feedback-btn:hover {
  color: var(--accent);
  transform: scale(1.15);
}

.feedback-btn:disabled {
  cursor: default;
  pointer-events: none;
}

/* Suggestion pills glassmorphism */
.suggestion-pill {
  background: rgba(240, 244, 255, 0.7) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(26, 58, 143, 0.08) !important;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.suggestion-pill:hover {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25) !important;
}

/* Float Drift Animations for CTA Floating Buttons */
@keyframes floatDrift {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

.whatsapp-btn {
  animation: floatDrift 4s ease-in-out infinite !important;
}

.chatbot-btn {
  animation: floatDrift 4s ease-in-out infinite 0.5s !important;
}

.whatsapp-btn:hover, .chatbot-btn:hover {
  animation-play-state: paused !important;
  transform: scale(1.1) !important;
}

/* Typography smoothing and active states feedback on CTAs */
body, html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.hero-cta-btn:active, .form-submit-btn:active, .chat-send-btn:active {
  transform: scale(0.97) !important;
}

/* Styled Email Button in Chat */
.chat-custom-btn.chat-btn-email {
  background-color: #f1f5f9 !important;
  color: var(--text-dark) !important;
  border: 1px solid rgba(15, 23, 42, 0.15) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02) !important;
}

.chat-custom-btn.chat-btn-email:hover {
  background-color: #e2e8f0 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08) !important;
}

/* Styled Facebook Button in Chat */
.chat-custom-btn.chat-btn-facebook {
  background-color: #1877f2 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.22) !important;
}

.chat-custom-btn.chat-btn-facebook:hover {
  background-color: #166fe5 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.38) !important;
}

/* ==================================================
   ADMIN LOGIN MODAL & GLASSMORPHIC INTERFACE
   ================================================== */
.admin-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  padding: 20px;
  overflow-y: auto;
}

.admin-login-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.admin-login-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25), 
              inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: 40px;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-login-overlay.visible .admin-login-card {
  transform: translateY(0) scale(1);
}

.admin-login-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(15, 23, 42, 0.05);
  border: none;
  font-size: 24px;
  color: #64748b;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.admin-login-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: rotate(90deg);
}

.admin-login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.admin-login-logo img {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
  margin-bottom: 16px;
}

.admin-login-logo h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.admin-login-logo p {
  font-size: 0.88rem;
  color: #64748b;
}

.admin-login-error {
  display: none;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ea580c;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.admin-login-field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-login-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
}

.admin-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.admin-input-wrapper i {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
}

.admin-input-wrapper input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: rgba(248, 250, 252, 0.8);
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.admin-input-wrapper input::placeholder {
  color: #94a3b8;
}

.admin-input-wrapper input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.admin-toggle-pwd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease;
  z-index: 10;
}

.admin-toggle-pwd:hover {
  color: #0f172a;
}

.admin-login-submit {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  margin-top: 10px;
}

.admin-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.admin-login-submit:active {
  transform: translateY(0);
}

.admin-login-submit.loading {
  background: #1d4ed8;
  pointer-events: none;
}

/* Spinner */
.admin-spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid #ffffff;
  width: 22px;
  height: 22px;
  animation: spin 0.8s linear infinite;
  position: absolute;
}

/* Shake Animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.admin-login-card.shake {
  animation: shake 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive fixes for admin login card */
@media (max-width: 480px) {
  .admin-login-card {
    padding: 30px 20px;
  }
}
