/* ==========================================================================
   DVB - Secciones
   ========================================================================== */

/* --- Franja fotográfica divisoria --- */
.dvb-photo-strip {
    position: relative;
    height: 460px;
    overflow: hidden;
}

.dvb-photo-strip img {
    position: absolute;
    top: -22%;
    left: 0;
    width: 100%;
    height: 144%; /* colchón amplio: da recorrido real al parallax sin dejar huecos */
    object-fit: cover;
    /* El sujeto (dos técnicos en poste/canasto) está algo más centrado
       verticalmente en esta foto que en la anterior. */
    object-position: center 42%;
    will-change: transform;
}

.photo-strip-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(15, 23, 42, .92) 0%, rgba(15, 23, 42, .55) 35%, rgba(15, 23, 42, .1) 65%, rgba(15, 23, 42, .25) 100%);
}

/* Segundo fundido, encima del overlay, que refuerza la disolución del
   traslape (misma tonalidad navy que el fondo del hero) */
.photo-strip-fade-top {
    position: absolute;
    inset: 0 0 auto 0;
    height: 140px;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(15, 23, 42, .95), transparent);
    pointer-events: none;
}

.photo-strip-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 40px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.photo-strip-text {
    max-width: 560px;
    padding: 18px 26px;
    background: rgba(15, 23, 42, .45);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    backdrop-filter: blur(6px);
}

.photo-strip-caption p {
    margin: 0;
    color: var(--dvb-white);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.5;
}

.photo-strip-caption strong {
    color: var(--dvb-gold-light);
}

/* --- Somos / About --- */
.dvb-about {
    position: relative;
    padding: 120px 0;
    background-color: var(--dvb-navy-dark);
    color: var(--dvb-white);
    overflow: hidden;
}

.dvb-about-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(15,23,42,.95) 35%, rgba(15,23,42,.72));
    z-index: 1;
}

.dvb-about .dvb-container {
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.dvb-about h2 { color: var(--dvb-white); font-size: 38px; }
.dvb-about p { color: rgba(255, 255, 255, .78); }

.about-media img {
    border-radius: var(--dvb-radius-lg);
}

/* --- Servicios --- */
.dvb-services {
    padding: 120px 0;
    background: var(--dvb-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card {
    border-radius: var(--dvb-radius);
    background: var(--dvb-gray-light);
    border: 1px solid transparent;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease, border-color .3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    background: var(--dvb-white);
    border-color: rgba(216, 163, 26, .2);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.service-media {
    position: relative;
    aspect-ratio: 585 / 210;
    overflow: hidden;
    background: var(--dvb-navy-dark);
}

.service-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.service-card:hover .service-media img {
    transform: scale(1.04);
}

.service-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--dvb-navy);
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .25);
    transition: background .3s ease;
}

.service-icon::after {
    content: '';
    position: absolute;
    inset: 11px;
    background: var(--dvb-gold);
    border-radius: 3px;
}

.service-card:hover .service-icon {
    background: var(--dvb-gold);
}

.service-card:hover .service-icon::after {
    background: var(--dvb-navy-dark);
}

.service-body { padding: 24px 28px 28px; }

.service-card h3 { font-size: 18px; margin: 0 0 8px; }
.service-card p { margin: 0; font-size: 14.5px; line-height: 1.55; }

/* Con 5 servicios en grilla de 2 columnas, la última tarjeta queda
   sola: en vez de estirarla a todo el ancho (lo que aplasta la foto
   en una franja panorámica), la centramos con el mismo ancho que
   una tarjeta normal */
.services-grid .service-card:nth-child(5):last-child {
    grid-column: 1 / -1;
    max-width: 760px;
    margin: 0 auto;
}

.services-grid .service-card:nth-child(5):last-child .service-media {
    aspect-ratio: 760 / 320;
}

.services-grid .service-card:nth-child(5):last-child .service-icon {
    left: 50%;
    transform: translateX(-50%);
}

.services-grid .service-card:nth-child(5):last-child h3,
.services-grid .service-card:nth-child(5):last-child p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* --- Por qué elegirnos --- */
.dvb-why {
    position: relative;
    padding: 130px 0;
    background-color: var(--dvb-navy-dark);
    overflow: hidden;
}

.dvb-why-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, rgba(15,23,42,.94) 40%, rgba(15,23,42,.75));
}

