/* --- RESET & VARIABLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #20262e;
    --bg-card: #28303a;
    --accent-orange: #ff9d00;
    --accent-cyan: #3fe2c5;
    --text-light: #f6f8fa;
    --text-muted: #a0aec0;
    --radius: 12px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    padding-bottom: 0px;  /* --- Borde extra al final de la página --- */
}

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

.text-center {
    text-align: center;
}

/* --- NAVBAR Y CABECERA --- */
.navbar {
    background-color: rgba(32, 38, 46, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 120px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Tipografía Fredoka réplica exacta del logotipo */
.brand-name {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.7rem;
    line-height: 0.95;
    color: #fff6e5;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.brand-name strong {
    font-weight: 700;
    font-size: 1.9rem;
    color: #fff6e5;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 600;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--accent-cyan);
}

/* --- BOTONES --- */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-orange), #e67e00);
    color: #12151c !important;
    padding: 12px 22px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.3;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 157, 0, 0.3);
}

.btn-secondary {
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 12px 22px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.3;
}

.btn-secondary:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}

/* --- BOTÓN ZONA CLIENTES --- */
.btn-client-zone {
    color: var(--accent-cyan) !important;
    border: 1px solid rgba(63, 226, 197, 0.4);
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.btn-client-zone:hover {
    background: rgba(63, 226, 197, 0.15);
    border-color: var(--accent-cyan);
}

/* --- HERO --- */
.hero {
    padding: 80px 0 50px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(63, 226, 197, 0.1) 0%, transparent 70%);
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto 30px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- PORTFOLIO GRID --- */
.portfolio-section {
    padding: 50px 0;
}

.portfolio-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--text-light);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: rgba(63, 226, 197, 0.3);
}

.card-thumb {
    position: relative;
    height: 160px;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(32, 38, 46, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent-cyan);
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover .play-overlay {
    opacity: 1;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-video { background: rgba(235, 87, 87, 0.9); color: #fff; }
.badge-audio { background: var(--accent-cyan); color: var(--bg-dark); }

.card-info {
    padding: 15px;
}

.card-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.card-tag {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- SECCIÓN EL ESTUDIO / INSTALACIONES --- */
.studio-section {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.15);
}

.studio-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.studio-card {
    background: var(--bg-card);
    padding: 30px 25px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.studio-card:hover {
    transform: translateY(-5px);
    border-color: rgba(63, 226, 197, 0.2);
}

.studio-icon {
    font-size: 2.2rem;
    color: var(--accent-orange);
    margin-bottom: 15px;
}

.studio-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-light);
}

.studio-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================
   SECCIÓN SOBRE NOSOTROS & CAPACIDADES
========================================== */
.about-section {
    padding: 90px 0;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: var(--bg-card);
    padding: 25px 15px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-orange);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--accent-cyan);
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.skills-list {
    list-style: none;
    margin-top: 20px;
}

.skills-list li {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.skills-list i {
    color: var(--accent-cyan);
    margin-right: 8px;
}

.badge-accent {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(63, 226, 197, 0.1);
    border: 1px solid rgba(63, 226, 197, 0.3);
    color: #3fe2c5;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.capabilities-title {
    margin: 50px 0 30px 0;
}

.capabilities-title h3 {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 8px;
}

.capabilities-title p {
    color: #a0aec0;
    font-size: 1rem;
}

/* Rejilla de tarjetas de capacidades */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.capability-card {
    background: rgba(32, 37, 44, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 30px 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.capability-card:hover {
    transform: translateY(-5px);
    background: rgba(32, 37, 44, 0.9);
    border-color: rgba(63, 226, 197, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 15px rgba(63, 226, 197, 0.1);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(63, 226, 197, 0.12);
    color: #3fe2c5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
    transition: background 0.3s ease, color 0.3s ease;
}

.capability-card:hover .card-icon {
    background: #3fe2c5;
    color: #121824;
}

.capability-card h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.capability-card p {
    color: #a0aec0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* --- CONTACTO --- */
.contact-section {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.contact-email-link {
    color: var(--accent-cyan);
    text-decoration: underline;
}

.contact-form {
    max-width: 500px;
    margin: 30px auto 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-card);
    color: #fff;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: 1px solid var(--accent-cyan);
}

/* --- AVISOS DEL FORMULARIO DE CONTACTO --- */
.alert {
    max-width: 500px;
    margin: 20px auto 0;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.alert-success {
    background-color: rgba(63, 226, 197, 0.15);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.alert-error {
    background-color: rgba(235, 87, 87, 0.15);
    border: 1px solid #eb5757;
    color: #eb5757;
}

/* --- TARJETA DE ÉXITO TRAS ENVÍO --- */
.success-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: var(--radius);
    max-width: 550px;
    margin: 20px auto 0;
    border: 1px solid rgba(63, 226, 197, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.success-icon {
    font-size: 3rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

.success-card h2 {
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.success-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* --- ESTILOS LOGIN / ZONA CLIENTES --- */
.login-body {
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: var(--bg-card);
    padding: 45px 35px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    text-decoration: none;
}

.login-card h2 {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.login-card .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-card label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.login-card label i {
    color: var(--accent-cyan);
    margin-right: 5px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(63, 226, 197, 0.2);
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

.back-link {
    display: inline-block;
    margin-top: 25px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-cyan);
}

/* --- ESTILOS CABECERA PAGINAS SECUNDARIAS --- */
.page-header {
    padding: 140px 0 40px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, var(--bg-dark) 100%);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* --- FOOTER --- */
footer {
    background-color: #181d26;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 45px 0 15px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    height: 150px;
    width: auto;
    margin-bottom: 10px;
}

.footer-title {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #fff6e5;
    letter-spacing: 1px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

.copyright {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* --- REPRODUCTOR FLOTANTE --- */
.audio-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #181d26;
    border-top: 2px solid var(--accent-cyan);
    padding: 12px 20px;
    z-index: 200;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.7);
    transition: transform 0.3s ease;
}

.audio-player-bar.hidden {
    transform: translateY(100%);
}

.player-container {
    max-width: 1050px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-btn-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-orange);
    color: #12151c;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    flex-shrink: 0;
}

.player-btn-play:hover {
    transform: scale(1.08);
    background: #ffae1a;
}

.player-center {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.player-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

#player-track-title {
    color: var(--accent-cyan);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#player-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: monospace;
}

#waveform {
    width: 100%;
    height: 35px;
    cursor: pointer;
}

.btn-close-player {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.btn-close-player:hover {
    color: #fff;
}

/* --- MODAL VÍDEO --- */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.modal.hidden { display: none; }

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: -40px; right: 0;
    background: none; border: none;
    color: #fff; font-size: 2.5rem;
    cursor: pointer;
}

.iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(32, 38, 46, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        display: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    nav.nav-active {
        display: flex;
    }

    nav a {
        margin-left: 0;
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .logo-img {
        height: 72px;
    }

    .brand-name {
        font-size: 1.4rem;
    }

    .brand-name strong {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .hero-btns a,
    .btn-primary,
    .btn-secondary {
        width: 100%;
        font-size: 0.95rem;
        padding: 12px 16px;
    }

    .footer-logo {
        height: 130px;
    }

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

/* Margen superior para los desplazamientos con anclas (#) */
section[id],
div[id] {
    scroll-margin-top: 90px;
}

/* Desplazamiento suave al hacer clic en los enlaces */
html {
    scroll-behavior: smooth;
}