* { box-sizing: border-box; }
img, .imgfixed { max-width: 100%; height: auto; display: block; }

.thrColElsHdr #container1, .thrColElsHdr #container {
    width: 100% !important; max-width: 960px !important; margin: 0 auto !important; padding: 0 10px !important;
}
.thrColElsHdr #header, .thrColElsHdr #espacio_logo, .thrColElsHdr #banner, .thrColElsHdr #banner1 {
    width: 100% !important; height: auto !important; float: none !important;
}

.menu-toggle { display: none; width: 100%; background: #000; color: #9cc656; border: 1px solid #9cc656; padding: 12px; font-size: 16px; font-weight: bold; border-radius: 6px; cursor: pointer; margin: 8px 0; }
ul#MenuBar1 { display: flex; flex-wrap: wrap; list-style: none !important; margin: 8px 0 !important; padding: 0 !important; background: #000; border-radius: 8px; }
ul#MenuBar1 > li { position: relative; flex: 1 1 auto; text-align: center; }
ul#MenuBar1 > li > a { display: block; padding: 12px; color: #fff !important; text-decoration: none !important; font-size: 14px; }
ul#MenuBar1 > li > a:hover { background: #9cc656; color: #000 !important; }
ul#MenuBar1 ul.submenu { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; background: #1b1b1b; list-style: none !important; padding: 0; margin: 0; z-index: 9999; text-align: left; }
ul#MenuBar1 li:hover > ul.submenu, ul#MenuBar1 li.sub-abierto > ul.submenu { display: block; }
ul#MenuBar1 ul.submenu li a { display: block; padding: 10px 15px; color: #fff !important; text-decoration: none !important; border-bottom: 1px solid #333; }
ul#MenuBar1 ul.submenu li a:hover { background: #FF9900; color: #000 !important; }

.thrColElsHdr #principal1, .thrColElsHdr #principal3 { display: flex; flex-wrap: wrap; gap: 15px; background: transparent !important; margin-top: 12px; }
.thrColElsHdr #principal1 > section:first-child { flex: 2 1 320px; }
.thrColElsHdr #principal1 > section:last-child { flex: 1 1 240px; }
.thrColElsHdr #titulo, .thrColElsHdr #oferta, .thrColElsHdr #imagen_oferta, .thrColElsHdr #principal2, .caja-inferior {
    width: 100% !important; height: auto !important; float: none !important; padding: 15px !important; border-radius: 10px;
}
.caja-inferior { flex: 1 1 300px; background: #fff !important; color: #333 !important; }
#mitexto6, #mitexto7 { width: 100% !important; height: auto !important; max-height: 260px; overflow-y: auto; }
#avioneta, #sitelock_shield_logo { display: none !important; }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    ul#MenuBar1 { display: none; flex-direction: column; }
    ul#MenuBar1.abierto { display: flex; }
    ul#MenuBar1 ul.submenu { position: static; width: 100%; background: #2a2a2a; }
}

#mitexto6 .item-proyecto {
    color: #222222 !important;
    margin-bottom: 12px;
    line-height: 1.4;
}
#mitexto6 .item-proyecto strong {
    color: #000000 !important;
    font-size: 14px;
}
#mitexto6 .item-proyecto a {
    display: inline-block !important;
    margin-top: 4px;
    color: #5D8619 !important;
    text-decoration: underline !important;
    font-weight: bold;
}

.bloque-intro {
    width: 100%;
    flex: 1 1 100% !important;
}
.zona-inferior-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
    align-items: stretch;
}
.columna-foto {
    flex: 1 1 320px;
}
.columna-foto #oferta,
.columna-foto #imagen_oferta,
.columna-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.columna-cajas {
    flex: 1 1 380px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.columna-cajas #principal3 {
    flex-direction: column !important;
    margin-top: 0 !important;
}
#mitexto6 .item-proyecto {
    color: #222222 !important;
    margin-bottom: 10px;
}
#mitexto6 .item-proyecto strong {
    color: #000000 !important;
}
#mitexto6 .item-proyecto a,
#mitexto7 a {
    display: inline-block !important;
    color: #5D8619 !important;
    text-decoration: underline !important;
    font-weight: bold;
}

.zona-inferior-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
}
.columna-foto {
    flex: 0 0 43% !important;
    max-width: 43% !important;
}
.columna-cajas {
    flex: 0 0 55% !important;
    max-width: 55% !important;
}
@media (max-width: 768px) {
    .columna-foto, .columna-cajas {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

.columna-foto, .columna-cajas {
    flex: 1 1 48% !important;
    max-width: 49% !important;
}
.columna-foto #oferta {
    background: #FF9900 !important;
    padding: 12px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}
.columna-foto #imagen_oferta {
    padding: 0 !important;
    height: 100% !important;
}
.columna-foto #imagen_oferta img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.columna-cajas #principal3 {
    height: 100% !important;
    justify-content: space-between !important;
}
@media (max-width: 768px) {
    .columna-foto, .columna-cajas {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* 1. Quitar el marco naranja de la foto */
.columna-foto #oferta {
    background: transparent !important;
    padding: 0 !important;
}

/* 2. Menú estilo botones individuales separados */
ul#MenuBar1 {
    background: transparent !important;
    gap: 6px !important;
}
ul#MenuBar1 > li > a {
    background: #000000 !important;
    border-radius: 6px !important;
    border: 1px solid #333333 !important;
    padding: 9px 12px !important;
}
ul#MenuBar1 > li > a:hover {
    background: #9cc656 !important;
    color: #000000 !important;
    border-color: #9cc656 !important;
}

