:root {
    --bg-color: #0a0f1a;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --accent-1: #00e5ff; /* Cyan from Image 1 */
    --accent-2: #1d4ed8; /* Deep Tech Blue */
    --accent-3: #f97316; /* Fiery Orange from Image 2 */
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

/* Background Animated Shapes & Math Symbols */
.math-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.math-symbol {
    position: absolute;
    color: rgba(255, 255, 255, 0.03);
    font-size: 4rem;
    font-weight: 700;
    font-family: 'Times New Roman', Times, serif;
    pointer-events: none;
    animation: float-symbol 15s infinite alternate ease-in-out;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    width: 50vw;
    height: 50vw;
    background: var(--accent-2);
    top: -20%;
    left: -20%;
}

.shape-2 {
    width: 40vw;
    height: 40vw;
    background: var(--accent-1);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

@keyframes float-symbol {
    0% { transform: translateY(0) rotate(-5deg); }
    100% { transform: translateY(-30px) rotate(5deg); }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 16px;
}

.uni-logo-img {
    height: 40px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.nav-divider {
    width: 2px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-logo span {
    color: var(--accent-1);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent-1);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 0.5rem 0;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out forwards;
}

.dropdown-item {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-1);
    padding-left: 2rem;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 5rem; /* Account for navbar */
    background: linear-gradient(to bottom, rgba(10, 15, 26, 0.88), rgba(10, 15, 26, 1)), url('banner1.png') center top / cover no-repeat;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-1);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero .title {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
}

.hero .highlight {
    background: linear-gradient(135deg, var(--accent-1), #3b82f6, var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent-2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.4);
}

.btn-primary:hover {
    background: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(129, 140, 248, 0.6);
}

/* Sections */
section {
    margin-bottom: 5rem;
    scroll-margin-top: 100px; /* offset for sticky navbar */
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header.center {
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.section-header i {
    font-size: 2.5rem;
    color: var(--accent-1);
}

section h2 {
    font-size: 2.5rem;
    color: #fff;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Content Styling */
p {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: #cbd5e1;
}

.list-content ul {
    list-style: none;
    margin-top: 1rem;
}

.list-content li {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.list-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-3);
    font-weight: bold;
}

.list-content strong {
    color: #fff;
}

/* Grids */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Subproduct Cards */
.project-card {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.project-icon {
    width: 60px;
    height: 60px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-1);
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.detail-block {
    font-size: 0.95rem;
}

.detail-block strong {
    color: var(--accent-1);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-block p {
    font-size: 0.95rem;
    margin-bottom: 0;
    color: #cbd5e1;
}

.example-block {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-3);
}

.example-block strong {
    color: var(--accent-3);
}

/* Multimedia Placeholders */
.multimedia-box {
    background: rgba(56, 189, 248, 0.05);
    border: 1px dashed rgba(56, 189, 248, 0.4);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
}

.multimedia-box i {
    font-size: 2.5rem;
    color: var(--accent-1);
    margin-bottom: 0.5rem;
}

.multimedia-inline {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.multimedia-inline i {
    color: var(--accent-1);
    font-size: 1.5rem;
}

/* Highlight Card */
.highlight-card {
    background: linear-gradient(145deg, rgba(30,41,59,0.8) 0%, rgba(15,23,42,0.95) 100%);
    border-top: 4px solid var(--accent-2);
    text-align: center;
}

.header-icon-large {
    font-size: 4rem;
    color: #eab308; /* Yellow */
    margin-bottom: 1rem;
}

.highlight-card .content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.highlight-card p {
    font-size: 1.2rem;
}

.center-media {
    max-width: 500px;
    margin: 2rem auto 0;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.5);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer-content i {
    font-size: 2rem;
    color: var(--accent-1);
    margin-bottom: 1rem;
}

.footer-content p {
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Section specific backgrounds */
#valoracion {
    background: linear-gradient(to right, rgba(10, 15, 26, 0.9), rgba(10, 15, 26, 0.9)), url('banner2.png') center / cover no-repeat;
    border: 1px solid var(--accent-3);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.2);
}

#valoracion h2 {
    color: var(--accent-3);
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

/* Responsive */
@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .hero .title {
        font-size: 3.5rem;
    }
}
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.95);
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 1px solid var(--glass-border);
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-link {
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
    }
    .menu-toggle {
        display: block;
    }
    .hero .title {
        font-size: 2.8rem;
    }
    
    /* Mobile Logo Fixes */
    .nav-logo {
        gap: 8px;
        font-size: 1.15rem;
    }
    .uni-logo-img {
        height: 26px;
    }
    .nav-divider {
        height: 20px;
    }
    
    /* Mobile Dropdown Fixes */
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        display: none;
        padding-left: 1rem;
        min-width: 100%;
    }
    .dropdown:hover .dropdown-menu,
    .dropdown.active .dropdown-menu {
        display: block;
        animation: none;
    }
    .dropdown-toggle {
        justify-content: center;
    }
}
