/*
 Theme Name:   Apartamento25
 Theme URI:    https://generatepress.com
 Description:  Plantilla personalizada para elapartamento.tv basada en GeneratePress
 Author:       Desarrollandounwp
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

a.active {
    font-weight: bold;
}

/*** CABECERA ***/
@media (max-width: 768px) {
    .cabecera-escritorio { display: none !important; }
    .cabecera-movil { display: block; }
}
@media (min-width: 769px) {
    .cabecera-movil,
    .mobile-panel { display: none !important; }
}

/* Header móvil fijo arriba */
.cabecera-movil {
    position: sticky; 
    top: 0;
    z-index: 10010; 
    background: #fff; 
}

/* Logo + menú */
.logo-movil { text-align: center; }
.logo-movil img { max-width: 200px; height: auto; }

.mobile-quick-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px 10px;
}
.mobile-quick-nav .nav-pill {
    display: inline-block;
    text-align: center;
    padding: 12px 10px;
    text-decoration: none;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
}
.mobile-quick-nav .nav-pill:active { transform: scale(0.98); }

.mobile-panel {
    position: fixed;
    inset-inline: 0;
    top: calc(var(--adminbar-h, 0px) + var(--hdr-h, 0px));
    bottom: 0;
    z-index: 10000; 
    background: rgb(255,255,255,.9); 
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}

.mobile-panel:target {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-panel .panel-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: 1fr auto; 
    max-width: 100vw;
    margin: 0 auto;
    padding: 18px 16px 14px;
    color: #000;
    transform: translateY(8px);
    transition: transform .25s ease;
}
.mobile-panel:target .panel-content { transform: translateY(0); }

.panel-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    text-align: center;
}
.panel-body p {
    margin: 0 0 0.9em 0;
    line-height: 2.3rem;
    font-size: 1.3rem;
    text-align: center;
}
.mobile-panel a { 
    color: #000; 
    text-decoration-thickness: .08em; 
    text-underline-offset: .15em; 
}

.panel-close {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    color: #000;
}

/* Bloquear scroll del fondo cuando hay un panel abierto (navegadores con :has) */
@supports(selector(html:has(*))) {
    html:has(.mobile-panel:target) { overflow: hidden; }
}



/*** TAX DIRECTOR ***/
.text-director {
    padding: 1vh 1vw 0;
    margin-bottom: -2rem;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
}
.text-director p { margin-bottom: 0; }


/*** LISTA DE PROYECTOS ***/
.proyectos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1vh 1vw;
}
.proyectos-item {
    flex: 1 1 calc(33.333% - 1rem);
    display: flex;
    flex-direction: column;
	max-width: calc(33.33% - 1rem);
}

@media (min-width: 769px) {
    .proyectos-item.grande {
        flex-basis: calc(66.66% - 1rem);
		max-width: calc(66.66% - 1rem);
    }    
}
@media (max-width: 768px) {
    .proyectos-item {
        flex-basis: 100%;
		max-width: 100%;
    }
}

.proyectos-thumb {
    display: block;
    overflow: hidden;
}
.proyectos-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.proyectos-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
@media (max-width: 768px) {
    .proyectos-title {
        text-align: center;
    }
}

/*** FICHA PROYECTO ***/
.caja-video {
    max-width: var(--gb-container-width);
    margin: 0 auto 2rem;
}
#myVideo {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
}
#myVideo iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.datos-video {
    text-transform: uppercase;
    text-align: center;
    font-weight: bold;
}