.why-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.why-copy .eyebrow { color: var(--dvb-gold-light); }
.why-copy h2 { font-size: 36px; color: var(--dvb-white); }
.why-copy p { color: rgba(255, 255, 255, .75); }

.why-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-box {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
    border-radius: var(--dvb-radius);
    padding: 30px 24px;
    text-align: center;
    transition: transform .3s cubic-bezier(.22,.61,.36,1), background .3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, .1);
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--dvb-gold-light);
    font-variant-numeric: tabular-nums; /* evita que el ancho salte al animar el conteo */
}

.stat-label {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, .75);
}

/* --- Proyectos --- */
.dvb-projects {
    padding: 120px 0;
    background: var(--dvb-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    display: block;
    border-radius: var(--dvb-radius);
    overflow: hidden;
    background: var(--dvb-gray-light);
    box-shadow: 0 0 0 rgba(15, 23, 42, 0);
    transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, .14);
}

.project-image {
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.22,.61,.36,1);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-info {
    padding: 24px;
}

.project-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    transition: color .25s ease;
}

.project-card:hover .project-info h3 {
    color: var(--dvb-navy);
}

.project-card .link-arrow {
    border-bottom-color: transparent;
}

/* --- CTA --- */
.dvb-cta {
    padding: 140px 0;
    background: var(--dvb-navy-dark);
}

.cta-box {
    position: relative;
    padding: 90px 60px;
    border-radius: var(--dvb-radius-lg);
    background-color: var(--dvb-navy-dark);
    color: var(--dvb-white);
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,59,92,.93), rgba(15,23,42,.93));
    z-index: 1;
}

.cta-box > *:not(.parallax-bg) {
    position: relative;
    z-index: 2;
}

.cta-box .eyebrow { color: var(--dvb-gold-light); }
.cta-box h2 { color: var(--dvb-white); font-size: 44px; max-width: 850px; margin: 15px auto 40px; }

/* --- Contacto --- */
.dvb-contact {
    padding: 120px 0;
    background: var(--dvb-gray-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 70px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 30px 0 0;
}

.contact-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    color: var(--dvb-gray-text);
}

.contact-form {
    background: var(--dvb-white);
    padding: 40px;
    border-radius: var(--dvb-radius);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .06);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e1e4e9;
    border-radius: 10px;
    font-family: var(--dvb-font);
    font-size: 15px;
    resize: vertical;
}

.contact-form textarea { margin-bottom: 22px; }

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--dvb-gold);
}

/* Campo trampa anti-spam: oculto visualmente pero presente en el DOM
   (los bots simples lo detectan igual y lo rellenan, delatándose) */