/* 3. Foto más compacta (36%) y Contacto más recogido */
.columna-foto {
    flex: 0 0 36% !important;
    max-width: 36% !important;
}
.columna-cajas {
    flex: 0 0 62% !important;
    max-width: 62% !important;
}
#recomendados.caja-inferior {
    max-width: 320px !important;
    align-self: flex-start !important;
}
@media (max-width: 768px) {
    .columna-foto, .columna-cajas, #recomendados.caja-inferior {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Anchos iguales al 49% en ambas columnas */
.columna-foto, .columna-cajas {
    flex: 1 1 48% !important;
    max-width: 49% !important;
}

/* Contacto ocupando todo su ancho (49%) pero más bajo y compacto */
#recomendados.caja-inferior {
    max-width: 100% !important;
    width: 100% !important;
    padding: 8px 15px !important;
}
#recomendados h3 {
    margin-bottom: 4px !important;
    padding-bottom: 3px !important;
    font-size: 15px !important;
}
#mitexto7 {
    padding: 4px 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
}
#mitexto7 p {
    margin: 0 !important;
}
#mitexto7 .redes-sociales {
    margin-top: 0 !important;
}

/* Reducir un cuarto la altura de Proyectos y de la foto para que cuadren */
#mitexto6 {
    max-height: 135px !important;
}
.columna-foto #oferta,
.columna-foto #imagen_oferta,
.columna-foto #imagen_oferta img {
    max-height: 280px !important;
    object-position: top center !important;
}

@media (max-width: 768px) {
    .columna-foto, .columna-cajas {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .columna-foto #oferta,
    .columna-foto #imagen_oferta,
    .columna-foto #imagen_oferta img {
        max-height: none !important;
    }
}

/* Devolver altura cómoda a Últimos Proyectos */
#mitexto6 {
    max-height: 175px !important;
}

/* Hacer Contacto realmente bajo quitando cualquier min-height fijo */
#recomendados,
#recomendados.caja-inferior {
    min-height: 0 !important;
    height: auto !important;
    padding: 8px 15px !important;
}
#recomendados h3 {
    margin: 0 0 4px 0 !important;
    padding-bottom: 3px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}
#mitexto7 {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding: 2px 0 !important;
    overflow: visible !important;
}

/* Estirar la foto de la izquierda para que cubra exactamente hasta el borde inferior de Contacto */
.zona-inferior-grid {
    align-items: stretch !important;
}
.columna-foto {
    display: flex !important;
}
.columna-foto #oferta,
.columna-foto #imagen_oferta,
.columna-foto #imagen_oferta img {
    max-height: none !important;
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
}

.columna-cajas #principal3 {
    height: auto !important;
    justify-content: flex-start !important;
}
.columna-foto #oferta,
.columna-foto #imagen_oferta,
.columna-foto #imagen_oferta img {
    max-height: 315px !important;
}
@media (max-width: 768px) {
    .columna-foto #oferta,
    .columna-foto #imagen_oferta,
    .columna-foto #imagen_oferta img {
        max-height: none !important;
    }
}

.thrColElsHdr #recomendados,
.thrColElsHdr #recomendados.caja-inferior,
.thrColElsHdr #mitexto7 {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding-bottom: 10px !important;
    margin-bottom: 0 !important;
}

.columna-foto #oferta,
.columna-foto #imagen_oferta,
.columna-foto #imagen_oferta img {
    max-height: 315px !important;
    height: 315px !important;
}

@media (max-width: 768px) {
    .columna-foto #oferta,
    .columna-foto #imagen_oferta,
    .columna-foto #imagen_oferta img {
        max-height: none !important;
        height: auto !important;
    }
}

.columna-foto #oferta,
.columna-foto #imagen_oferta,
.columna-foto #imagen_oferta img {
    max-height: 338px !important;
    height: 338px !important;
}

/* Eliminar cualquier altura fija heredada en Contacto */
body.thrColElsHdr #container #principal3 #recomendados,
body.thrColElsHdr #container #principal3 #recomendados #mitexto7 {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding-bottom: 10px !important;
}

/* Hacer que la foto iguale exactamente la altura de la columna derecha */
.zona-inferior-grid {
    align-items: stretch !important;
}
body.thrColElsHdr .columna-foto {
    display: flex !important;
}
body.thrColElsHdr .columna-foto #oferta,
body.thrColElsHdr .columna-foto #imagen_oferta,
body.thrColElsHdr .columna-foto #imagen_oferta img {
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
}

