/* --- VARIABLES Y ESTILOS GENERALES --- */
:root {
    --bg-dark: #121212;
    --bg-light: #1E1E1E;
    --primary-accent: #00A8E8;
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --font-family: 'Poppins', sans-serif;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--text-primary);
    font-weight: 600;
}

h1 { font-size: 3.5rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.5rem; }

.section {
    padding: 6rem 0;
}

.section-subtitle {
    max-width: 600px;
    margin: -2rem auto 3rem auto;
    text-align: center;
}

/* --- CABECERA Y NAVEGACIÓN --- */
.main-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-20px);
    opacity: 0;
    animation: fadeInDown 0.6s ease-out forwards;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    animation: fadeInDown 0.6s ease-out forwards;
}
.nav-links li:nth-child(1) { animation-delay: 0.1s; }
.nav-links li:nth-child(2) { animation-delay: 0.2s; }
.nav-links li:nth-child(3) { animation-delay: 0.3s; }
.nav-links li:nth-child(4) { animation-delay: 0.4s; }

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

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

.btn-contact {
    background-color: var(--primary-accent);
    color: var(--text-primary) !important;
    border-radius: 50px;
    padding: 10px 20px !important;
    margin-left: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 232, 0.4);
}

/* --- SECCIÓN HERO --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(18, 18, 18, 0.7), rgba(18, 18, 18, 1)), url('../assets/fondo.webp') no-repeat center center/cover;
}

.hero-content {
    max-width: 800px;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-accent);
    color: var(--text-primary);
    padding: 12px 30px;
    margin-top: 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 168, 232, 0.4);
}

/* --- SECCIÓN EQUIPO --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.team-member {
    background: var(--bg-light);
    padding: 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent; /* Añadido para la animación de borde */
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary-accent); /* Borde animado */
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-accent);
    transition: border-color 0.3s ease;
}
.team-member:hover img {
    border-color: var(--text-primary);
}


.team-member h3 { margin-bottom: 0.25rem; }
.team-member span { color: var(--primary-accent); display: block; margin-bottom: 1rem; }
.social-links a {
    margin: 0 8px;
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

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

/* --- SECCIÓN PROYECTOS --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 4rem;
}

.project-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent; /* Añadido para la animación de borde */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow);
    border-color: var(--primary-accent); /* Borde animado */
}

.project-video {
    width: 95%;
    max-width: 1000px;
    height: auto;
    object-fit: cover;
    margin: 0 auto;
    display: block;
}

.project-info {
    padding: 1.5rem;
}
.project-info h3 { margin-bottom: 1rem; }
.btn-secondary {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
}

/* --- SECCIÓN CONTACTO --- */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-family: var(--font-family);
    resize: none;
    transition: border-color 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
}

/* --- FOOTER --- */
.main-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid #333;
}
/* --- ANIMACIONES Y RESPONSIVIDAD --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.is-visible:nth-child(odd) {
    transition-delay: 0.1s;
}
.animate-on-scroll.is-visible:nth-child(even) {
    transition-delay: 0.2s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hamburger-menu{
    display: none;
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .team-grid { grid-template-columns: 1fr; }
    
    .main-nav {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-links {
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        border-top: 1px solid #333;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #333;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 15px;
    }

    .btn-contact {
        margin: 10px 0;
    }

    .hamburger-menu {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 10px;
        color: var(--text-primary);
        font-size: 1.5rem;
        z-index: 101;
        transition: transform 0.3s ease;
    }

    .hamburger-menu:hover {
        color: var(--primary-accent);
    }
    
    .hamburger-menu.active .fas.fa-bars {
        transform: rotate(90deg);
        opacity: 0;
    }
    .hamburger-menu.active .fas.fa-times {
        transform: rotate(90deg);
        opacity: 1;
    }
    
    .hamburger-menu.active .fas.fa-bars {
        display: none;
    }
    .hamburger-menu:not(.active) .fas.fa-times {
        display: none;
    }

}