/* 
   DAKAR STUDIOS CORPORATION - GLOBAL STYLES v2.0
   Design System: Innovation, Social Impact & Tech Excellence
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700;900&display=swap');

/* --- PANEL DE CONTROL DE MARCA (MODO OSCURO - DEFAULT) --- */
:root {
    /* Identidad */
    --primary: #f97316;       /* Naranja Dakar */
    --primary-glow: rgba(249, 115, 22, 0.4);
    
    /* Variables Dinámicas (Dark) */
    --bg-main: #0a0a0a;       /* Negro Profundo */
    --bg-card: #18181b;       /* Zinc 900 */
    --bg-card-hover: #27272a; /* Zinc 800 */
    --text-main: #ffffff;
    --text-muted: #a1a1aa;    /* Zinc 400 */
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Config */
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- VARIABLES PARA MODO CLARO --- */
body.light-mode {
    --bg-main: #f4f4f5;       /* Zinc 100 */
    --bg-card: #ffffff;       /* Blanco Puro */
    --bg-card-hover: #f1f5f9; /* Slate 100 */
    --text-main: #09090b;     /* Zinc 950 */
    --text-muted: #52525b;    /* Zinc 600 */
    --border-color: rgba(0, 0, 0, 0.1);
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
}

/* --- ESTILOS BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.5s ease, color 0.5s ease;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- SCROLLBAR PERSONALIZADO (Premium Touch) --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 10px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Selección de texto */
::selection {
    background: var(--primary);
    color: #000;
}

/* --- COMPONENTES CORE --- */

/* Glassmorphism Navigation */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

/* Botón Dakar */
.btn-dakar {
    display: inline-block;
    padding: 1.25rem 3rem;
    background-color: var(--primary);
    color: #000;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-radius: 9999px;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px var(--primary-glow);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-dakar:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px var(--primary-glow);
    filter: brightness(1.1);
}

/* Texto en Outline */
.text-outline {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-muted);
}

.text-outline-primary {
    color: transparent;
    -webkit-text-stroke: 1px var(--primary);
}

/* --- UTILIDADES DE GRID Y TEMA --- */

/* Sobrescribir fondos de tarjetas de Tailwind con nuestras variables */
.bg-zinc-900, .bg-zinc-900\/50, .bg-zinc-900\/40, .bg-zinc-900\/30, .bg-black {
    background-color: var(--bg-card) !important;
    transition: background-color 0.5s ease;
}

/* Asegurar legibilidad en modo claro */
body.light-mode .text-zinc-400, 
body.light-mode .text-zinc-500, 
body.light-mode .text-gray-400,
body.light-mode .text-gray-500 {
    color: var(--text-muted) !important;
}

body.light-mode .bg-white {
    background-color: var(--bg-main) !important;
}

body.light-mode .text-black {
    color: var(--text-main) !important;
}

/* --- EFECTOS ESPECIALES DE PROYECTOS --- */

/* PGC Grid Pattern */
.bg-grid {
    background-image: radial-gradient(circle, var(--border-color) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Kinetic Border (Para TDK) */
.kinetic-border-active {
    position: relative;
    z-index: 1;
}

.kinetic-border-active::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, transparent, var(--primary), transparent 30%);
    animation: rotate-kinetic 4s linear infinite;
    z-index: -1;
    border-radius: inherit;
}

@keyframes rotate-kinetic {
    100% { transform: rotate(360deg); }
}

/* Brillo suave para KIVA */
.soft-glow-edu {
    box-shadow: 0 0 50px rgba(249, 115, 22, 0.05);
}

/* --- ANIMACIONES --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Hover de tarjetas global */
.group:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .text-outline, .text-outline-primary {
        -webkit-text-stroke: 0.5px var(--text-muted);
    }
    
    .btn-dakar {
        padding: 1rem 2rem;
        font-size: 0.8rem;
    }
}

/* Capa para el Video Hero */
.hero-video-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), var(--black));
}

/* Fuerza a los títulos de las tarjetas a no desbordar nunca */
.hero-section h4 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Si no cabe, pone ... (opcional) */
}

/* O mejor aún, para que se ajuste el tamaño */
@media (min-width: 768px) and (max-width: 1200px) {
    .hero-section h4 {
        font-size: 1.7rem !important; /* Ajuste manual para laptops */
    }
}