#contacto-box {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 10px 15px !important;
    background: #ffffff !important;
    color: #333333 !important;
    border-radius: 10px !important;
}
#contacto-box h3 {
    margin: 0 0 6px 0 !important;
    padding-bottom: 4px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #9cc656 !important;
    text-align: center !important;
    font-size: 15px !important;
}
body.thrColElsHdr .columna-foto #oferta,
body.thrColElsHdr .columna-foto #imagen_oferta,
body.thrColElsHdr .columna-foto #imagen_oferta img {
    height: 305px !important;
    max-height: 305px !important;
}
@media (max-width: 768px) {
    body.thrColElsHdr .columna-foto #oferta,
    body.thrColElsHdr .columna-foto #imagen_oferta,
    body.thrColElsHdr .columna-foto #imagen_oferta img {
        height: auto !important;
        max-height: none !important;
    }
}

/* Anular el alto fijo de #mitexto7 en basico.css / comun.css */
html body.thrColElsHdr #mitexto7 {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 4px 0 !important;
    margin: 0 !important;
}

/* Hacer que la foto de la izquierda cubra exactamente la altura de Proyectos + Contacto */
html body.thrColElsHdr .zona-inferior-grid {
    align-items: stretch !important;
}
html body.thrColElsHdr .columna-foto {
    display: flex !important;
}
html body.thrColElsHdr .columna-foto #oferta,
html body.thrColElsHdr .columna-foto #imagen_oferta,
html body.thrColElsHdr .columna-foto #imagen_oferta img {
    height: 100% !important;
    max-height: none !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
}

/* 1. Título de Últimos Proyectos en verde exacto igual que Contacto */
html body.thrColElsHdr #container #servicios h3,
html body.thrColElsHdr #container #contacto-box h3 {
    color: #9cc656 !important;
    text-align: center !important;
}

/* 2. Contacto compacto arriba sin estirarse y foto ajustada a la altura resultante */
html body.thrColElsHdr .zona-inferior-grid {
    align-items: flex-start !important;
}
html body.thrColElsHdr .columna-cajas #principal3 {
    justify-content: flex-start !important;
    height: auto !important;
}
html body.thrColElsHdr #contacto-box {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 15px !important;
}
html body.thrColElsHdr .columna-foto #oferta,
html body.thrColElsHdr .columna-foto #imagen_oferta,
html body.thrColElsHdr .columna-foto #imagen_oferta img {
    height: 315px !important;
    max-height: 315px !important;
}
@media (max-width: 768px) {
    html body.thrColElsHdr .columna-foto #oferta,
    html body.thrColElsHdr .columna-foto #imagen_oferta,
    html body.thrColElsHdr .columna-foto #imagen_oferta img {
        height: auto !important;
        max-height: none !important;
    }
}

/* 1. Imágenes de cabecera alternantes ocupando todo el ancho */
html body.thrColElsHdr #banner img,
html body.thrColElsHdr #banner1 img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
}

/* 2. Foto inferior cubriendo exactamente hasta el borde de Contacto */
html body.thrColElsHdr .zona-inferior-grid {
    align-items: stretch !important;
}
html body.thrColElsHdr .columna-foto {
    display: flex !important;
}
html body.thrColElsHdr .columna-foto #oferta,
html body.thrColElsHdr .columna-foto #imagen_oferta,
html body.thrColElsHdr .columna-foto #imagen_oferta img {
    height: 100% !important;
    max-height: none !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
}

/* Hacer que el iframe del currículum (y cualquier otro) iguale el ancho de la cabecera */
html body.thrColElsHdr iframe {
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    border-radius: 10px !important;
    display: block !important;
    margin: 10px auto !important;
}

html body.thrColElsHdr iframe {
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    border-radius: 10px !important;
    display: block !important;
    margin: 10px auto !important;
}

/* Hacer que los formularios de contacto e información sean 100% adaptativos */
html body.thrColElsHdr form table,
html body.thrColElsHdr form tbody,
html body.thrColElsHdr form tr,
html body.thrColElsHdr form td {
    display: block !important;
    width: 100% !important;
}
html body.thrColElsHdr form td:first-child {
    font-weight: bold;
    margin-top: 8px;
}
html body.thrColElsHdr form input[type="text"],
html body.thrColElsHdr form select,
html body.thrColElsHdr form textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px !important;
    border-radius: 5px !important;
    border: 1px solid #333333 !important;
    box-sizing: border-box !important;
}
html body.thrColElsHdr form input[type="submit"],
html body.thrColElsHdr form input[type="reset"],
html body.thrColElsHdr form input[type="button"] {
    padding: 8px 16px !important;
    margin-right: 6px !important;
    margin-top: 8px !important;
    background: #000000 !important;
    color: #9cc656 !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-weight: bold !important;
}

html body.thrColElsHdr .g-recaptcha iframe {
    width: 304px !important;
    max-width: 100% !important;
    height: 78px !important;
    margin: 0 !important;
    border-radius: 0 !important;
}
