/* ============================================
   VARIABLES Y RESET
   ============================================ */
:root {
    --verde-pastel: #A8E6CF;
    --azul-pastel: #A8D8EA;
    --rosa-pastel: #FFB6C1;
    --amarillo-pastel: #FFF4A3;
    --morado-pastel: #D4A5D4;
    --blanco: #FFFFFF;
    --negro: #1a1a1a;
    --gris-claro: #f5f5f5;
    --gris-medio: #999999;
    --gris-oscuro: #333333;
    --font-principal: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-principal);
    color: var(--negro);
    background-color: var(--blanco);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--blanco);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    max-width: 100%;
    margin: 0;
    padding: 0 2rem 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.hamburger-btn span {
    width: 25px;
    height: 3px;
    background: var(--negro);
    transition: var(--transition-normal);
}

.hamburger-btn:hover span {
    background: var(--verde-pastel);
}

.logo {
    margin-right: auto;
}

.logo img {
    height: 50px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--negro);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-nav a:hover {
    color: var(--verde-pastel);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--gris-oscuro);
    padding: 1rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-normal);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    color: var(--blanco);
    display: block;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dropdown-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.language-selector a {
    color: var(--negro);
    font-weight: 500;
}

.language-selector a.active {
    color: var(--verde-pastel);
}

.mygreen-dropdown button {
    background: none;
    border: none;
    color: var(--negro);
    cursor: pointer;
    font-weight: 500;
}

/* ============================================
   MENU FULLSCREEN
   ============================================ */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(26, 26, 26, 0.98);
    z-index: 2000;
    transition: var(--transition-slow);
    overflow-y: auto;
}

.fullscreen-menu.active {
    left: 0;
}

.fullscreen-menu-header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: var(--blanco);
    font-size: 2rem;
    cursor: pointer;
}

.fullscreen-menu-content {
    padding: 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    color: var(--blanco);
}

.menu-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.menu-section a {
    color: var(--gris-medio);
    transition: var(--transition-fast);
}

.menu-section a:hover {
    color: var(--verde-pastel);
}

.simple-links li {
    margin-bottom: 1rem;
}

.simple-links a {
    color: var(--blanco);
    font-size: 1.2rem;
}

/* ============================================
   HERO BANNER
   ============================================ */
.inv-hero {
    margin-top: 80px;
    height: 350px;
    background: linear-gradient(135deg, rgba(168, 230, 207, 0.85), rgba(168, 216, 234, 0.85)),
                url('21.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.inv-hero-overlay h1 {
    font-size: 3.5rem;
    color: var(--negro);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.inv-hero-overlay p {
    font-size: 1.2rem;
    color: var(--gris-oscuro);
    max-width: 600px;
}

/* ============================================
   PROYECTOS DE INVESTIGACION
   ============================================ */
.inv-section {
    padding: 4rem 0;
}

.inv-proyecto {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    scroll-margin-top: 100px;
}

.inv-proyecto:last-child {
    border-bottom: none;
}

.inv-proyecto-reverse {
    direction: rtl;
}

.inv-proyecto-reverse > * {
    direction: ltr;
}

.inv-proyecto-img img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.inv-proyecto-body h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--negro);
    line-height: 1.3;
}

.inv-proyecto-body p {
    font-size: 1.05rem;
    color: var(--gris-oscuro);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.inv-proyecto-body p:first-of-type {
    font-weight: 500;
    color: var(--negro);
}

/* Animaciones */
.inv-anim {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.inv-anim-left {
    transform: translateX(-60px);
}

.inv-anim-right {
    transform: translateX(60px);
}

.inv-anim.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--negro);
    color: var(--blanco);
    padding: 4rem 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--gris-medio);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-column a i {
    font-size: 0.9rem;
    color: var(--verde-pastel);
}

.footer-column a:hover {
    color: var(--verde-pastel);
}

.footer-logo img {
    height: 60px;
    margin-bottom: 1rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gris-oscuro);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.footer-social a:hover {
    background: var(--verde-pastel);
    color: var(--negro);
}

.footer-map-link {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.address {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--gris-medio);
    font-size: 0.9rem;
    line-height: 1.6;
}

.address i {
    color: var(--verde-pastel);
    margin-top: 0.2rem;
}

.footer-lang a.active {
    color: var(--verde-pastel);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gris-medio);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-legal {
    margin-top: 1rem;
}

.footer-legal a {
    color: var(--gris-medio);
    margin: 0 0.5rem;
    display: inline;
}

.footer-legal a:hover {
    color: var(--verde-pastel);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .inv-proyecto,
    .inv-proyecto-reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .inv-proyecto-img img {
        height: 300px;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .inv-hero h1 {
        font-size: 2.5rem;
    }

    .inv-hero {
        height: 250px;
    }

    .inv-proyecto-body h2 {
        font-size: 1.5rem;
    }

    .inv-proyecto-img img {
        height: 250px;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }
}
