:root {
    --bg-color: #121212;
    --vanilla-kraft: #fff7e6;
    --kraft-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    --matte-black: #1A1A1A;
    --text-muted: #4d4d4d;
    --accent-color: #a72120;
    --accent-hover: #c42726;
    --border-color: rgba(26, 26, 26, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Oranienbaum', serif;
    background-color: var(--bg-color);
    color: var(--matte-black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- TIPOGRAFÍA Y TEXTOS GLOBALES --- */
h1 {
    font-size: 4.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #ffffff;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

h2 {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1.2rem;
    color: var(--matte-black);
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.04em;
}

h3 {
    font-size: 1.15rem;
    color: var(--matte-black);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-weight: 400;
}

p {
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 1.2rem;
    color: var(--matte-black);
    font-size: 1.1rem;
}

.info-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* --- NAVEGACIÓN --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
    border-bottom: 1px solid #333333;
}

.nav-brand {
    font-weight: 400;
    font-size: 1.1rem;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #ffffff;
    transition: 0.3s;
}

/* --- CABECERAS (HERO) --- */
.hero-content {
    position: relative;
    max-width: 950px;
    z-index: 3;
}

.hero-divider {
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
    border: none;
    margin: 1rem auto 1rem auto; /* Arriba | Derecha (Centrado) | Abajo | Izquierda (Centrado) */
}

.page-subtitle {
    font-size: 1.6rem;
    font-weight: 400;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
}

/* Cabecera: Index */
header.hero {
    position: relative;
    height: 100vh;
    min-height: 650px;
    background: linear-gradient(to top, rgba(18, 18, 18, 0.95) 0%, rgba(18, 18, 18, 0.75) 25%, rgba(18, 18, 18, 0) 50%), url('images/image.jpg') no-repeat center center/cover;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    padding: 0 1.5rem 4rem 1.5rem;
}

.hero-subtitle {
    font-size: 1.6rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

header.hero .hero-divider {
    margin: 0 auto 1.5rem auto;
}

.hero-quote {
    font-style: italic;
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-quote span {
    display: block;
    margin-top: 0.4rem;
    font-style: normal;
    font-size: 0.95rem;
    color: #a0a0a0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Cabecera: Director */
header.hero-director {
    position: relative;
    height: 65vh;
    min-height: 450px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    padding: 60px 1.5rem 0 1.5rem;
    overflow: hidden;
    margin-top: 60px;
    background: linear-gradient(to bottom, #1a1a1a, var(--bg-color));
}

header.hero-director::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.95) 0%, rgba(18, 18, 18, 0.75) 25%, rgba(18, 18, 18, 0) 50%), url('images/director.jpg') no-repeat center center/cover;
    z-index: 1;
}

/* Cabecera: Talleres */
header.hero-talleres {
    position: relative;
    height: 65vh;
    min-height: 450px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    padding: 60px 1.5rem 0 1.5rem;
    overflow: hidden;
    margin-top: 60px;
    background: linear-gradient(to bottom, #1a1a1a, var(--bg-color));
}

header.hero-talleres::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.95) 0%, rgba(18, 18, 18, 0.75) 25%, rgba(18, 18, 18, 0) 50%), url('images/talleres.jpg') no-repeat center center/cover;
    z-index: 1;
}

/* Cabecera: Laboratorio */
header.hero-laboratorio {
    position: relative;
    height: 65vh;
    min-height: 450px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    padding: 60px 1.5rem 0 1.5rem;
    overflow: hidden;
    margin-top: 60px;
    background: linear-gradient(to bottom, #1a1a1a, var(--bg-color));
}

header.hero-laboratorio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0.95) 0%, rgba(18, 18, 18, 0.75) 25%, rgba(18, 18, 18, 0) 50%), url('images/lab2.jpg') no-repeat center center/cover;
    z-index: 1;
}

/* Cabecera compacta para contacto */
header.hero-contacto {
    display: flex;
    justify-content: center;
    text-align: center;
    padding: 8rem 1.5rem 2rem 1.5rem; 
    background: var(--bg-color);
}

