:root {
    --primary-blue: #0a2472;
    --blue-2: #061a55;
    --secondary-red: #d90429;
    --red-2: #b30321;
    --accent-gray: #2d3436;
    --muted: #667085;
    --white: #ffffff;
    --light-bg: #f4f7fb;
    --line: #dbe3f0;
    --shadow: 0 18px 45px rgba(6, 26, 85, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--light-bg);
    color: var(--accent-gray);
    line-height: 1.6;
}

nav {
    background: rgba(10, 36, 114, 0.97);
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--secondary-red);
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.25s ease;
}

nav ul li a:hover {
    color: var(--secondary-red);
}

header {
    color: var(--white);
    padding: 110px 5% 95px;
    text-align: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(217, 4, 41, 0.38), transparent 30%),
        radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.16), transparent 24%),
        linear-gradient(135deg, rgba(6, 26, 85, 0.98), rgba(10, 36, 114, 0.88));
    position: relative;
    overflow: hidden;
}

header::after {
    content: "";
    position: absolute;
    inset: auto -10% -120px -10%;
    height: 230px;
    background: var(--light-bg);
    transform: rotate(-3deg);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
}

/* Imagen de Cabecera Optimizada y Redimensionada */
.logojj {
    max-width: 100%;
    height: auto;
    width: 180px; 
    background-color: white;
    border: 1px solid lightgray;
    border-radius: 20px;
    padding: 8px;
    transition: width 0.3s ease;
}

/* NUEVO: Control adaptativo para la imagen del nombre */
.brand-name {
    max-width: 90%;          /* Evita que toque los bordes en pantallas medianas */
    height: auto;            /* Mantiene la proporción perfecta sin deformar */
    max-height: 105px;       /* Su tamaño original y máximo en PC */
    margin: 15px auto;
    display: inline-block;
    transition: max-height 0.3s ease;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

header h1 {
    font-size: clamp(2.5rem, 8vw, 5.7rem);
    line-height: 0.95;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: -0.04em;
}

header p {
    font-size: 1.16rem;
    max-width: 780px;
    margin: 0 auto;
    opacity: 0.92;
}

.hero-actions {
    margin-top: 34px;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-action,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    text-decoration: none;
    font-weight: 800;
    border-radius: 12px;
    transition: 0.25s ease;
    text-transform: uppercase;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
}

.btn-action {
    background: var(--secondary-red);
    color: var(--white);
    box-shadow: 0 12px 28px rgba(217, 4, 41, 0.28);
}

.btn-action:hover {
    background: var(--red-2);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.12);
    color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.26);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

section {
    padding: 78px 8%;
}

.section-title {
    max-width: 1050px;
    margin: 0 auto 34px;
}

h2 {
    color: var(--primary-blue);
    margin-bottom: 12px;
    text-transform: uppercase;
    border-left: 5px solid var(--secondary-red);
    padding-left: 15px;
    line-height: 1.12;
}

.section-title p {
    color: var(--muted);
    max-width: 780px;
}

.portfolio-shell {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    position: relative;
}

/* Botón Hamburguesa del Portafolio */
.portfolio-hamburger {
    display: none;
    width: 100%;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.tabs {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 12px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 94px;
}

.tab-btn {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--accent-gray);
    padding: 15px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.tab-btn i {
    width: 22px;
    color: var(--secondary-red);
}

.tab-btn:hover {
    background: #f1f5fb;
}

.tab-btn.active {
    background: var(--primary-blue);
    color: var(--white);
}

.tab-btn.active i {
    color: var(--white);
}

.content-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(24px, 4vw, 42px);
    box-shadow: var(--shadow);
    min-height: 560px;
}

