/* ============================================================
   profile.css — Mi Mejor Jugada
   CSS completo y autónomo para profile-page.html.
   No requiere style.css — incluye todo lo necesario:
   reset, variables, navbar, footer, modales, perfil, buscar video.
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
    --naranja:       #E85A2D;
    --naranja-dk:    #c44a20;
    --naranja-lt:    rgba(232,90,45,.10);
    --oscuro:        #14161e;
    --oscuro-2:      #242625;
    --bg-nav:        #242625;
    --gris-txt:      #B1B1B1;
    --gris-borde:    #D3D3D3;
    --gris-10:       #ebebeb;
    --blanco:        #ffffff;
    --negro:         #000000;
    --bg:            #f6f8fc;
    --bg-light:      #f9f9f9;
    --radio:         8px;
    --radio-lg:      12px;
    --sp-10:  .625rem;
    --sp-20:  1.25rem;
    --sp-40:  2.5rem;
    --sp-80:  5rem;
}

/* ── Reset base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; padding: 0; margin: 0; }
html { font-family: 'Montserrat', sans-serif; font-style: normal; }
body { background: var(--bg); color: var(--oscuro-2); line-height: 1.5; }
ul li { list-style: none; }
h2 { font-size: 1.5rem; margin-bottom: var(--sp-20); }
h3 { margin-bottom: var(--sp-10); }
a { color: var(--naranja); }
a:hover { color: var(--naranja-dk); }
p { line-height: 1.25rem; }

/* ── Container ──────────────────────────────────────────────── */
.container {
    margin: 0 auto;
    width: 100%;
    max-width: 1440px;
    padding: var(--sp-20);
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════════ */
.bg_navbar {
    background: var(--bg-nav);
    position: sticky;
    top: 0;
    z-index: 10000;
    padding: 0;
}
.bg_navbar .container {
    padding: var(--sp-10) var(--sp-20);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img { width: 160px; height: auto; display: block; }

.menu-icon {
    cursor: pointer;
    font-size: 30px;
    display: block;
    color: var(--blanco);
    transition: color .2s;
    background: none;
    border: none;
}
.menu-icon:hover { color: var(--naranja); }
.icon-close { position: relative; z-index: 10; transition: color .2s; }
.icon-close:hover { color: var(--naranja); }

.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 5;
}

.navbar {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; max-width: 260px;
    height: 100vh;
    background: var(--oscuro);
    transition: transform .7s ease;
    transform: translateX(100%);
    z-index: 10;
}
.navbar.active {
    display: block;
    transform: translateX(0);
    padding: var(--sp-20);
}
.navbar div { margin-bottom: var(--sp-40); }
.navbar div img { max-width: 200px; height: auto; display: block; }
.navbar ul li:nth-child(3) {
    border-top: 1px solid gray;
    margin: var(--sp-20) 0 var(--sp-10);
    padding-top: var(--sp-10);
}
.navbar a {
    display: block; padding: 10px;
    color: var(--blanco); text-decoration: none;
}
.navbar a:hover { color: var(--naranja); }
.navbar .sign-in {
    display: block; padding: 10px;
    color: var(--blanco); background: none;
    outline: none; border: 0;
    font-size: 1rem; font-family: 'Montserrat', sans-serif; cursor: pointer;
}
.navbar .register { width: 100%; cursor: pointer; }

@media (min-width: 1200px) {
    .menu-icon { display: none; }
    .navbar {
        display: block; position: static;
        width: auto; max-width: none;
        height: auto; transform: none;
        background: transparent; padding: 0;
    }
    .navbar ul { display: flex; justify-content: flex-end; }
    .navbar div { display: none; }
    .navbar ul li:nth-child(3) { border: 0; margin: 0; padding: 0; }
    .navbar a { color: var(--blanco); font-size: .9rem; }
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.footer { background: var(--negro); }
.footer .container { padding-top: var(--sp-20); padding-bottom: var(--sp-20); }
.footer nav ul { display: flex; flex-direction: column; }
.footer nav ul li { margin-bottom: var(--sp-10); }
.footer nav a {
    text-decoration: none;
    color: var(--gris-txt);
    font-size: .875rem; font-weight: 200;
}
.footer nav a:hover { color: var(--naranja); }

@media (min-width: 576px) {
    .footer nav ul { flex-direction: row; justify-content: center; }
    .footer nav ul li { margin-right: var(--sp-10); margin-bottom: 0; }
}

/* ══════════════════════════════════════════════════════════════
   BOTONES
══════════════════════════════════════════════════════════════ */
.button, button.button, a.button {
    background: var(--naranja);
    color: var(--blanco) !important;
    border-radius: 100px;
    font-size: .9rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-decoration: none;
    padding: .7rem 1.75rem;
    display: inline-block;
    outline: none; border: none; cursor: pointer;
    transition: background .2s, transform .15s;
    box-shadow: 0 4px 14px rgba(232,90,45,.28);
}
.button:hover, button.button:hover, a.button:hover {
    background: var(--naranja-dk);
    transform: translateY(-2px);
}
.btn-outline {
    display: inline-block; padding: .65rem 1.5rem;
    background: transparent; color: rgba(255,255,255,.85);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; font-size: .88rem;
    border-radius: 100px; border: 2px solid rgba(255,255,255,.3);
    text-decoration: none; cursor: pointer;
    transition: border-color .2s, transform .15s;
}
.btn-outline:hover { border-color: rgba(255,255,255,.7); transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════════════
   CAMPOS
══════════════════════════════════════════════════════════════ */
label {
    display: block;
    font-size: .875rem; font-weight: 600;
    color: var(--oscuro-2);
    margin-bottom: var(--sp-10);
}
select, input[type="date"], input[type="text"],
input[type="email"], input[type="tel"], input[type="password"] {
    width: 100%;
    padding: var(--sp-10);
    border: 1px solid var(--gris-borde);
    border-radius: var(--radio);
    font-size: 1rem; font-family: 'Montserrat', sans-serif;
    background: var(--blanco); color: var(--oscuro-2);
    outline: 0; transition: border-color .2s;
}
select:focus, input[type="date"]:focus, input[type="text"]:focus,
input[type="email"]:focus, input[type="tel"]:focus, input[type="password"]:focus {
    border-color: var(--naranja);
}
select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' viewBox='0 0 12 8'%3E%3Cpath stroke='%235a6275' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px; cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════
   MODALES
══════════════════════════════════════════════════════════════ */
.modal {
    display: none; position: fixed; inset: 0;
    z-index: 10500;
    background: rgba(0,0,0,.55);
    align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal[style*="display: block"],
.modal[style*="display:block"] { display: flex !important; }
.modal-content {
    background: var(--blanco); border-radius: var(--radio-lg);
    padding: 2rem 2rem 1.5rem; max-width: 440px; width: 90%;
    box-shadow: 0 16px 48px rgba(0,0,0,.22);
    animation: modalIn .2s ease;
}
@keyframes modalIn {
    from { opacity:0; transform: scale(.95) translateY(8px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}
.modal-content__header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.25rem;
}
.modal-content__header h2 { font-size: 1.1rem; font-weight: 800; color: var(--oscuro); margin: 0; }
.close-button {
    width: 30px; height: 30px; border-radius: 50%;
    border: none; background: var(--bg); color: var(--gris-txt);
    font-size: 1.1rem; cursor: pointer; display: grid; place-items: center;
}
.close-button:hover { background: var(--gris-borde); }
.modal-content form { display: flex; flex-direction: column; gap: 1rem; }
.modal-content__username, .modal-content__password,
.modal-content__name, .modal-content__email, .modal-content__phone {
    display: flex; flex-direction: column; gap: .375rem;
}
.modal-content__password a {
    font-size: .82rem; color: var(--naranja);
    text-decoration: none; margin-top: .25rem; align-self: flex-start;
}
.modal-content__password a:hover { text-decoration: underline; }
.modal-content__button { margin-top: .25rem; }
.modal-content__button .button { width: 100%; text-align: center; padding: .875rem; }

/* ══════════════════════════════════════════════════════════════
   HEADER DEL PERFIL
══════════════════════════════════════════════════════════════ */
.profile-header { margin: 0; }
.profile-header__cover-photo { padding: 0; }
.profile-header__cover-photo img { width: 100%; height: 200px; object-fit: cover; display: block; }
.profile-header__user-info {
    padding: 0 var(--sp-20);
    display: grid; grid-template-columns: 1fr;
    row-gap: var(--sp-20); position: relative;
}
.profile-header__user-info figure { display: flex; justify-content: center; margin: 0; }
.profile-header__user-info figure img {
    width: 100px; height: 100px;
    border-radius: 50%; object-fit: cover;
    border: 4px solid var(--gris-borde);
    position: absolute; top: -50px; z-index: 10;
}
.profile-header__user-info div:nth-child(2) { margin-top: 4rem; text-align: center; }
.profile-header__user-info h1 { font-size: 1.5rem; font-weight: 800; color: var(--oscuro); margin-bottom: .25rem; }
#usuarioHandle { color: var(--gris-txt); font-size: .88rem; display: block; }
.profile-header__user-info div:nth-child(3) {
    display: flex; justify-content: center; padding-bottom: var(--sp-20);
}

/* ══════════════════════════════════════════════════════════════
   DESCRIPCIÓN
══════════════════════════════════════════════════════════════ */
.description-wrapper {
    max-width: 1440px; margin: var(--sp-20) auto 0;
    padding: var(--sp-20) var(--sp-20) 0;
}
.description__header {
    background: var(--gris-10); border: 1px solid var(--gris-borde);
    border-radius: var(--radio) var(--radio) 0 0;
    padding: var(--sp-10) var(--sp-20);
}
.description__header h2, .description__header h3 {
    font-weight: 300; font-size: 1rem; margin: 0; color: var(--oscuro-2);
}
.description__body {
    background: var(--bg-light); padding: var(--sp-20);
    border: 1px solid var(--gris-borde); border-top: 0;
    border-radius: 0 0 var(--radio) var(--radio);
}
.description__body p { color: var(--oscuro-2); font-size: .875rem; }

/* ══════════════════════════════════════════════════════════════
   INFO DEL CENTRO
══════════════════════════════════════════════════════════════ */
.profile-info-wrapper {
    width: 100%; max-width: 1440px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr;
    row-gap: var(--sp-20); padding: var(--sp-40) var(--sp-20);
}
.profile-info h2 { font-size: 1rem; font-weight: 700; margin-bottom: .875rem; color: var(--oscuro); }
.profile-info span, .profile-info p { font-size: .9rem; color: var(--gris-txt); line-height: 1.5; }
.profile-info__canchas, .profile-info__rrss { display: flex; flex-direction: column; gap: .625rem; }
.profile-info__canchas > div, .profile-info__rrss > div {
    display: flex; align-items: center; gap: .625rem;
    font-size: .9rem; color: var(--oscuro-2);
}
.profile-info__rrss > div span[class*="icon"],
.profile-info__canchas > div span[class*="icon"] {
    font-size: 1rem; color: var(--naranja); flex-shrink: 0; width: 1.25rem; text-align: center;
}
.profile-info__rrss a { color: var(--naranja); text-decoration: none; font-weight: 600; word-break: break-all; }
.profile-info__rrss a:hover { text-decoration: underline; }

/* ── Mapa ─── */
.profile-map { width: 100%; min-height: 240px; }
.profile-map iframe { width: 100%; height: 100%; min-height: 240px; border-radius: var(--radio); border: 1px solid var(--gris-borde); display: block; }

/* ══════════════════════════════════════════════════════════════
   GALERÍA
══════════════════════════════════════════════════════════════ */
.profile-gallery-wrapper { max-width: 1440px; margin: 0 auto; padding: 0 var(--sp-20) var(--sp-20); }
.profile-gallery { display: grid; grid-template-columns: 1fr; gap: var(--sp-20); }
.profile-gallery__photos { overflow: hidden; border-radius: var(--radio); }
.profile-gallery__photos img {
    width: 100%; height: 180px; object-fit: cover;
    border-radius: var(--radio); display: block; transition: transform .22s;
}
.profile-gallery__photos img:hover { transform: scale(1.03); }

/* ── Ver más ─── */
.ver-mas-wrapper { text-align: center; padding: var(--sp-10) var(--sp-20) var(--sp-20); border-top: 1px solid var(--gris-borde); }
#verMasContenido { display: none; }

/* ══════════════════════════════════════════════════════════════
   BUSCAR VIDEO
══════════════════════════════════════════════════════════════ */
.buscar-video-wrapper {
    margin: var(--sp-20) auto;
    width: 100%; max-width: 1440px;
    padding: var(--sp-20);
    display: grid; grid-template-columns: 1fr; row-gap: var(--sp-20);
    background: var(--blanco); border: 1px solid var(--gris-borde);
    border-radius: var(--radio-lg); box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.buscar-video__form { width: 100%; }
.buscar-video__form h2 { font-size: 1.1rem; font-weight: 800; color: var(--oscuro); margin-bottom: .25rem; }
.buscar-video__subtitle { font-size: .85rem; color: var(--gris-txt); margin-bottom: var(--sp-20); }

/* Móvil: campos en columna */
.buscar-video__form form { display: flex; flex-direction: column; gap: var(--sp-20); }
.buscar-video__form form .field { display: flex; flex-direction: column; }

/* ≥768px: campos en fila */
@media (min-width: 768px) {
    .buscar-video__form form { flex-direction: row; align-items: flex-end; flex-wrap: nowrap; gap: 1rem; }
    .buscar-video__form form .field { flex: 1; min-width: 0; }
    .buscar-video__form form .btn-buscar { flex-shrink: 0; white-space: nowrap; }
}

/* Sección videos — fuera del card */
.buscar-video__videos-wrap {
    display: none; margin: 0 auto var(--sp-20);
    max-width: 1440px; width: 100%; padding: 0 var(--sp-20);
}
.buscar-video__videos-wrap.visible { display: block; }
.buscar-video__videos-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .875rem; }
.buscar-video__videos-header span {
    font-size: .78rem; font-weight: 700; color: var(--gris-txt);
    letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.buscar-video__videos-header::after { content: ''; flex: 1; height: 1px; background: var(--gris-borde); }
.buscar-video__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.buscar-video__cam { min-width: 0; }
.cam-label {
    font-size: .72rem; font-weight: 700; color: var(--gris-txt);
    letter-spacing: .07em; text-transform: uppercase; margin-bottom: .5rem;
    display: flex; align-items: center; gap: .375rem;
}
.cam-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--naranja); display: inline-block; flex-shrink: 0; }

/* Anular max-width:620px!important que inyecta cargarVideos.js.
   Se usa !important porque ese CSS llega vía JS después del load. */
#videoContainer1,
#videoContainer2 {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* .video-container es un wrapper neutro.
   cargarVideos.js construye internamente su propio .cv-wrapper > .cv-video-box
   con aspect-ratio:16/9 y maneja todo el sizing. No interferimos. */
.video-container {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

/* ══════════════════════════════════════════════════════════════
   CTA BANNER
══════════════════════════════════════════════════════════════ */
.mmj-cta-banner {
    background: var(--oscuro); border-radius: var(--radio-lg);
    padding: 3rem 2.5rem; text-align: center; position: relative; overflow: hidden;
}
.mmj-cta-banner::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(232,90,45,.12) 0%, transparent 70%);
    pointer-events: none;
}
.mmj-cta-banner h2 { font-size: 1.5rem; font-weight: 800; color: var(--blanco); margin-bottom: .625rem; position: relative; }
.mmj-cta-banner p   { color: rgba(255,255,255,.6); font-size: .95rem; margin-bottom: 1.75rem; position: relative; }
.mmj-cta-banner__btns { display: flex; justify-content: center; flex-wrap: wrap; gap: .875rem; position: relative; }

/* ── Animación REC ─── */
.buttonrec { width: 25px; height: 25px; font-size: 0; background: darkred; border: 0; border-radius: 35px; margin: 10px; outline: none; }
.Rec { background: red; animation: pulse 1.5s linear infinite; }
@keyframes pulse {
    0%  { box-shadow: 0 0 5px 0px rgba(173,0,0,.3); }
    65% { box-shadow: 0 0 5px 13px rgba(173,0,0,.3); }
    90% { box-shadow: 0 0 5px 13px rgba(173,0,0,0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (min-width: 576px) {
    .profile-gallery { grid-template-columns: 1fr 1fr; gap: var(--sp-20); }
}
@media (min-width: 768px) {
    .profile-header { max-width: 1440px; margin: 0 auto; padding: var(--sp-20) var(--sp-20) 0; }
    .profile-header__cover-photo img { height: 360px; border-radius: var(--radio); border: 2px solid var(--gris-borde); }
    .profile-header__user-info figure img { width: 120px; height: 120px; top: -60px; }
    .profile-header__user-info div:nth-child(2) { margin-top: 5rem; }
    .profile-info-wrapper { grid-template-columns: 1fr 1fr; }
    .profile-gallery { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
    .profile-header__cover-photo img { height: 420px; }
    .profile-info-wrapper { grid-template-columns: 1fr 1fr 1fr; padding: var(--sp-40); }
}
@media (max-width: 767px) {
    .buscar-video__grid { grid-template-columns: 1fr; }
    .buscar-video__videos-wrap { padding: 0 var(--sp-10); }
    .mmj-cta-banner { padding: 2rem 1.25rem; border-radius: var(--radio); }
    .mmj-cta-banner h2 { font-size: 1.25rem; }
}
@media (max-width: 575px) {
    .buscar-video-wrapper { margin: var(--sp-10); width: calc(100% - var(--sp-20)); }
}
