/*=================================================================
  Ajustes para la versión PHP (no tocar style.css original)
=================================================================*/

/* Hamburguesa: alterna iconos (antes lo hacía React) */
.hamburger .close-icon {
    display: none;
}

.hamburger.is-open .menu-icon {
    display: none;
}

.hamburger.is-open .close-icon {
    display: inline;
}

/* Marquee de logos con movimiento continuo */
.mySwiper1 .swiper-wrapper {
    transition-timing-function: linear !important;
}

/*=================================================================
  IMÁGENES ADAPTABLES (helper img() en utils/icons.php)
  Cada <img> lleva su tamaño recomendado (width/height + aspect-ratio).
  Si cambias la imagen por una de otro tamaño, se adapta a ese hueco
  sin deformarse ni romper el diseño.
=================================================================*/

/* :where() = especificidad 0 -> las medidas del template siguen mandando */
:where(.img-fit) {
    max-width: 100%;
    height: auto;
}

/* Fotos: llenan el espacio recortando lo que sobre */
.img-fit--cover {
    object-fit: cover;
    object-position: center;
}

/* Íconos, logos y PNG decorativos: se ven completos */
.img-fit--contain {
    object-fit: contain;
    object-position: center;
}

/* Fondos (hero y banners): cualquier imagen cubre todo el bloque
   Recomendado: slides 1920x835, banners de páginas internas 1920x376 */
.slide1,
.slide2,
.slide3,
.about_hero_section,
.service_hero_section,
.error_hero_section,
.testimonial_hero_section,
.project_hero_section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/*=================================================================
  BRAND COLORS: reemplazos de los "filter: hue-rotate(...)" del
  template, que forzaban el rojo original sin importar la marca.
  Las variables --brand-* salen de $BrandColors en text.php.
=================================================================*/

/* Menú: el hover ya usa color: var(--brand-primary) */
.menu li:hover>a {
    filter: none;
}

/* Flecha del acordeón FAQ (abierto = color principal, cerrado = oscuro) */
.accordion-button::after,
.accordion-button:not(.collapsed)::after {
    background-image: none;
    background-color: var(--brand-dark);
    filter: none;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6l6 -6'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6l6 -6'/></svg>") center / contain no-repeat;
}

.accordion-button:not(.collapsed)::after {
    background-color: var(--brand-primary);
}

/* Íconos sociales de contacto: oscuro -> color principal al pasar el mouse */
.brand-mask-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--brand-dark);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.contact_icon a:hover .brand-mask-icon {
    transform: scale(1.2);
    background-color: var(--brand-primary);
}

/* Botón submit del CTA del footer (antes era un <a>) */
.subscribe-bubble button {
    background: none;
    border: none;
    padding: 0;
}

/*=================================================================
  HERO: degradado encima de las imágenes para que el texto se lea
=================================================================*/
.slide1,
.slide2,
.slide3 {
    position: relative;
}

.slide1::before,
.slide2::before,
.slide3::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.15) 75%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 40%);
}

.second_hero_section .slider_content {
    z-index: 1;
}

/* En móvil el template pone .slider_content en position: unset;
   relative mantiene ese layout pero deja el texto encima del degradado */
@media screen and (max-width: 575px) {
    .second_hero_section .slider_content {
        position: relative;
    }
}

/* Móvil/tablet: el texto va centrado, oscurecido parejo */
@media (max-width: 767px) {
    .slide1::before,
    .slide2::before,
    .slide3::before {
        background: rgba(0, 0, 0, 0.62);
    }
}

/*=================================================================
  SERVICIOS (home y services.php): tarjetas con el diseño de los
  posts del blog (foto arriba con zoom, etiqueta y texto)
=================================================================*/
.services-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card-wrap,
.service-card-wrap:hover {
    display: block;
    color: inherit;
}

.service-news-card {
    height: 100%;
}

.service-news-card .new_containt {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* mostrar la descripción completa (en el blog se corta a 2 líneas) */
.service-news-card .news_p {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-width: none;
    flex-grow: 1;
}

.service-news-card .new_img {
    height: 260px;
}

.service-card-link {
    margin-top: 22px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-primary);
    font-size: 17px;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.service-news-card:hover .service-card-link {
    gap: 14px;
}

@media (max-width: 991px) {
    .services-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .services-cards-row {
        grid-template-columns: 1fr;
    }

    .service-news-card .new_img {
        height: 230px;
    }
}

/*=================================================================
  TOP BAR (header.php): contacto a la izquierda, redes a la derecha
=================================================================*/
.top-bar {
    background: var(--brand-dark);
    color: var(--brand-white);
    font-size: 15px;
    line-height: 22px;
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 9px 20px;
}

.top-bar__info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-bar__info li,
.top-bar__info a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-white);
    transition: color 0.3s ease;
}

.top-bar__info a:hover {
    color: var(--brand-primary);
}

.top-bar__icon {
    color: var(--brand-primary);
    flex-shrink: 0;
}

.top-bar__social {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar__follow {
    opacity: 0.8;
}

.top-bar__social a {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.top-bar__social .brand-mask-icon {
    width: 16px;
    height: 16px;
    background-color: var(--brand-white);
}

.top-bar__social a:hover {
    background: var(--brand-primary);
}

@media (max-width: 1199px) {
    .top-bar__schedule {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .top-bar {
        font-size: 13px;
    }

    .top-bar__inner {
        padding: 8px 12px;
        gap: 10px;
    }

    .top-bar__info {
        gap: 4px 16px;
    }

    .top-bar__follow {
        display: none;
    }
}

@media (max-width: 575px) {
    /* en móvil chico solo íconos para correo/teléfono + redes */
    .top-bar__info span {
        display: none;
    }

    .top-bar__info .top-bar__icon {
        width: 20px;
        height: 20px;
    }
}

/*=================================================================
  HERO CON VIDEO DE FONDO ($HeroVideo en text.php)
  El video queda fijo detrás y los textos rotan encima.
=================================================================*/
.second_hero_section.hero-has-video {
    position: relative;
    overflow: hidden;
    background: var(--brand-dark);
}

.hero-video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.hero-has-video .home_second_slider {
    position: relative;
    z-index: 1;
}

/* los slides dejan ver el video (se mantiene el degradado ::before) */
.hero-has-video .slide1,
.hero-has-video .slide2,
.hero-has-video .slide3 {
    background-image: none;
    background-color: transparent;
}

/*=================================================================
  LOGO (imagen $Logo en text.php): se controla por altura
=================================================================*/
.header .logo img.site-logo,
.header .mobile-logo img.site-logo {
    height: 150px;
    width: auto;
    max-width: none;
}

.footer2-section img.site-logo--footer {
    height: 250px;
    width: auto;
}

@media (max-width: 767px) {
    .header .logo img.site-logo,
    .header .mobile-logo img.site-logo {
        height: 72px;
    }
}

/* Font Awesome: el reset global de style.css (*, ::before { font-family: Outfit })
   pisaba la fuente de los íconos y salían cuadritos (burbujas flotantes, QR) */
i[class*="fa-"]::before {
    font-family: inherit;
    font-weight: inherit;
}