.tab-panel {
    display: none;
    animation: fadeUp 0.25s ease both;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-kicker {
    color: var(--secondary-red);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    margin-bottom: 8px;
}

.tab-panel h3 {
    color: var(--primary-blue);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.04;
    margin-bottom: 18px;
}

.lead {
    font-size: 1.1rem;
    color: #344054;
    margin-bottom: 22px;
}

.note-box {
    border-left: 4px solid var(--secondary-red);
    background: #fff4f6;
    padding: 18px 20px;
    border-radius: 14px;
    margin: 22px 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 22px;
}

/* Scroll personalizado para la cuadrícula de Integrantes */
.scrollable-grid {
    max-height: 480px; 
    overflow-y: auto;
    padding-right: 12px; 
}

.scrollable-grid::-webkit-scrollbar {
    width: 7px;
}

.scrollable-grid::-webkit-scrollbar-track {
    background: var(--light-bg); 
    border-radius: 4px;
}

.scrollable-grid::-webkit-scrollbar-thumb {
    background: var(--muted); 
    border-radius: 4px;
}

.scrollable-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue); 
}

.card {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--primary-blue);
}

.card h4 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.02rem;
}

.member-card h4 {
    color: var(--accent-gray);
    margin-bottom: 5px;
}

.role {
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 0.92rem;
}

.season {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.badge {
    display: inline-flex;
    margin-top: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--secondary-red);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.pill {
    background: #eaf0ff;
    color: var(--primary-blue);
    border: 1px solid #cad7ff;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 22px;
}

.list {
    margin: 14px 0 0 18px;
}

.list li {
    margin-bottom: 8px;
}

.timeline {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.timeline-item {
    border-left: 4px solid var(--secondary-red);
    background: var(--light-bg);
    padding: 16px 18px;
    border-radius: 14px;
}

.timeline-item strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 4px;
}

.contact-section {
    text-align: center;
    background: var(--white);
}

.contact-card {
    max-width: 820px;
    margin: 0 auto;
    border-radius: 24px;
    padding: 42px;
    background: linear-gradient(135deg, #f8fbff, #ffffff);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.contact-card h2 {
    border: none;
    padding: 0;
    display: block;
    margin-bottom: 12px;
}

.direct-contact {
    margin-top: 28px;
    font-weight: 700;
    color: var(--accent-gray);
}

.direct-contact p {
    margin: 10px 0;
}

.direct-contact i {
    color: var(--secondary-red);
    margin-right: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin-top: 32px;
}

.social-links a {
    color: var(--primary-blue);
    font-size: 2.45rem;
    transition: 0.25s ease;
}

.social-links a:hover {
    color: var(--secondary-red);
    transform: translateY(-4px);
}

footer {
    text-align: center;
    padding: 30px;
    font-size: 0.82rem;
    background: #111;
    color: #b7b7b7;
}

/* Media Query Adaptativo */
@media (max-width: 920px) {
    nav {
        flex-direction: column;
        gap: 12px;
    }

    nav ul {
        gap: 14px;
    }

    /* Redimensionamiento extra del logo en pantallas móviles */
    .logojj {
        width: 140px;
    }

    .portfolio-shell {
        grid-template-columns: 1fr;
    }

    /* Mostrar botón hamburguesa del portafolio */
    .portfolio-hamburger {
        display: inline-flex;
    }

    /* Ocultar pestañas por defecto en móvil para que actúen como un menú desplegable */
    .tabs-menu {
        display: none;
        position: absolute;
        top: 55px;
        left: 0;
        width: 100%;
        max-width: 100%;
        z-index: 10;
        box-shadow: 0 12px 30px rgba(6, 26, 85, 0.2);
        border-radius: 14px;
        animation: fadeUp 0.2s ease both;
    }

    /* Mostrar al presionar el botón hamburguesa */
    .tabs-menu.open {
        display: block;
    }

    .tab-btn {
        border-radius: 0;
        border-bottom: 1px solid var(--line);
        background: var(--white);
    }
    
    .tab-btn:first-child { border-radius: 14px 14px 0 0; }
    .tab-btn:last-child { border-radius: 0 0 14px 14px; border-bottom: none; }
}

@media (max-width: 640px) {
    section {
        padding: 58px 5%;
    }

    header {
        padding: 82px 5% 72px;
    }

    .logo-img {
        height: 40px;
    }

    .split {
        grid-template-columns: 1fr;
    }

    .content-card {
        min-height: auto;
    }

    .contact-card {
        padding: 30px 20px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-action,
    .btn-secondary {
        width: 100%;
    }
}