/* --- Variables y Reset --- */
:root {
    --primary-color: #ff4d4d;
    /* El rojo de tu diseño */
    --text-color: #2c3e50;
    --bg-light: #f4f4f4;
    /* Gris claro de las tarjetas */
    --bg-dark: #2c3e50;
    /* Azul oscuro del footer */
    --white: #ffffff;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Maven Pro', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
}

/* --- Utilidades --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(255, 77, 77, 0.3);
}

.btn-primary:hover {
    background-color: #6DBCDB;
    color: white;
    box-shadow: 0 4px 6px rgba(109, 188, 219, 0.4);
    /* Matching shadow with slight transparency */
}

.btn-dark {
    background-color: #333;
    color: var(--white);
    width: 100%;
}

/* --- Header --- */
.site-header {
    padding: 20px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    background-color: #2c3e50;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 5px 10px;
    font-size: 1.2rem;
    border-radius: 5px;
}

.site-header nav ul {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}



/* --- Hero Section --- */
.hero {
    margin-top: 60px;
    margin-bottom: 60px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    text-transform: uppercase;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 5px;
}

.subtitle {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.bio p {
    font-size: 1rem;
    color: #666;
}

/* --- Work Section --- */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-transform: uppercase;
    color: #2c3e50;
    margin-bottom: 30px;
}

.white {
    color: white;
}

.work-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile: 1 columna */
    gap: 30px;
}

.work-card {
    background-color: #eee;
    padding: 60px 40px;
    border-radius: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.work-card:hover {
    background-color: #2D3E50;
}

.work-card:hover h3,
.work-card:hover p {
    color: white;
}

.work-card h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #2c3e50;
}

.work-card p {
    margin-bottom: 25px;
    max-width: 300px;
}

/* Media Query para Desktop (Work Section) */
@media (min-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr 1fr;
        /* Desktop: 2 columnas */
    }
}

/* --- Timeline Section --- */
.timeline-section {
    margin: 80px auto;
    text-align: center;
}

.timeline-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 30px;
    display: block;
    /* Ensures centered with auto margins if needed, though parent is text-align: center */
    margin-left: auto;
    margin-right: auto;
}

.timeline-wrapper {
    position: relative;
    padding: 40px 0;
    /* En mobile, lo haremos lista vertical simple */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.t-box {
    border: 1px solid #ffcccc;
    border-radius: 8px;
    padding: 15px;
    background: white;
    text-align: left;
    width: 100%;
}

.t-box h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    color: #2c3e50;
}

.t-box span {
    font-size: 0.8rem;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

.timeline-line,
.dot,
.timeline-dates {
    display: none;
}

/* Ocultos en mobile */

.cv-download {
    margin-top: 40px;
}

/* Timeline Desktop Complejo */
@media (min-width: 900px) {
    .timeline-wrapper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 300px;
        /* Altura para acomodar arriba y abajo */
    }

    .timeline-line {
        display: block;
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 4px;
        background-color: #2c3e50;
        z-index: 0;
    }

    .timeline-dates {
        display: flex;
        justify-content: space-between;
        position: absolute;
        top: 55%;
        /* Justo debajo de la línea */
        width: 100%;
        font-weight: bold;
        color: #2c3e50;
        padding-top: 10px;
    }

    .t-item {
        position: relative;
        width: 16%;
        /* Espacio para 6 items aprox */
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .dot {
        display: block;
        width: 12px;
        height: 12px;
        background-color: var(--primary-color);
        border-radius: 50%;
        margin: 10px 0;
    }

    /* Items de Arriba */
    .t-item.top {
        align-self: flex-start;
        margin-bottom: auto;
    }

    .t-item.top .t-box {
        margin-bottom: 20px;
    }

    /* Items de Abajo */
    .t-item.bottom {
        align-self: flex-end;
        margin-top: auto;
        flex-direction: column-reverse;
        /* Invierte orden para que el punto quede arriba cerca de la línea */
    }

    .t-item.bottom .t-box {
        margin-top: 20px;
    }

    .t-box {
        font-size: 0.8rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
}

/* --- Contact Section --- */
.contact-section {
    background-color: var(--bg-dark);
    padding: 60px 0 20px 0;
    color: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    justify-items: center;
    /* Center content horizontally */
    text-align: center;
    /* Center text within items */
}



.contact-form-wrapper {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    color: var(--text-color);
    max-width: 400px;
    justify-self: center;
    /* Centra el form si hay espacio */
    width: 100%;
}



.contact-form label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.contact-form textarea {
    height: 100px;
    resize: vertical;
}

.copyright {
    text-align: center;
    margin-top: 60px;
    font-size: 0.8rem;
    color: #aaa;
    border-top: 1px solid #444;
    padding-top: 20px;
}

/* --- Interactive Page --- */
.interactive-container {
    padding: 60px 20px;
}

.interactive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .interactive-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.interactive-card {
    background-color: #eee;
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    /* Changed from center to left */
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.interactive-card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
    object-fit: cover;
    height: 200px;
    background-color: #ddd;
    /* Fallback placeholder color */
}

.interactive-card h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: var(--text-color);
    margin-bottom: 0;
    /* Remove bottom margin as flex handles spacing */
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1px;
    /* Spacing between header and text */
}

.card-logos {
    display: flex;
    gap: 10px;
    /* Space between logos */
}

.card-logos img {
    width: 35px;
    height: 35px;
    border-radius: 0;
    /* Logos might not need border radius */
    margin-bottom: 0;
    /* Reset img margin */
    object-fit: contain;
    background-color: transparent;
    /* Reset placeholder bg */
}

.interactive-card p {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

/* Reuse hover effect from work-card if desired, or keep simple */
.interactive-card:hover {
    background-color: #2D3E50;
    transform: translateY(-5px);
}

.interactive-card:hover h4,
.interactive-card:hover p {
    color: white;
}

/* --- Graphic Page --- */
.graphic-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column */
    gap: 60px;
    /* More spacing */
    margin-top: 40px;
    /* Removed max-width to allow full width like interactive page */
    margin-left: auto;
    margin-right: auto;
}

.graphic-card {
    background-color: #eee;
    border-radius: 15px;
    padding: 30px;
    /* More padding */
    text-align: left;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.graphic-card>img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 25px;
    object-fit: cover;
    height: auto;
    /* Allow image to be taller/natural aspect ratio */
    min-height: 300px;
    /* Minimum height ensures impact */
    background-color: #ddd;
}

/* Reusing .card-header and .card-logos styles as they are generic enough */

.graphic-card h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    /* Creating slightly larger title */
    margin-bottom: 0;
    text-transform: uppercase;
    color: var(--text-color);
}

.graphic-card p {
    margin-top: 15px;
    font-size: 1rem;
    color: #666;
}

.graphic-card:hover {
    background-color: #2D3E50;
    transform: translateY(-5px);
}

.graphic-card:hover h4,
.graphic-card:hover p {
    color: white;
}

.graphic-card .btn {
    margin-top: 20px;
    display: inline-block;
    /* Ensure margin applies correctly if not already block/inline-block */
}

/* --- Simple Footer (Subpages) --- */
.simple-footer {
    background-color: var(--bg-dark);
    padding: 20px 0;
    color: white;
    text-align: center;
}

.simple-footer .copyright {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.active-menu {
    text-decoration: underline;
}