/* ========== custom_theme.css ========== */
:root {
    --brand-red: #EE1C25;
    --brand-red-dark: #c8101a;
    --brand-red-light: #f23a41;
    --brand-red-glow: rgba(238, 28, 37, 0.35);
    --bg-deep: #050508;
    --bg-dark: #0a0a0f;
    --bg-card: #111118;
    --bg-card-hover: #181825;
    --bg-nav: rgba(10, 10, 15, 0.82);
    --text-primary: #f4f4f6;
    --text-secondary: #b0b0bd;
    --text-muted: #6b6b7b;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(238, 28, 37, 0.4);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-card-hover: 0 4px 8px rgba(0, 0, 0, 0.5), 0 18px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border-glow);
    --shadow-glow-red: 0 0 60px rgba(238, 28, 37, 0.25), 0 0 120px rgba(238, 28, 37, 0.08);
    --transition-smooth: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    --transition-bounce: 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

/* Selección de texto */
::selection {
    background-color: var(--brand-red);
    color: #ffffff;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #2a2a38;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-red);
}

/* Navbar con backdrop blur */
.navbar-glass {
    background: var(--bg-nav);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    z-index: 1000;
}
.navbar-glass.scrolled {
    background: rgba(10, 10, 15, 0.92);
    border-bottom: 1px solid var(--border-medium);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Enlaces de navegación */
.nav-link {
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    padding: 0.45rem 0;
    transition: color 0.25s ease;
}
.nav-link:hover {
    color: #ffffff;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--brand-red);
    border-radius: 4px;
    transition: width var(--transition-smooth);
}
.nav-link:hover::after {
    width: 100%;
}
.nav-link.active {
    color: #ffffff;
}
.nav-link.active::after {
    width: 100%;
    background: var(--brand-red);
}

.nav-link-mobile {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: color 0.25s ease;
}
.nav-link-mobile:last-of-type {
    border-bottom: none;
}
.nav-link-mobile:hover {
    color: #ffffff;
}
.nav-link-mobile.active {
    color: #ffffff;
    padding-left: 0.5rem;
}

/* Botones */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--brand-red);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1.9rem;
    border-radius: 60px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-bounce);
    box-shadow: 0 6px 24px var(--brand-red-glow);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    border-radius: 60px;
    pointer-events: none;
}
.btn-primary:hover {
    background: #f02830;
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(238, 28, 37, 0.45), 0 0 0 4px rgba(238, 28, 37, 0.12);
    color: #ffffff;
}
.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 4px 16px var(--brand-red-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.8rem 1.8rem;
    border-radius: 60px;
    text-decoration: none;
    border: 1.5px solid var(--border-medium);
    cursor: pointer;
    transition: all var(--transition-smooth);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.btn-secondary:hover {
    border-color: var(--brand-red);
    background: rgba(238, 28, 37, 0.06);
    box-shadow: 0 0 30px rgba(238, 28, 37, 0.1);
    transform: translateY(-2px);
    color: #ffffff;
}

/* Tarjetas de servicio */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    transition: all var(--transition-bounce);
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, var(--brand-red-glow) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 0;
}
.service-card:hover::before {
    opacity: 0.7;
}
.service-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    background: var(--bg-card-hover);
}
.service-card > * {
    position: relative;
    z-index: 1;
}
.service-card .icon-box {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(238, 28, 37, 0.1);
    border: 1px solid rgba(238, 28, 37, 0.2);
    transition: all var(--transition-smooth);
    flex-shrink: 0;
}
.service-card:hover .icon-box {
    background: var(--brand-red);
    border-color: var(--brand-red);
    box-shadow: 0 0 30px var(--brand-red-glow);
    transform: scale(1.05);
}
.service-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}
.service-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    flex-grow: 1;
}
.service-card .card-link {
    font-weight: 600;
    color: var(--brand-red-light);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap var(--transition-smooth);
    font-size: 0.9rem;
    margin-top: auto;
}
.service-card:hover .card-link {
    gap: 0.7rem;
    color: #ffffff;
}
.service-card .card-link svg {
    transition: transform var(--transition-smooth);
}
.service-card:hover .card-link svg {
    transform: translateX(3px);
}

/* Glow orb decorativo */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}
.glow-orb-red {
    background: var(--brand-red);
    width: 500px;
    height: 500px;
    top: -200px;
    right: -150px;
    opacity: 0.25;
    animation: floatOrb 12s ease-in-out infinite;
}
.glow-orb-purple {
    background: #6c2bd9;
    width: 400px;
    height: 400px;
    bottom: -150px;
    left: -100px;
    opacity: 0.2;
    animation: floatOrb 15s ease-in-out infinite reverse;
}
@keyframes floatOrb {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(40px, -30px);
    }
    50% {
        transform: translate(-20px, 20px);
    }
    75% {
        transform: translate(-35px, -15px);
    }
}

/* Badge / chip */
.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(238, 28, 37, 0.08);
    border: 1px solid rgba(238, 28, 37, 0.2);
    color: var(--brand-red-light);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 60px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.badge-chip .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-red);
    box-shadow: 0 0 10px var(--brand-red-glow);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 6px var(--brand-red-glow);
    }
    50% {
        box-shadow: 0 0 18px rgba(238, 28, 37, 0.7);
    }
}

/* Separador con gradiente */
.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-red), transparent);
    border-radius: 10px;
    margin: 0.8rem 0 1.5rem;
}

/* Footer */
.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
    font-size: 0.9rem;
}
.footer-link:hover {
    color: #ffffff;
}

/* Animación de aparición */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}
.fade-in-up:nth-child(2) {
    animation-delay: 0.15s;
}
.fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}
.fade-in-up:nth-child(4) {
    animation-delay: 0.45s;
}
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Partículas sutiles en el hero */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.hero-particles .particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: driftUp 8s linear infinite;
}
.hero-particles .particle:nth-child(odd) {
    background: rgba(238, 28, 37, 0.6);
    animation-duration: 11s;
}
@keyframes driftUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: translateY(-10vh) scale(0);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .service-card {
        padding: 2rem 1.5rem;
    }
    .hero-title {
        font-size: 2.2rem !important;
    }
    .hero-subtitle {
        font-size: 1rem !important;
    }
}