/* Específicos CONTACTO */
input, select, textarea {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 0.8rem 1rem;
    color: var(--matte-black);
    font-family: 'Oranienbaum', serif;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    width: 100%;
}

textarea {
    resize: vertical; /* Permite al usuario hacer la caja más grande solo hacia abajo */
    min-height: 150px; /* Altura mínima para que parezca un cuadro de mensaje */
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* --- BLOQUES PRINCIPALES (CARDS Y CONTENEDORES) --- */
.container {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.card {
    background-color: var(--vanilla-kraft);
    background-image: var(--kraft-grain);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    color: var(--matte-black);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* --- BOTONES --- */
.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 2px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-family: 'Oranienbaum', serif;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.center-btn {
    text-align: center;
    margin-top: 1.5rem;
}

/* --- ESPECÍFICOS DE INDEX --- */
.intro-text-block {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.intro-text-block p {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.7;
    margin-bottom: 0;
}

form {
    display: grid;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--matte-black);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-weight: 400;
}

input {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 0.8rem 1rem;
    color: var(--matte-black);
    font-family: 'Oranienbaum', serif;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

input, select {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 0.8rem 1rem;
    color: var(--matte-black);
    font-family: 'Oranienbaum', serif;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    width: 100%;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%201A1A1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.rgpd-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    line-height: 1.4;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* --- GRILLAS DE DETALLES (Index y Laboratorio) --- */
.details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.details-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.detail-item strong {
    display: block;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    font-weight: 400;
}

.detail-item span {
    color: var(--matte-black);
    font-size: 1.05rem;
    font-weight: 400;
}

.portrait-grid-wide {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.portrait-grid-wide img {
    width: 260px;
    height: 325px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.portrait-grid-wide img:hover {
    filter: grayscale(0%);
    transform: translateY(-3px);
}

.portrait-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.portrait-grid img {
    width: 260px;
    height: 325px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.portrait-grid img:hover {
    filter: grayscale(0%);
    transform: translateY(-3px);
}

/* --- ESPECÍFICOS DE LABORATORIO --- */
.bw-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: 4px;
    object-fit: contain;
}

.layer-box {
    background-color: rgba(255, 255, 255, 0.65);
    border-left: 3px solid var(--accent-color);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 0 4px 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.layer-box p {
    margin-bottom: 0;
}

.benefits-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.benefit-item {
    background-color: rgba(255, 255, 255, 0.65);
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.benefit-item strong {
    color: var(--accent-color);
    display: block;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: -0.01em;
    font-weight: 400;
}

.benefit-item p {
    margin-bottom: 0;
}

/* --- FOOTER UNIFICADO --- */
footer {
    text-align: center;
    padding: 4rem 1.5rem;
    border-top: 1px solid #333333;
    color: #a0a0a0;
    font-size: 0.95rem;
    background-color: #121212;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-icons a {
    color: #a0a0a0;
    display: inline-flex;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.social-icons svg {
    width: 32px;
    height: 32px;
}

.footer-info {
    font-size: 0.95rem;
    color: #a0a0a0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Fix para evitar que el copyright herede estilos globales */
.footer-info p {
    color: inherit;
    font-size: inherit;
    margin: 0;
    letter-spacing: inherit;
}

/* --- RESPONSIVO (Móviles) --- */
@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 1.4rem; }
    .hero-subtitle, .page-subtitle { font-size: 1.2rem; }
    .card { padding: 1.5rem; }
    
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(18, 18, 18, 0.98);
        padding: 1.5rem 2rem;
        border-bottom: 1px solid #333333;
        gap: 1.2rem;
        text-align: center;
    }
    .nav-links.active { display: flex; }
    
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    .details-grid.grid-2 {
        grid-template-columns: 1fr;
    }
    
    .portrait-grid { gap: 1rem; }
    .portrait-grid img {
        width: 180px;
        height: 225px;
    }
}
