/* --- FITXER PRINCIPAL D'ESTILS: LASTRAMAS.COM --- */

/* 1. VARIABLES MESTRES */
:root {
    /* Colors de Fons */
    --bg-dark: #050507;      /* Negre gairebé pur */
    --bg-panel: #0f0f13;     /* Fons base panells */
    
    /* Accents de Marca */
    --accent-psoe: #E30613;
    --accent-tech: #3b82f6;
    --accent-traffic: #fbbf24;
    
    /* Sistema Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    --blur-strength: 20px;

    /* Text */
    --text-main: #ffffff;
    --text-dim: #8b8b93;
    --font-main: 'Inter', sans-serif;
}

/* 2. RESET I BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 3. FONS ANIMAT (CINEMATIC) */
.video-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle at 50% 50%, #111115 0%, #000000 100%);
    overflow: hidden; pointer-events: none;
}

/* Nodes flotants (Boles de fons) */
.node-bg {
    position: absolute;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatNode 20s infinite ease-in-out;
}
.n1 { width: 600px; height: 600px; top: -10%; left: -10%; animation-delay: 0s; }
.n2 { width: 400px; height: 400px; bottom: 10%; right: -5%; animation-delay: -5s; background: radial-gradient(circle, rgba(227, 6, 19, 0.08) 0%, transparent 70%); }
.n3 { width: 300px; height: 300px; top: 40%; left: 40%; animation-delay: -10s; opacity: 0.5; }

@keyframes floatNode {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 50px); }
}

/* Grid Overlay (Textura tècnica) */
.grid-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px; pointer-events: none; z-index: -1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* 4. BARRA DE NAVEGACIÓ */
.glass-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 5%; 
    position: fixed; top: 0; width: 100%; z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 7, 0.7);
    border-bottom: 1px solid var(--glass-border);
}

/* ESTIL DEL LOGOTIP (Això fa que el text sembli un logo) */
.brand-logo { text-decoration: none; cursor: pointer; transition: opacity 0.3s; line-height: 1; display: flex; flex-direction: column; }
.brand-logo:hover { opacity: 0.9; }
.brand-top { font-size: 0.55rem; font-weight: 700; letter-spacing: 0.6em; color: var(--accent-psoe); margin-left: 2px; text-transform: uppercase; }
.brand-main { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.05em; color: var(--text-main); display: flex; align-items: baseline; }
.brand-dot { color: var(--accent-psoe); }
.brand-ext { font-size: 0.9rem; font-weight: 500; color: var(--text-dim); letter-spacing: -0.02em; margin-left: 1px; }

.menu { display: flex; align-items: center; gap: 2rem; }
.menu a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: 0.3s; }
.menu a:hover, .menu a.active { color: white; }
.btn-lang { border: 1px solid var(--glass-border); padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; color: var(--text-dim); }
.btn-lang:hover { border-color: var(--text-main); color: var(--text-main); }

/* 5. ESTRUCTURA PORTADA */
.container { max-width: 1200px; margin: 0 auto; padding: 160px 20px 60px; }

.hero-text { margin-bottom: 4rem; max-width: 800px; }
.hero-text h1 {
    font-size: 4.5rem; line-height: 1.05; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-text p { font-size: 1.25rem; color: var(--text-dim); max-width: 500px; line-height: 1.5; }

/* 6. BENTO GRID (CAIXES) */
.bento-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 320px); gap: 24px;
}

/* Estils generals de les Targetes */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px; padding: 32px;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer; text-decoration: none; color: white;
}
.glass-panel:hover {
    transform: translateY(-8px);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    background: rgba(255,255,255,0.05);
}

/* Efecte Glow (Llum ratolí) */
.glass-panel::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 24px; padding: 1px;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.15), transparent 40%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    pointer-events: none; opacity: 0; transition: opacity 0.5s;
}
.bento-grid:hover .glass-panel::before { opacity: 1; }

/* Mides i Posicions */
.main-card { grid-column: span 2; grid-row: span 2; }
.secondary-card { grid-column: span 1; grid-row: span 2; }
.tertiary-card { grid-column: span 1; grid-row: span 1; }
.info-card { grid-column: span 1; grid-row: span 1; display: flex; align-items: center; justify-content: center; text-align: center; }

/* Contingut intern */
.card-header { z-index: 2; }
.tag {
    display: inline-flex; font-size: 0.7rem; padding: 6px 12px; border-radius: 100px;
    margin-bottom: 16px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em;
}
.glass-panel h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; line-height: 1.1; }
.glass-panel p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.4; }

/* Estils Específics */
.tag-corruption { background: rgba(227, 6, 19, 0.15); color: #ff5c5c; border: 1px solid rgba(227, 6, 19, 0.3); }
.tag-traffic { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.tag-retro { background: rgba(255,255,255,0.1); color: #aaa; border: 1px solid rgba(255,255,255,0.2); }

/* Fons Visuals de les Targetes */
.visual-psoe {
    position: absolute; bottom: -50px; right: -50px; width: 100%; height: 100%;
    background-image: radial-gradient(circle, #E30613 1px, transparent 1px);
    background-size: 30px 30px; opacity: 0.2;
    mask-image: radial-gradient(circle at bottom right, black 50%, transparent 80%);
    transition: transform 0.5s ease;
}
.main-card:hover .visual-psoe { transform: scale(1.05); opacity: 0.3; }

.visual-traffic {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 40%;
    background: repeating-linear-gradient(-45deg, rgba(0,0,0,0), rgba(0,0,0,0) 10px, rgba(251, 191, 36, 0.05) 10px, rgba(251, 191, 36, 0.05) 20px);
    mask-image: linear-gradient(to top, black, transparent);
}

.visual-retro {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 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.03'%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");
}

.stat-number {
    font-size: 3rem; font-weight: 800;
    background: linear-gradient(to bottom, #fff, #666);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.8rem; text-transform: uppercase; color: var(--text-dim); letter-spacing: 0.1em; margin-top: 5px; }

/* Responsive */
@media (max-width: 968px) {
    .hero-text h1 { font-size: 3rem; }
    .bento-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .main-card, .secondary-card, .tertiary-card, .info-card { grid-column: span 1; grid-row: auto; min-height: 250px; }
}