/* --- Variables y Estilos Generales --- */
:root {
    --red-team: #e74c3c;
    --blue-team: #3498db;
    --background: #1e1e1e;
    --surface: #2d2d2d;
    --text: #f2f2f2;
    --text-muted: #a0a0a0;
    --border: #444;
    --shadow: rgba(0, 0, 0, 0.4);
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    line-height: 1.7;
}

/* --- Header y Navegación --- */
header {
    background-color: var(--surface);
    padding: 1rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav a {
    color: var(--text-muted);
    margin: 0 15px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

body:has(a[href="index.html"].active) nav a.active {
    background-color: var(--blue-team);
    color: white;
}
body:has(a[href="redteam.html"].active) nav a.active {
    background-color: var(--red-team);
    color: white;
}
nav a:not(.active):hover {
    color: var(--text);
}

/* --- Contenido Principal --- */
main {
    padding: 2rem 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.intro {
    text-align: center;
    margin-bottom: 4rem;
}

.intro h1 {
    font-size: 3em;
    margin-bottom: 0.5rem;
    font-weight: 700;
}
body:has(a[href="index.html"].active) .intro h1 { color: var(--blue-team); }
body:has(a[href="redteam.html"].active) .intro h1 { color: var(--red-team); }

.intro p {
    font-size: 1.2em;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* --- Secciones y Tarjetas de Herramientas --- */
.tools-section {
    margin-bottom: 4rem;
}

.tools-section h2 {
    font-size: 2em;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
}

.tools-section h2 .icon {
    margin-right: 12px;
    font-size: 1.2em;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 10px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow);
}

/* --- ESTILOS PARA LOS LOGOS --- */
.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.tool-logo {
    height: 32px; /* Altura fija para los logos */
    width: 32px; /* Ancho fijo para los logos */
    margin-right: 12px;
    object-fit: contain; /* Asegura que el logo no se deforme */
}

/* El logo de Volatility tiene fondo blanco, esto lo arregla en modo oscuro 
img[src*="volatility"] {
    filter: invert(1);
}*/

.tool-card h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}
body:has(a[href="index.html"].active) .tool-card h3 { color: var(--blue-team); }
body:has(a[href="redteam.html"].active) .tool-card h3 { color: var(--red-team); }


.tool-card p {
    margin: 0;
    color: var(--text-muted);
    flex-grow: 1; 
}

/* --- Estilo para el botón de Apuntes --- */
.apuntes-btn {
    display: inline-block;
    text-decoration: none;
    color: var(--text);
    padding: 8px 16px;
    margin-top: 1rem; /* Espacio sobre el botón */
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Color del botón según la página (Blue o Red) */
body:has(a[href="index.html"].active) .apuntes-btn {
    background-color: var(--blue-team);
}

body:has(a[href="redteam.html"].active) .apuntes-btn {
    background-color: var(--red-team);
}

.apuntes-btn:hover {
    background-color: var(--text);
    color: var(--background);
    transform: translateY(-2px); /* Efecto al pasar el ratón */
}