.dvb-hp-field {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.contact-form button[type="submit"]:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.form-status {
    margin: 16px 0 0;
    font-size: 14px;
    font-weight: 600;
    min-height: 1.2em;
}

.form-status.is-success { color: #1a7f37; }
.form-status.is-error   { color: #c0392b; }

/* --- Mapa de ubicación --- */
.contact-map {
    margin-top: 40px;
    border-radius: var(--dvb-radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .06);
    aspect-ratio: 21 / 8;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 720px) {
    .contact-map { aspect-ratio: 4 / 3; }
}

.map-directions-link {
    display: inline-block;
    margin-top: 16px;
    font-weight: 700;
    color: var(--dvb-navy-dark);
    text-decoration: none;
    border-bottom: 2px solid var(--dvb-gold);
    padding-bottom: 2px;
    transition: color .2s ease, border-color .2s ease;
}

.map-directions-link:hover {
    color: var(--dvb-gold);
}

/* --- Footer --- */
.dvb-footer {
    background: var(--dvb-navy-dark);
    color: rgba(255, 255, 255, .75);
    padding-top: 80px;
    border-top: 4px solid var(--dvb-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-brand {
    padding-right: 30px;
    border-right: 1px solid rgba(255, 255, 255, .08);
}

.footer-logo {
    display: inline-block;
}

/* Controla el tamaño real del logo (evita que se vea gigante si el
   archivo subido en el Personalizador tiene resolución alta) */
.footer-brand .footer-logo img,
.footer-brand .custom-logo {
    display: block;
    width: auto;
    height: 44px;
    max-width: 160px;
    object-fit: contain;
}

.dvb-footer .logo-text {
    color: var(--dvb-white);
    font-size: 24px;
    font-weight: 800;
}

.footer-brand p {
    margin-top: 16px;
    color: rgba(255, 255, 255, .6);
    font-size: 14px;
    line-height: 1.7;
}

.dvb-footer h4 {
    color: var(--dvb-white);
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, .65);
    font-size: 14px;
}

.footer-links a:hover { color: var(--dvb-gold-light); }

.footer-contact a,
.footer-contact .footer-static {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .75);
    transition: color .2s ease;
}

.footer-contact a:hover { color: var(--dvb-gold-light); }

.footer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: var(--dvb-gold-light);
}

.footer-icon svg { width: 15px; height: 15px; }

/* --- Íconos sociales (Instagram, LinkedIn, WhatsApp) ---
   Deliberadamente más grandes y con borde dorado para que destaquen
   frente a los íconos discretos de teléfono/email de al lado */
.footer-socials {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.footer-socials-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dvb-gold-light);
    margin-right: 2px;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(216, 163, 26, .55);
    background: rgba(216, 163, 26, .08);
    color: var(--dvb-gold-light);
    transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.footer-social-link svg { width: 19px; height: 19px; }

.footer-social-link:hover {
    background: var(--dvb-gold);
    border-color: var(--dvb-gold);
    color: var(--dvb-navy-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(216, 163, 26, .35);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 22px 0;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}

.footer-bottom-link {
    color: var(--dvb-gold-light);
    font-weight: 600;
}

.footer-bottom-link:hover { color: var(--dvb-white); }

/* --- 404 --- */
.dvb-404 { padding: 220px 0; text-align: center; }
.dvb-404 h1 { font-size: 140px; color: var(--dvb-navy); margin-bottom: 0; }

/* --- Página genérica --- */
.dvb-page { padding: 160px 0 100px; }

/* --- Entrada individual (proyectos / blog) --- */
.dvb-single-container {
    max-width: 820px;
}

.dvb-single-header {
    margin-bottom: 36px;
}

.dvb-single-header h1 {
    font-size: 42px;
    margin: 0 0 14px;
}

.dvb-single-meta {
    color: var(--dvb-gray-text);
    font-size: 14px;
    margin: 0;
}

.dvb-single-thumb {
    margin-bottom: 40px;
    border-radius: var(--dvb-radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
}

.dvb-single-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

/* Tipografía del contenido (editor de bloques / Elementor) */
.dvb-single-content {
    font-size: 17px;
    line-height: 1.75;
    color: var(--dvb-text-dark);
}

.dvb-single-content > * + * { margin-top: 22px; }

.dvb-single-content h2 { font-size: 30px; }
.dvb-single-content h3 { font-size: 24px; }
.dvb-single-content h4 { font-size: 19px; }

.dvb-single-content p {
    color: inherit;
    margin: 0;
}

.dvb-single-content a {
    color: var(--dvb-navy);
    text-decoration: underline;
    text-decoration-color: var(--dvb-gold);
    text-underline-offset: 3px;
}

.dvb-single-content a:hover { color: var(--dvb-gold); }

.dvb-single-content ul,
.dvb-single-content ol {
    padding-left: 22px;
}

.dvb-single-content li + li { margin-top: 8px; }

.dvb-single-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--dvb-radius);
}

.dvb-single-content figure { margin: 0; }

.dvb-single-content figcaption {
    font-size: 13px;
    color: var(--dvb-gray-text);
    text-align: center;
    margin-top: 10px;
}

.dvb-single-content blockquote {
    margin: 0;
    padding: 20px 24px;
    border-left: 4px solid var(--dvb-gold);
    background: var(--dvb-gray-light);
    border-radius: 0 var(--dvb-radius) var(--dvb-radius) 0;
    font-style: italic;
    color: var(--dvb-text-dark);
}

.dvb-single-back {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

@media (max-width: 640px) {
    .dvb-single-header h1 { font-size: 32px; }
}
