/* ============================================
   COMUNIDAD TERAPÉUTICA SAN MARTÍN - DARK MODERN THEME
   ============================================ */

:root {
    /* Nueva Paleta Enterprise Light Mode */
    --bg-main: #ffffff;
    /* White background */
    --bg-surface: #f8fafc;
    /* Slate 50 */
    --bg-card: #f1f5f9;
    /* Slate 100 - Visible contrast */
    --bg-card-hover: #e2e8f0;
    /* Slate 200 */
    --bg-accent-dark: #1e3a8a;
    /* Dark Blue 900 */

    --text-main: #0f172a;
    /* Slate 900 - Dark text */
    --text-muted: #64748b;
    /* Slate 500 */

    --primary: #2563eb;
    /* Blue 600 */
    --primary-hover: #1d4ed8;
    /* Blue 700 */
    --accent: #3b82f6;
    /* Blue 500 */

    --border-subtle: #e2e8f0;
    /* Slate 200 */
    --border-hover: #cbd5e1;
    /* Slate 300 */

    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.05);

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header & Footer Specific Dark Overrides */
header,
footer {
    --bg-main: #020202;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
}

header .glass-panel {
    background: rgba(2, 2, 2, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header nav a {
    color: #94a3b8;
    /* Explicit muted color for nav links */
}

header nav a:hover {
    color: white;
}

/* Update Footer specific link colors if needed */
footer a {
    color: #94a3b8;
}

footer a:hover {
    color: white;
}


h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    /* Slate 200 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.glass-card h1,
.glass-card h2,
.glass-card h3,
.glass-card h4,
.glass-card h5,
.glass-card h6 {
    color: #0f172a;
    /* Slate 900 */
}

.glass-card p,
.glass-card li,
.glass-card span {
    color: #64748b;
    /* Slate 500 */
}

.glass-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.text-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-subtle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

/* Section Specific Overrides for compatibility */
.hero-bg {
    background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.05) 0%, rgba(255, 255, 255, 0) 50%);
}

.grid-bg-pattern {
    background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 60%, transparent 100%);
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}