* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 40px 0;
    background: #d4841c;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 1s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 2;
    position: relative;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: white;
    color: #d4841c;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

h1 {
    font-size: 3.5em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.4em;
    color: #f0f8ff;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.bg-software {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../recursos/staff.jpg") no-repeat center center/cover;
    filter: blur(3px) opacity(75%);
    z-index: -1;
}

.container {
    margin: 0 auto;
    padding: 20px;
    max-width: 1200px;
}

.org-intro {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out 0.3s both;
    text-align: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.org-intro h2 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.org-intro p {
    color: #666;
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto;
}

/* Organigrama - ESTRUCTURA CORREGIDA */
.organigrama-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
    position: relative;
}

/* Nivel 1: Director General */
.nivel-1 {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

/* Línea vertical desde Director General */
.linea-conexion-1 {
    width: 4px;
    height: 60px;
    background: linear-gradient(180deg, #d4841c 0%, #9F805B 100%);
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: growLine 1s ease-out 0.5s both;
}

/* Nivel 2: Director Comercial */
.nivel-2 {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

/* Línea vertical desde Director Comercial hacia abajo */
.linea-conexion-2 {
    width: 4px;
    height: 60px;
    background: linear-gradient(180deg, #d4841c 0%, #9F805B 100%);
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: growLine 1s ease-out 0.7s both;
}

/* Línea horizontal que conecta a los 3 entrenadores */
.conector-horizontal {
    width: 66.66%; /* 2/3 del ancho para cubrir 3 cards */
    max-width: 700px;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, #d4841c 10%, #9F805B 90%, transparent 100%);
    margin: 0 auto;
    position: relative;
    animation: expandLine 1s ease-out 0.9s both;
}

/* Contenedor de líneas verticales hacia entrenadores */
.lineas-a-entrenadores {
    display: flex;
    justify-content: space-between;
    width: 66.66%;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    height: 60px;
}

/* Líneas individuales a cada entrenador */
.linea-a-entrenador {
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #d4841c 0%, #9F805B 100%);
    position: absolute;
    animation: growLine 1s ease-out 1.1s both;
}

/* Posicionamiento específico de cada línea para que encaje con las cards */
.linea-a-entrenador:nth-child(1) {
    left: 0;
    transform: translateX(-50%);
}

.linea-a-entrenador:nth-child(2) {
    left: 50%;
    transform: translateX(-50%);
}

.linea-a-entrenador:nth-child(3) {
    right: 0;
    transform: translateX(50%);
}

@keyframes growLine {
    from { height: 0; opacity: 0; }
    to { height: 60px; opacity: 1; }
}

@keyframes expandLine {
    from { width: 0; opacity: 0; }
    to { width: 66.66%; opacity: 1; }
}

/* Nivel 3: Entrenadores */
.nivel-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    width: 100%;
    margin-top: 0;
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

/* Profile Cards */
.profile-card {
    background: linear-gradient(135deg, #d4841c 0%, #9F805B 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out calc(0.5s + var(--delay, 0s)) both;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    text-align: center;
}

.profile-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.profile-card:hover::before {
    animation: shine 0.6s ease-out;
}

@keyframes shine {
    0% { transform: rotate(45deg) translateX(-100%); opacity: 1; }
    100% { transform: rotate(45deg) translateX(100%); opacity: 0; }
}

.card-header {
    position: relative;
    margin-bottom: 20px;
}

.photo-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.profile-card:hover .photo-container {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(212, 132, 28, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.photo-overlay i {
    font-size: 2.5em;
    color: white;
}

.profile-card:hover .photo-overlay {
    opacity: 1;
}

.badge-cargo {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-block;
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
}

.card-body h3 {
    font-size: 1.5em;
    margin-bottom: 8px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.cargo-descripcion {
    font-size: 1em;
    opacity: 0.95;
    margin-bottom: 20px;
    font-weight: 300;
    line-height: 1.4;
}

.cv-button {
    background: white;
    color: #d4841c;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 2px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

.cv-button:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.card-number {
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 4em;
    font-weight: 800;
    color: rgba(255,255,255,0.15);
    line-height: 1;
    transition: all 0.3s ease;
}

.profile-card:hover .card-number {
    color: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

/* Director General destacado */
.director-general {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    transform: scale(1.05);
}

.director-general .cv-button {
    color: #2c3e50;
}

.director-general .cv-button:hover {
    background: transparent;
    color: white;
    border-color: white;
}

.director-general .photo-overlay {
    background: rgba(44, 62, 80, 0.8);
}

/* Director Comercial */
.director-comercial {
    background: linear-gradient(135deg, #d4841c 0%, #b87416 100%);
}

/* Valores Section */
.valores-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeInUp 1s ease-out 1s both;
}

.valores-section h2 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 30px;
    text-align: center;
}

.valores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.valor-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #2c3e50;
    border-radius: 15px;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.valor-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #d4841c 0%, #9F805B 100%);
    transition: width 0.4s ease;
    z-index: 0;
}

.valor-item:hover::before {
    width: 100%;
}

.valor-item i,
.valor-item span {
    position: relative;
    z-index: 1;
}

.valor-item i {
    font-size: 1.5em;
    margin-right: 15px;
    color: #d4841c;
    transition: all 0.3s ease;
}

.valor-item:hover i {
    color: white;
    transform: scale(1.1);
}

.valor-item span {
    font-weight: 500;
    font-size: 1.1em;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 4rem;
}

.footer h3 {
    color: #d4841c;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.footer .copyright {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

.footer a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #c98126;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 10px;
    }

    .org-intro {
        padding: 30px 20px;
    }

    .org-intro h2 {
        font-size: 1.8em;
    }

    /* Ajuste de líneas para tablet */
    .conector-horizontal,
    .lineas-a-entrenadores {
        width: 90%;
        max-width: 600px;
    }

    @keyframes expandLine {
        from { width: 0; opacity: 0; }
        to { width: 90%; opacity: 1; }
    }

    .nivel-3 {
        margin-top: 20px;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 0 10px;
    }

    .profile-card {
        padding: 20px 15px;
    }

    .director-general {
        transform: scale(1);
    }

    .photo-container {
        width: 100px;
        height: 100px;
    }

    .card-number {
        font-size: 2.5em;
        bottom: 10px;
        right: 15px;
    }

    .linea-conexion-1,
    .linea-conexion-2 {
        height: 40px;
    }

    .lineas-a-entrenadores {
        height: 40px;
    }

    @keyframes growLine {
        from { height: 0; opacity: 0; }
        to { height: 40px; opacity: 1; }
    }
}

@media (max-width: 600px) {
    /* En móvil, apilar entrenadores y ocultar líneas complejas */
    .nivel-3 {
        grid-template-columns: 1fr;
        max-width: 350px;
        gap: 20px;
    }

    /* Ocultar conectores en móvil pequeño */
    .conector-horizontal,
    .lineas-a-entrenadores,
    .linea-conexion-2 {
        display: none;
    }

    /* Mostrar línea simple entre Director Comercial y entrenadores */
    .linea-simple {
        width: 4px;
        height: 40px;
        background: linear-gradient(180deg, #d4841c 0%, #9F805B 100%);
        margin: 10px auto;
        animation: growLine 1s ease-out 0.7s both;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1em;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }

    .card-body h3 {
        font-size: 1.3em;
    }

    .badge-cargo {
        font-size: 0.85em;
        padding: 6px 15px;
    }

    .valores-section {
        padding: 25px 15px;
    }

    .valores-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 320px) {
    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1em;
    }

    .org-intro h2 {
        font-size: 1.5em;
    }

    .profile-card {
        padding: 20px;
    }

    .photo-container {
        width: 100px;
        height: 100px;
    }

    .card-body h3 {
        font-size: 1.2em;
    }

    .cargo-descripcion {
        font-size: 0.9em;
    }

    .cv-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .card-number {
        font-size: 2.5em;
    }
}

/* Responsive extremo: hasta 120px */
@media (max-width: 120px) {
    html {
        font-size: 8px;
    }

    .container {
        padding: 5px;
    }

    header {
        padding: 20px 5px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 1.2rem;
        word-break: break-word;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .cta-button {
        padding: 8px 12px;
        font-size: 0.8em;
        border-radius: 25px;
    }

    .org-intro {
        padding: 15px 8px;
        border-radius: 10px;
    }

    .org-intro h2 {
        font-size: 1.3em;
    }

    .org-intro p {
        font-size: 0.9em;
    }

    /* Ocultar líneas complejas en 120px */
    .conector-horizontal,
    .lineas-a-entrenadores,
    .linea-conexion-1,
    .linea-conexion-2 {
        display: none;
    }

    .nivel-3 {
        gap: 15px;
        padding: 0;
    }

    .nivel-3 {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 0 10px;
    }

    .profile-card {
        padding: 15px;
        border-radius: 15px;
        max-width: 100%;
    }

    .photo-container {
        width: 80px;
        height: 80px;
        border-width: 2px;
    }

    .card-body h3 {
        font-size: 1.1em;
    }

    .cargo-descripcion {
        font-size: 0.85em;
        margin-bottom: 15px;
    }

    .cv-button {
        padding: 8px 15px;
        font-size: 0.8em;
    }

    .badge-cargo {
        font-size: 0.7em;
        padding: 4px 10px;
    }

    .card-number {
        font-size: 2em;
        bottom: 10px;
        right: 15px;
    }

    .valores-section {
        padding: 15px 8px;
        border-radius: 10px;
    }

    .valores-section h2 {
        font-size: 1.3em;
    }

    .valor-item {
        padding: 12px;
        font-size: 0.9em;
    }

    .valor-item i {
        font-size: 1.2em;
        margin-right: 8px;
    }

    .footer {
        padding: 2rem 0.5rem;
    }

    .footer h3 {
        font-size: 1.2rem;
    }

    .footer p {
        font-size: 0.9rem;
    }
}