/* ============================================================
   SIVET - Sistema de Diseño Principal
   Veterinarios AMIR | Control WEB
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
    /* Paleta Principal - Azul */
    --blue-50:  #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;
    --blue-950: #172554;

    /* Paleta Acento - Naranja */
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;

    /* Paleta Éxito - Verde */
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;

    /* Paleta Peligro - Rojo */
    --red-400:  #f87171;
    --red-500:  #ef4444;
    --red-600:  #dc2626;

    /* Paleta Advertencia - Amarillo */
    --yellow-400: #facc15;
    --yellow-500: #eab308;

    /* Paleta Morado */
    --purple-500: #a855f7;
    --purple-600: #9333ea;

    /* ===== MODO CLARO (Default) ===== */
    --bg-primary:    #f8fafc;
    --bg-secondary:  #ffffff;
    --bg-tertiary:   #f1f5f9;
    --bg-card:       #ffffff;
    --bg-input:      #ffffff;
    
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;
    --text-inverse:   #ffffff;
    
    --border-color:   #e2e8f0;
    --border-strong:  #cbd5e1;
    
    --shadow-sm:  0 1px 2px rgba(0,0,0,.05);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
    --shadow-blue:0 8px 30px rgba(37, 99, 235, 0.25);
    
    --accent:      var(--blue-600);
    --accent-hover:var(--blue-700);
    --accent-light:var(--blue-50);
    
    /* Sidebar */
    --sidebar-bg:   #0f172a;
    --sidebar-text: #cbd5e1;
    --sidebar-active-bg: rgba(59,130,246,0.15);
    --sidebar-active-text: #60a5fa;
    --sidebar-hover-bg: rgba(255,255,255,0.05);

    /* Scrollbar */
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-track: #f1f5f9;
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(.4,0,.2,1);
    --transition-slow: all 0.4s cubic-bezier(.4,0,.2,1);
    
    /* Border radius */
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-full: 9999px;
}

/* ===== MODO OSCURO ===== */
[data-theme="dark"] {
    --bg-primary:    #0b1120;
    --bg-secondary:  #111827;
    --bg-tertiary:   #1f2937;
    --bg-card:       #1a2332;
    --bg-input:      #1f2937;
    
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --text-inverse:   #0f172a;
    
    --border-color:   #1e293b;
    --border-strong:  #334155;
    
    --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,.4), 0 2px 4px -1px rgba(0,0,0,.3);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -2px rgba(0,0,0,.3);
    --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.5), 0 10px 10px -5px rgba(0,0,0,.3);
    --shadow-blue:0 8px 30px rgba(59, 130, 246, 0.35);
    
    --accent:      var(--blue-500);
    --accent-hover:var(--blue-400);
    --accent-light:rgba(59,130,246,0.1);

    --sidebar-bg:   #070d1b;
    --sidebar-text: #94a3b8;

    --scrollbar-thumb: #334155;
    --scrollbar-track: #1e293b;
}

/* ============================================================
   RESET Y BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar personalizado */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { color: var(--text-secondary); margin-bottom: 1rem; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-fluid { width: 100%; padding: 0 1.5rem; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 1.5rem; }
.container-lg { max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.text-center { text-align: center; }
.text-right { text-align: right; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.card-body { }
.card-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: .9rem;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--blue-600);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37,99,235,.4);
}
.btn-primary:hover {
    background: var(--blue-700);
    box-shadow: 0 6px 20px rgba(37,99,235,.5);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--border-color); color: var(--text-primary); }

