/* ============================================================
   Certex AI - Shared Styles
   Used by index.html and all servicio-*.html pages.
   ============================================================ */

/* CSS Custom Properties for Light/Dark Mode
   Note: *-rgb variants exist so rgba() can interpolate alpha. */
:root[data-bs-theme="light"] {
    --bg-main: #F9FAFB;
    --surface: #FFFFFF;
    --surface-hover: #F3F4F6;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --primary: #2563EB;
    --primary-rgb: 37, 99, 235;
    --secondary: #7C3AED;
    --secondary-rgb: 124, 58, 237;
    --accent: #06B6D4;
    --accent-rgb: 6, 182, 212;
    --border-color: rgba(0,0,0,0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --blob-1: rgba(37, 99, 235, 0.15);
    --blob-2: rgba(124, 58, 237, 0.15);
}

:root[data-bs-theme="dark"] {
    --bg-main: #0B1120;
    --surface: #1E293B;
    --surface-hover: #334155;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --primary: #A855F7;
    --primary-rgb: 168, 85, 247;
    --secondary: #38BDF8;
    --secondary-rgb: 56, 189, 248;
    --accent: #818CF8;
    --accent-rgb: 129, 140, 248;
    --border-color: rgba(255,255,255,0.08);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --blob-1: rgba(168, 85, 247, 0.15);
    --blob-2: rgba(56, 189, 248, 0.15);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

/* Animated Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}
.blob {
    position: absolute;
    filter: blur(100px);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out alternate;
}
.blob-1 { background: var(--blob-1); width: 50vw; height: 50vw; top: -10vh; left: -10vw; }
.blob-2 { background: var(--blob-2); width: 40vw; height: 40vw; bottom: -10vh; right: -5vw; animation-delay: 3s; }
@keyframes float {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(50px, 30px) scale(1.1); }
    100% { transform: translate(-30px, 50px) scale(0.9); }
}

/* Glass Navbar */
.navbar-custom {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
}
[data-bs-theme="dark"] .navbar-brand {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: 0; left: 50%;
    background-color: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: var(--primary) !important; }

/* Dropdown Glassmorphism */
.dropdown-menu {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 0.5rem;
}
.dropdown-item {
    color: var(--text-main);
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}
.dropdown-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn-primary-custom:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
    color: #fff;
}
.btn-outline-custom {
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 50px;
    padding: 0.8rem 1.8rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 500;
    transition: all 0.3s;
}
.btn-outline-custom:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Glass Cards */
.card-custom {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    overflow: hidden;
}
.card-custom:hover {
    transform: translateY(-10px);
    border-color: rgba(var(--primary-rgb), 0.5);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
[data-bs-theme="dark"] .card-custom:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Text Utils */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Section Padding */
.section-padding {
    padding: 6rem 0;
    position: relative;
}

/* Service Page Hero Header */
.service-hero {
    padding: 8rem 0 4rem 0;
    background: linear-gradient(to bottom, rgba(var(--primary-rgb), 0.05), transparent);
    border-bottom: 1px solid var(--border-color);
}

/* Service Icon Box */
.icon-box {
    width: 60px; height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2), rgba(var(--secondary-rgb), 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.icon-box i { font-size: 1.8rem; color: var(--primary); }
[data-bs-theme="dark"] .icon-box i { color: var(--secondary); }

/* Footer hover */
.hover-primary { transition: color 0.3s; }
.hover-primary:hover { color: var(--primary) !important; }

/* Bounce animation for scroll indicator */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}
.animate-bounce { animation: bounce 2s infinite; }