.btn-danger {
    background: var(--red-600);
    color: #fff;
}
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-success {
    background: var(--green-600);
    color: #fff;
}
.btn-success:hover { background: #15803d; color: #fff; }

.btn-warning {
    background: var(--yellow-500);
    color: #1a1a1a;
}
.btn-warning:hover { background: var(--yellow-400); }

.btn-orange {
    background: var(--orange-500);
    color: #fff;
    box-shadow: 0 4px 14px rgba(249,115,22,.4);
}
.btn-orange:hover { background: var(--orange-600); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.btn-sm { padding: .4rem .85rem; font-size: .8rem; }
.btn-lg { padding: .9rem 1.75rem; font-size: 1rem; }
.btn-xl { padding: 1.1rem 2.2rem; font-size: 1.1rem; }
.btn-icon { padding: .6rem; border-radius: var(--radius-md); }
.btn-full { width: 100%; justify-content: center; }

.btn:disabled, .btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

/* ============================================================
   FORMULARIOS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: .5rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--red-500);
}

.form-control {
    width: 100%;
    padding: .7rem 1rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: .95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.input-group {
    display: flex;
    align-items: stretch;
    position: relative;
}

.input-group-icon {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1rem;
    z-index: 2;
}

.input-group .form-control { padding-left: 2.5rem; }

.input-toggle-pw {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1rem;
    z-index: 2;
    transition: var(--transition);
}

.input-toggle-pw:hover { color: var(--text-primary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .35rem; }
.form-error { font-size: .8rem; color: var(--red-500); margin-top: .35rem; display: flex; align-items: center; gap: .25rem; }

/* ============================================================
   ALERTAS / NOTIFICACIONES
   ============================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .9rem;
    border: 1px solid transparent;
    animation: fadeInDown .3s ease;
}

.alert-icon { flex-shrink: 0; font-size: 1.1rem; margin-top: .05rem; }

.alert-success { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.25); color: var(--green-600); }
.alert-danger   { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.25); color: var(--red-600); }
.alert-warning  { background: rgba(234,179,8,.1); border-color: rgba(234,179,8,.25); color: #854d0e; }
.alert-info     { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.25); color: var(--blue-700); }

[data-theme="dark"] .alert-warning { color: var(--yellow-400); }
[data-theme="dark"] .alert-info { color: var(--blue-300); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .65rem;
    border-radius: var(--radius-full);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    gap: .3rem;
}

.badge-blue    { background: rgba(59,130,246,.15); color: var(--blue-600); }
.badge-green   { background: rgba(34,197,94,.15);  color: var(--green-600); }
.badge-red     { background: rgba(239,68,68,.15);  color: var(--red-600); }
.badge-orange  { background: rgba(249,115,22,.15); color: var(--orange-600); }
.badge-yellow  { background: rgba(234,179,8,.15);  color: #854d0e; }
.badge-purple  { background: rgba(168,85,247,.15); color: var(--purple-600); }
.badge-gray    { background: rgba(148,163,184,.15);color: var(--text-secondary); }

[data-theme="dark"] .badge-blue   { color: var(--blue-300); }
[data-theme="dark"] .badge-green  { color: var(--green-400); }
[data-theme="dark"] .badge-red    { color: var(--red-400); }
[data-theme="dark"] .badge-orange { color: var(--orange-400); }
[data-theme="dark"] .badge-yellow { color: var(--yellow-400); }

/* ============================================================
   TABLAS
   ============================================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-color); }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.table thead th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-tertiary); }
.table tbody tr { transition: background .15s ease; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

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

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 580px;
    width: 100%;
    border: 1px solid var(--border-color);
    transform: translateY(20px) scale(.97);
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 1.2rem; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: .35rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.modal-body { 
    padding: 1.5rem; 
    overflow-y: auto;
}
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
}

/* ============================================================
   DARK MODE TOGGLE
   ============================================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: .35rem .75rem;
    cursor: pointer;
    transition: var(--transition);
    font-size: .85rem;
    color: var(--text-secondary);
    font-weight: 500;
    user-select: none;
}

.theme-toggle:hover { background: var(--border-color); color: var(--text-primary); }

.theme-toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--border-strong);
    border-radius: 11px;
    transition: background .3s ease;
    flex-shrink: 0;
}

.theme-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .3s ease;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .theme-toggle-switch {
    background: var(--blue-500);
}

[data-theme="dark"] .theme-toggle-switch::after {
    transform: translateX(18px);
}

/* ============================================================
   NAVEGACIÓN PÚBLICA
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(11,17,32,.9);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}

.navbar-logo img {
    height: 72px;
    width: auto;
    object-fit: contain;
}

.navbar-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.navbar-logo-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--blue-700);
    letter-spacing: -.02em;
}

[data-theme="dark"] .navbar-logo-title { color: var(--blue-400); }

.navbar-logo-sub {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
}

.navbar-menu a {
    padding: .5rem .85rem;
    border-radius: var(--radius-md);
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}

.navbar-menu a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.navbar-menu a.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.navbar-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: .4rem;
    border-radius: var(--radius-sm);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/hero_bg.png');
    background-size: cover;
    background-position: center;
    opacity: .15;
    filter: blur(1px);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(11,17,32,.7) 0%,
        rgba(30,64,175,.6) 50%,
        rgba(11,17,32,.8) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 3rem 1.5rem;
    animation: fadeInUp .8s ease both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: .5rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: .04em;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: 1.05;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.hero h1 span {
    background: linear-gradient(90deg, #fb923c, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: rgba(255,255,255,.8);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn-primary {
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    color: #fff;
    padding: 1rem 2.25rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 8px 30px rgba(249,115,22,.5);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(249,115,22,.6);
    color: #fff;
}

.hero-btn-secondary {
    background: rgba(255,255,255,.1);
    border: 1.5px solid rgba(255,255,255,.3);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 1rem 2.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,.2);
    transform: translateY(-2px);
    color: #fff;
}

/* Partículas decorativas */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: .15;
    animation: float linear infinite;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    box-shadow: var(--shadow-sm);
}

.stats-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-align: left;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.blue   { background: var(--blue-100); color: var(--blue-600); }
.stat-icon.orange { background: #fff7ed; color: var(--orange-500); }
.stat-icon.green  { background: #f0fdf4; color: var(--green-600); }
.stat-icon.purple { background: #faf5ff; color: var(--purple-600); }

[data-theme="dark"] .stat-icon.blue   { background: rgba(59,130,246,.15); color: var(--blue-300); }
[data-theme="dark"] .stat-icon.orange { background: rgba(249,115,22,.15); color: var(--orange-400); }
[data-theme="dark"] .stat-icon.green  { background: rgba(34,197,94,.15);  color: var(--green-400); }
[data-theme="dark"] .stat-icon.purple { background: rgba(168,85,247,.15); color: var(--purple-500); }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-weight: 800; font-size: 1.3rem; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; }

/* ============================================================
   SERVICES / CARDS CAROUSEL
   ============================================================ */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: .75rem; }
.section-header p { max-width: 600px; margin: 0 auto; }
.section-tag {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: .3rem .85rem;
    border-radius: var(--radius-full);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2rem 1.75rem;
    border: 1px solid var(--border-color);
    transition: var(--transition-slow);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    transition: height .3s ease;
}

.service-card:hover::before { height: 6px; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }

.service-card.blue::before  { background: var(--blue-500); }
.service-card.orange::before{ background: var(--orange-500); }
.service-card.green::before { background: var(--green-500); }
.service-card.purple::before{ background: var(--purple-500); }
.service-card.red::before   { background: var(--red-500); }
.service-card.yellow::before{ background: var(--yellow-500); }

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.service-card.blue   .service-icon { background: var(--blue-100); color: var(--blue-600); }
.service-card.orange .service-icon { background: #fff7ed; color: var(--orange-500); }
.service-card.green  .service-icon { background: #f0fdf4; color: var(--green-600); }
.service-card.purple .service-icon { background: #faf5ff; color: var(--purple-600); }
.service-card.red    .service-icon { background: #fef2f2; color: var(--red-600); }
.service-card.yellow .service-icon { background: #fefce8; color: var(--yellow-500); }

[data-theme="dark"] .service-card.blue   .service-icon { background: rgba(59,130,246,.15); color: var(--blue-300); }
[data-theme="dark"] .service-card.orange .service-icon { background: rgba(249,115,22,.15); color: var(--orange-400); }
[data-theme="dark"] .service-card.green  .service-icon { background: rgba(34,197,94,.15);  color: var(--green-400); }
[data-theme="dark"] .service-card.purple .service-icon { background: rgba(168,85,247,.15); color: var(--purple-500); }
[data-theme="dark"] .service-card.red    .service-icon { background: rgba(239,68,68,.15);  color: var(--red-400); }
[data-theme="dark"] .service-card.yellow .service-icon { background: rgba(234,179,8,.15);  color: var(--yellow-400); }

.service-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.service-card p { font-size: .9rem; color: var(--text-secondary); margin: 0; }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-600) 100%);
    color: #fff;
    padding: 4.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-section h2, .cta-section p { color: #fff !important; position: relative; }
.cta-section h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.cta-section p { opacity: .85; max-width: 600px; margin: 0 auto 2rem; font-size: 1.1rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }

/* ============================================================
   CONTACTO SECTION
   ============================================================ */
.contact-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #fff;
    padding: 5rem 0;
}

.contact-form {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
}

.contact-form .form-control {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.15);
    color: #fff;
}

.contact-form .form-control:focus {
    border-color: rgba(255,255,255,.4);
    box-shadow: 0 0 0 3px rgba(255,255,255,.1);
}

.contact-form .form-control::placeholder { color: rgba(255,255,255,.4); }
.contact-form .form-label { color: rgba(255,255,255,.85); }

.contact-info-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.contact-info-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(249,115,22,.2);
    color: var(--orange-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-info-text p { margin: 0; color: rgba(255,255,255,.75); font-size: .9rem; }
.contact-info-text strong { color: #fff; font-weight: 600; }

/* ============================================================
   MAPA
   ============================================================ */
.map-section {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(.3) contrast(1.1);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #070d1b;
    color: #64748b;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand img { height: 156px; margin-bottom: 1rem; }
.footer-brand p { font-size: .9rem; color: #64748b; line-height: 1.7; }

.footer-col h4 {
    color: #f1f5f9;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1.25rem;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }

.footer-col ul li a {
    color: #64748b;
    font-size: .9rem;
    transition: var(--transition);
}

.footer-col ul li a:hover { color: #f1f5f9; }

.footer-social { display: flex; gap: .75rem; margin-top: 1rem; }

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

.footer-social a:hover { background: var(--blue-700); color: #fff; border-color: var(--blue-700); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.06);
    padding-top: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p { margin: 0; font-size: .85rem; color: #475569; }

/* ============================================================
   BOTÓN SOS WHATSAPP FLOTANTE
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.whatsapp-btn {
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 6px 24px rgba(37,211,102,.5);
    animation: pulse-green 2.5s ease infinite;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 32px rgba(37,211,102,.7);
    color: #fff;
}

.whatsapp-label {
    background: #1a1a1a;
    color: #fff;
    padding: .3rem .75rem;
    border-radius: var(--radius-full);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: .15; }
    90%  { opacity: .08; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

@keyframes pulse-green {
    0%,100% { box-shadow: 0 6px 24px rgba(37,211,102,.5); }
    50%      { box-shadow: 0 6px 36px rgba(37,211,102,.8), 0 0 0 10px rgba(37,211,102,.1); }
}

@keyframes pulse-blue {
    0%,100% { box-shadow: 0 4px 14px rgba(37,99,235,.4); }
    50%      { box-shadow: 0 4px 24px rgba(37,99,235,.7), 0 0 0 8px rgba(37,99,235,.1); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity .7s ease, transform .7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: .1s; }
.fade-in-delay-2 { transition-delay: .2s; }
.fade-in-delay-3 { transition-delay: .3s; }
.fade-in-delay-4 { transition-delay: .4s; }
.fade-in-delay-5 { transition-delay: .5s; }

/* ============================================================
   LOADING STATES
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-color) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--blue-500);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    display: inline-block;
}

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    padding: 0 .5rem;
}

.page-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.page-btn.active { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   WELCOME TOAST
   ============================================================ */
.welcome-toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-xl);
    max-width: 340px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: slideInRight .4s cubic-bezier(.34,1.56,.64,1) both;
    border-left: 4px solid var(--blue-500);
}

.welcome-toast.leaving {
    animation: slideOutRight .3s ease both;
}

@keyframes slideOutRight {
    to { transform: translateX(120%); opacity: 0; }
}

.welcome-toast-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--blue-100);
    color: var(--blue-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

[data-theme="dark"] .welcome-toast-icon { background: rgba(59,130,246,.15); color: var(--blue-300); }

.welcome-toast-content h4 { font-size: 1rem; margin-bottom: .25rem; }
.welcome-toast-content p { font-size: .85rem; color: var(--text-muted); margin: 0; }

.welcome-toast-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .9rem;
    padding: .2rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.welcome-toast-close:hover { color: var(--text-primary); background: var(--bg-tertiary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar-menu { display: none; }
    .navbar-hamburger { display: flex; }
    
    .navbar-menu.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        gap: .25rem;
        box-shadow: var(--shadow-lg);
        z-index: 499;
        animation: fadeInDown .2s ease;
    }

    .navbar-menu.mobile-open a { display: block; }
    
    .hero { min-height: 70vh; }
    .hero h1 { font-size: 2.2rem; }
    
    .stats-bar-inner { justify-content: flex-start; gap: 1.25rem; }
    
    .form-row { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    
    .cta-buttons { flex-direction: column; align-items: center; }
    
    .modal { max-width: 100%; margin: 0 .5rem; }
    
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-btn-primary, .hero-btn-secondary { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .container, .container-fluid { padding: 0 1rem; }
    .card { padding: 1.25rem; }
    .section { padding: 3rem 0; }
    .whatsapp-float { bottom: 1.25rem; right: 1.25rem; }
    .whatsapp-btn { width: 54px; height: 54px; font-size: 1.5rem; }
}
