:root {
    --nsd-color: #11646c;
    --text-color-dark: #333;
    --text-color-white: #f5f5f5;
    --background-color: #f9f9f9;
}

html, body {
    font-family: Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: 'Poppins', sans-serif;
    color: #222;
    background: #f9f9f9;
}

/* Header */

.header {
    position: fixed;
    width: 100%;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    transition: 0.3s ease;
    z-index: 1000;
}

.header.hide {
    transform: translateY(-100%);
    transition: transform 0.5s ease;
}


.header.scrolled {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #0a8c8c;
}

.nav a {
    margin-left: 30px;
    text-decoration: none;
    color: var(--nsd-color);
    font-weight: 500;
    transition: 0.3s;
}

.nav a:hover {
    color: #0a8c8c;
}

.btn-nav {
    background: #11646c;
    color: white !important;
    padding: 8px 18px;
    border-radius: 30px;
}

/* Alineamos el wrapper con los otros enlaces del nav */
.nav-contact-wrapper {
    display: inline-block;
    position: relative; /* Muy importante para el búho */
    margin-left: 30px;
}

/* Estilo para el búho asomado */
.buho-nav {
    position: absolute;
    width: 60px;          /* Ajusta el tamaño según prefieras */
    height: auto;
    left: 50%;            /* Centrado respecto al botón */
    transform: translateX(-50%); 
    bottom: 85%;          /* Se asoma por encima del botón */
    z-index: -1;          /* Queda un poco por detrás para que parezca que sale de atrás */
    pointer-events: none; /* Evita que el búho bloquee el clic en el botón */
    transition: bottom 0.3s ease; /* Para que sea dinámico */
}

/* Efecto divertido: cuando pasas el ratón por el botón, el búho sube un poco más */
.nav-contact-wrapper:hover .buho-nav {
    bottom: 100%;
}

/* Ajuste para que el botón no herede márgenes extra ahora que está en un div */
.nav-contact-wrapper .btn-nav {
    margin-left: 0 !important;
}

/* Botón Leer más */
.btn-read {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--nsd-color);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

/* Aparece solo cuando la tarjeta se expande */
.service-box:hover .btn-read {
    opacity: 1;
    transform: translateY(0);
}

/* Hover del botón */
.btn-read:hover {
    background: #0a4f55;
} 

.hero-full {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.hero-split-container {
    display: grid;
    grid-template-columns: 55% 45%; /* El video ocupa un poco más que el texto */
    height: 100%;
    width: 100%;
}

/* ESTILO VIDEO (LADO IZQUIERDO) */
.hero-video-side {
    position: relative;
    background: #000;
}

.hero-video-side video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto es clave: hace que el video llene el espacio sin deformarse */
}

.overlay-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.2), rgba(255,255,255,0));
}

/* ESTILO TEXTO (LADO DERECHO) */
.hero-content-side {
    background: var(--white); /* O el color de fondo de la web original */
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
}

.text-wrapper {
    max-width: 500px;
}

.hero-content-side h1 {
    font-size: 55px;
    line-height: 1.1;
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content-side h1 span {
    color: var(--primary);
}

.hero-content-side p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 30px;
}

.hero-decor-image {
    position: absolute;
    bottom: 20px;   /* Distancia desde abajo */
    right: 40px;    /* Distancia desde la derecha */
    width: 300px;   /* Ajusta el tamaño a tu gusto */
    height: auto;
    pointer-events: none; /* Para que no interfiera si alguien intenta hacer clic cerca */
    z-index: 1;
}

/* En móviles es mejor ocultarla o hacerla más pequeña para que no tape el texto */
@media (max-width: 768px) {
    .hero-decor-image {
        display: none;
    }
}

/* RESPONSIVE: En móviles se apilan */
@media (max-width: 992px) {
    .hero-split-container {
        grid-template-columns: 1fr;
        grid-template-rows: 40vh 60vh;
    }
    .hero-content-side {
        padding: 40px 20px;
        text-align: center;
    }
    .hero-content-side h1 { font-size: 35px; }
}

.btn-primary {
    background: #0a8c8c;
    padding: 12px 30px;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #066666;
}

.section {
    padding: 40px 60px;
    text-align: center;
}

.services .cards {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    width: 300px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: 0.4s;
}

.card:hover {
    transform: translateY(-10px);
}

.about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.about-img {
    width: 400px;
    height: 300px;
    background: url('https://images.unsplash.com/photo-1560185127-6ed189bf02f4?auto=format&fit=crop&w=1000&q=80') center/cover;
    border-radius: 15px;
}

.contact form {
    max-width: 600px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact input,
.contact textarea {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-family: inherit;
}

footer {
    background: #111;
    color: white;
    padding: 20px;
    text-align: center;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* Responsive */
@media(max-width: 900px) {
    .nav {
        position: absolute;
        top: 80px;
        right: 0;
        background: white;
        flex-direction: column;
        width: 200px;
        padding: 20px;
        display: none;
    }

    .nav.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .nav a {
        margin: 15px 0;
    }

    .hero h1 {
        font-size: 35px;
    }
}

.h1-service-section {
  position: relative;
  text-align: center;
  font-size: 36px;
  margin-bottom: 40px;
  color: #09373b;
}

.h1-service-section::after {
  content: "";
  position: absolute;
  bottom: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background-color: var(--nsd-color); /* o tu color */
}

.h2-service-section {
  position: relative;
  text-align: center;
  font-size: 36px;
  margin-bottom: 40px;
  color: #09373b;
}

.h2-service-section::after {
  content: "";
  position: absolute;
  bottom: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background-color: #0D5C6B; /* o tu color */
}

.title-info-contact {
  position: relative;
  display: inline-block;
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
  color: #09373b;
}

.title-info-contact::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0%;
  width: 80px;
  height: 3px;
  background-color:var(--nsd-color);
  border-radius: 2px;
}


/* Animación para servicios */

/* CONTENEDOR */
.services .cards {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
    justify-content: center;
    transition: all 0.3s ease;
}

/* TARJETAS */
.services .card {
    flex: 1;
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    width: 300px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
}

/* INFO EXTRA OCULTA */
.services .card .extra {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    transition: all 0.4s ease;
}

/* Cuando el ratón está sobre el contenedor */
.services .cards:hover .card {
    flex: 0.8;
    opacity: 0.35;        /* se aclaran */
    filter: brightness(1.4);
    transform: none;
}

/* La card señalada mantiene su color normal */
.services .card:hover {
    flex: 2;
    opacity: 1 !important;
    filter: brightness(1) !important; /* color original */
    transform: translateY(-10px);
}


/* Mostrar info extra */
.services .card:hover .extra {
    opacity: 1;
    max-height: 200px;
    margin-top: 15px;
}

#servicios{
    padding-top: 30px;
}

/* ============================
   BLOG CARRUSEL
============================ */

/* ── SECCIÓN BLOG CARRUSEL ── */
.blog-carousel-section {
    padding: 90px 0;
    background: #f9fafa;
    overflow: hidden;
}

.blog-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    margin-left: 60px;
    margin-right: 60px;
}

.blog-section-header h2 {
    font-size: 2rem;
    color: #09373b;
    margin: 6px 0 0;
}

.blog-section-header h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--nsd-color);
    margin-top: 6px;
}

.blog-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--nsd-color);
}

.btn-ver-todos {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--nsd-color);
    text-decoration: none;
    border: 2px solid var(--nsd-color);
    padding: 9px 20px;
    border-radius: 50px;
    transition: 0.25s;
    white-space: nowrap;
}

.btn-ver-todos:hover {
    background: var(--nsd-color);
    color: #fff;
}

/* Mecánica del carrusel */
.carousel-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.carousel-window {
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cards */
.blog-card {
    min-width: calc(33.333% - 16px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(9,55,59,0.13);
}

.blog-card-img-wrap {
    position: relative;
    overflow: hidden;
}

.blog-card-img-wrap img {
    width: 100%;
    height: 195px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img-wrap img {
    transform: scale(1.04);
}

.blog-card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--nsd-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 11px;
    border-radius: 50px;
}

.blog-card-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-date {
    font-size: 11px;
    color: #aaa;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.blog-card-content h4 {
    font-size: 1rem;
    color: #09373b;
    margin: 0 0 10px;
    line-height: 1.45;
}

.blog-card-content p {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.6;
    flex-grow: 1;
    margin: 0 0 18px;
}

.btn-blog {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--nsd-color);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: gap 0.2s;
}

.btn-blog:hover { gap: 10px; }

/* Botones laterales */
.carousel-btn {
    flex-shrink: 0;
    background: #fff;
    color: var(--nsd-color);
    border: 2px solid var(--nsd-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--nsd-color);
    color: #fff;
}

@media (max-width: 900px) {
    .blog-card { min-width: calc(50% - 12px); }
    .blog-section-header { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 580px) {
    .blog-card { min-width: 85%; }
}



/* estilos footer */

.footer {
    background: #111;
    color: #fff;
    padding: 50px 60px 20px;
    margin-top: 60px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 18px;
}

.footer-col p {
    max-width: 250px;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-col ul li a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--color-principal, #0a8c8c);
}


.social-links {
    list-style: none;
    padding: 0;
}

.social-links li {
    margin-bottom: 10px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: 0.3s;
}

.social-links a:hover {
    opacity: 1;
    color: var(--color-principal, #0a8c8c);
}


.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    opacity: 0.8;
}


.footer-col h4 {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.footer-col h4::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: var(--color-principal, #0a8c8c);
    border-radius: 2px;
}

.footer-color a {
    color: #fff;
}

.footer-color a:hover {
    color: var(--nsd-color);
    transition: color 0.5s ease;
}
        /* ============================
        PÁGINA CONTACTO 
        ============================ */

/* Sección contacto */
#contacto {
    padding-top: 120px;
    padding-bottom: 60px;
    background: var(--background-color);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.contact-card {
    background: #fff;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    text-align: left;
}

.title {
    font-size: 24px;
    font-weight: 600;
    color: #222;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
}

.contact-form textarea {
    min-height: 130px;
    resize: vertical;
}

.checkbox-row {
    margin: 10px 0;
}

.checkbox-row label {
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--nsd-color);
    color: var(--text-color-white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s ease;
}

.btn-primary:hover {
    background: #0a4f55;
}

.contact-map {
    width: 100%;
    height: 50%;
    min-height: 420px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.contact-info {
    background: #fff;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    text-align: left;
    grid-column:  2; /* hace que ocupe todo el ancho */
}

/* Responsive */
@media(max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .contact-map {
        min-height: 300px;
    }
}

/* Nueva columna derecha */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info a {
    color: #222;          /* usa el color del texto del contenedor */
    text-decoration: none;   /* quita el subrayado */
}

.contact-info a:hover {
    color: var(--nsd-color); /* opcional: color al pasar el ratón */
}

/* Contenedor general del aviso legal */
.aviso-legal {
    padding: 120px 60px 60px; /* margen superior pensando en header fijo */
    background: var(--background-color, #f9f9f9);
    color: var(--text-color-dark, #333);
    text-align: left;
}

.aviso-legal .container {
    max-width: 900px;
    margin: 0 auto;
}

/* Título principal (ya usas .h1-service-section, lo afinamos un poco aquí si quieres) */
.aviso-legal .h1-service-section {
    margin-bottom: 40px;
}

/* Subtítulos */
.aviso-legal h2 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 10px;
    color: var(--nsd-color, #11646c);
}

/* Párrafos */
.aviso-legal p {
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 15px;
}

/* Listas */
.aviso-legal ul {
    margin: 10px 0 20px 20px;
    padding-left: 15px;
}

.aviso-legal ul li {
    margin-bottom: 6px;
    line-height: 1.6;
}

/* Enlaces */
.aviso-legal a {
    color: var(--nsd-color, #11646c);
    text-decoration: none;
    font-weight: 500;
}

.aviso-legal a:hover {
    text-decoration: underline;
}

/* Nota final de actualización */
.aviso-legal p:last-of-type {
    font-size: 13px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 900px) {
    .aviso-legal {
        padding: 100px 20px 40px;
    }

    .aviso-legal .container {
        max-width: 100%;
    }
}


.mensaje-exito {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.mensaje-exito.oculto {
    display: none;
}

.mensaje-contenido {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    animation: aparecer 0.3s ease-out;
}

.mensaje-contenido p {
    font-size: 18px;
    margin-bottom: 20px;
}

#cerrar-mensaje {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

#cerrar-mensaje:hover {
    background: #0c56c0;
}

@keyframes aparecer {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

        /* ============================
        PÁGINA BLOG
        ============================ */

/* Sección blog */
#blog {
    padding-top: 120px;
    padding-bottom: 60px;
    background: var(--background-color);
}

/* Tarjetas index */

/* NUEVO DISEÑO DE SERVICIOS */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
    margin-top: 50px;
}

/* TARJETA */
.service-box {
    background: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    text-align: center;
    transition: 0.4s ease;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    min-height: 240px;
}

/* EFECTO HOVER */
.service-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
    padding-bottom: 60px;
}

/* ICONO */
.service-box .icon {
    font-size: 45px;
    color: var(--nsd-color);
    margin: 0 auto 20px;
}

/* TÍTULO */
.service-box h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #09373b;
}

.service-box p {
    font-size: 15px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 0;
        text-align: justify;

}

/* TEXTO VISIBLE SIEMPRE */
.visible-text {
    font-size: 15px;
    color: #444;
    margin-bottom: 10px;
}

.visible-text p{
    text-align: justify;
}

/* TEXTO EXTRA OCULTO */
.service-box .extra {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 0;
    font-size: 15px;
    color: #444;
    line-height: 1.5;
}

/* MOSTRAR TEXTO EXTRA AL PASAR EL CURSOR */
.service-box:hover .extra {
    max-height: 300px;
    opacity: 1;
    margin-top: 15px;
}

/* Responsive */
@media(max-width: 900px) {
    .service-box {
        text-align: center;
    }
    .service-box .icon {
        margin: 0 auto 20px;
    }
}

/* ================================
   SECCIÓN TRUST — CONTENEDOR
================================ */

.trust-section {
    position: relative;              /* necesario para el fondo absoluto */
    display: grid;
    grid-template-columns: 1fr 1fr;  /* texto izquierda / tarjetas derecha */
    gap: 60px;
    padding: 160px 60px;
    z-index: 1;
    margin-top: 0;
}

/* ============================
   DISEÑOS QUE COMUNICAN
============================ */

.what-moves-us {
    width: 100%;
    padding: 60px 40px;
    background: #f9f9f9; /* fondo suave para separar del hero */
    text-align: center;
}

.what-moves-content {
    max-width: 800px;
    margin: 0 auto;
}

.what-moves-title {
    font-size: 36px;
    font-weight: 700;
    color: #09373b;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

/* Línea decorativa */
.what-moves-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--nsd-color);
    border-radius: 2px;
}

.what-moves-content p {
    font-size: 18px;
    color: #444;
    line-height: 1.7;
    margin-top: 25px;
}



/* Reveal-2 ya lo tienes creado */


/* ================================
   FONDO PARALLAX REAL
================================ */

.trust-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin-top: 0;
    

    /* usa tu ruta correcta */
    background: url('../img/fondo5.png') center/cover no-repeat;

    background-attachment: fixed;    /* efecto de que la imagen se queda quieta */
    z-index: -1;
    filter: brightness(0.6);         /* oscurece un poco para que el contenido destaque */
}

/* ================================
   COLUMNA IZQUIERDA (TEXTO)
================================ */

.trust-left {
    max-width: 520px;
}

.trust-left h2 {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-color-white);
    margin-bottom: 20px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.trust-left p {
    font-size: 18px;
    color: var(--text-color-white);
    line-height: 1.7;
    margin-bottom: 25px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    text-align: justify;
}

.trust-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--nsd-color);
    color: #ffffff;
    border-radius: 10px;
    font-weight: 600;
    transition: 0.3s ease;
}

.trust-btn:hover {
    background: #0a4f55;
}

/* ================================
   COLUMNA DERECHA (TARJETAS)
================================ */

.trust-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.trust-card {
    background: rgba(255,255,255,0.92);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    color: #09373b;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transition: 0.3s ease;
    border: 2px solid transparent;
}

.trust-card:hover {
    transform: translateY(-8px);
    border-color: var(--nsd-color);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.trust-card i {
    font-size: 40px;
    color: var(--nsd-color);
    margin-bottom: 12px;
}

.trust-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.trust-card p {
    font-size: 15px;
    color: #555;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 900px) {
    .trust-section {
        grid-template-columns: 1fr;
        padding: 120px 20px;
    }

    .trust-right {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .trust-right {
        grid-template-columns: 1fr;
    }
}

/* ============= SECCIÓN MURAL (GRID 4x3) ===============*/

.mural-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  width: 100%;
}

/* Bloque ancho (fila 1, columnas 3 y 4) */
.mural-img-wide {
  grid-column: 3 / span 2;
}

/* ======== ESTILOS BASE ======== */

.mural-item {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* evita que la imagen se salga */
}

/* ======== IMÁGENES — AJUSTE PERFECTO ======== */

.mural-img {
  width: 100%;
  height: 100%;
  background-size: cover;          /* llena el espacio sin deformarse */
  background-position: center;     /* centra la imagen */
  background-repeat: no-repeat;    /* evita repeticiones */
}

/* RUTAS DE IMÁGENES */
.mural-img-1 { background-image: url('../img/fondo1.JPG'); }
.mural-img-2 { background-image: url('../img/2.png'); }
.mural-img-3 { background-image: url('../img/3.png'); }
.mural-img-4 { background-image: url('../img/4.jpg'); }
.mural-img-5 { background-image: url('../img/5.png'); }
.mural-img-6 { background-image: url('../img/6.png'); }

/* ======== TEXTOS ======== */

.mural-text {
  background:var(--nsd-color);
  color: #f5f5f5;
  padding: 40px 30px;
  flex-direction: column;
  text-align: left;
}

.mural-text h3 {
  font-size: 22px;
  margin-bottom: 12px;
  font-weight: 700;
}

.mural-text p {
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

/* Variante */

.mural-text-2 {
  background: var(--nsd-color);
  color: #f5f5f5;
  padding: 40px 30px;
  flex-direction: column;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mural-text-2 h3 {
  font-size: 22px;
  margin-bottom: 12px;
  text-align: center;
}

.mural-text-2 p {
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.mural-text-3 {
  background: var(--nsd-color);
  color: #f5f5f5;
  padding: 40px 30px;
  flex-direction: column;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mural-text-3 h3 {
  font-size: 22px;
  margin-bottom: 12px;
  text-align: center;
}

.mural-text-3 p {
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.mural-text-4 {
  background: var(--nsd-color);
  color: #f5f5f5;
  padding: 40px 30px;
  flex-direction: column;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mural-text-4 h3 {
  font-size: 22px;
  margin-bottom: 12px;
  text-align: center;
}

.mural-text-4 p {
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.btn-primary-mural {
    display: inline-block;
    padding: 14px 34px;
    background: var(--nsd-color); /* azul corporativo */
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    border-radius: 50px; /* forma de píldora */
    text-decoration: none;
    border: 0px solid var(--nsd-color);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-align: center;
    box-sizing: border-box;
}

/* HOVER — estilo invertido */
.btn-primary-mural:hover {
    background: #ffffff;
    color: var(--nsd-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}


.btn-primary-mural:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

/* ======== RESPONSIVE ======== */

@media (max-width: 900px) {
  .mural-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 220px;
  }

  .mural-img-wide {
    grid-column: span 2; /* ocupa toda la fila */
  }
}

@media (max-width: 600px) {
  .mural-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .mural-img-wide {
    grid-column: span 1;
  }
}

/* ============================
   BLOQUE PROMOCIONAL NSD-FARMACIA
============================ */

.promo-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
    width: 100%;
    background: #f9f9f9;
}

/* COLUMNA IZQUIERDA */
.promo-left {
    background: var(--nsd-color);/* color corporativo oscuro */
    color: white;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-left {
    position: relative; /* Necesario para que el búho no se escape del bloque */
    /* Tus estilos actuales se mantienen igual */
}

.buho-referencia-linea {
    position: absolute;
    /* TAMAÑO FIJO: En píxeles no cambia nunca */
    width: 100px;           
    height: auto;
    right: 50px;            
    top: 308px;               
    transform: translateY(-50%); 
    z-index: 10;
    pointer-events: none;       
    /* SEGURIDAD: Evita que flexbox lo estire */
    flex-shrink: 0;
    object-fit: contain;
}

/* Ajuste para pantallas pequeñas (Móviles) */
@media (max-width: 768px) {
    .buho-referencia-linea {
        display: none; /* Oculta el búho en móviles para que no tape el texto */
    }
}

.promo-left h2 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.promo-left p {
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* COLUMNA DERECHA */
.promo-right {
    position: relative;
    overflow: hidden;
}

.promo-img {
    width: 100%;
    height: 100%;
    background: url('../img/fondo1.JPG') center/cover no-repeat;
}

/* BADGE REDONDO */
.promo-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    color: #0a4f55;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.btn-primary-farmacia {
    display: inline-block;
    padding: 14px 34px;
    background: #f9f9f9; /* azul corporativo */
    color: var(--nsd-color);
    font-weight: 600;
    font-size: 16px;
    border-radius: 50px; /* forma de píldora */
    text-decoration: none;
    border: 2px solid var(--nsd-color);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

/* HOVER — estilo invertido */
.btn-primary-farmacia:hover {
    background: #ffffff;
    color: var(--nsd-color);
    border-color: var(--nsd-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.promo-title-web {
    position: relative;
    display: inline-block;
    font-size: 38px;
    font-weight: 700;
    color: #ffffff; /* texto blanco */
    margin-bottom: 25px;
}

.promo-title-web::after {
    content: "";
    position: absolute;
    bottom: -15px;      /* distancia de la línea al texto */
    left: 0;
    width: 120px;        /* largo de la línea */
    height: 4px;        /* grosor */
    background: #ffffff; /* color blanco */
    border-radius: 2px;
}


/* RESPONSIVE */
@media (max-width: 900px) {
    .promo-block {
        grid-template-columns: 1fr;
    }

    .promo-right {
        height: 300px;
    }
}



        /* ============================
        PÁGINA NOSOTROS (VALORES + MISIÓN + HISTORIA + QUÉ HACEMOS)
        ============================ */

/* ============================
   HERO NOSOTROS (FOTO + TEXTO)
============================ */

.about-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
    padding: 60px;
    align-items: center;
    gap: 40px;
    background: #f9f9f9;
    padding-top: 130px;
}

.about-hero-content {       
    max-width: 550px;
}

.about-hero-content h1 {
    font-size: 48px;
    color: #09373b;
    margin-bottom: 20px;
    font-weight: 700;
}

.about-hero-content h2 {
    font-size: 36px;
    color: #09373b;
    margin-bottom: 20px;
    position: relative;
}

.about-hero-content h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--nsd-color);
    border-radius: 2px;
}

.about-hero-content p {
    font-size: 18px;
    color: #444;
    line-height: 1.7;
    margin-bottom: 30px;
    text-align: justify;
}

.about-hero-image {
    width: 100%;
    height: 450px;
    border-radius: 15px;
    background: url('../img/nosotros-hero.jpg') center/cover no-repeat;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Responsive */
@media(max-width: 900px) {
    .about-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 20px;
    }

    .about-hero-image {
        height: 300px;
        margin-top: 20px;
    }

    .about-hero-content {
        margin: 0 auto;
    }
}

/* ============================
   SECCIÓN HISTORIA — ESTILO SITOUR
============================ */

.about-history {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
    padding: 0;
    background: var(--nsd-color); /* fondo corporativo */
    align-items: stretch;
}

/* COLUMNA IZQUIERDA */
.about-history-content {
    padding: 60px 50px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* TÍTULO CON LÍNEA BLANCA */
.about-history-title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    color: white;
}

.about-history-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: white; /* línea blanca */
    border-radius: 2px;
}

/* TEXTO */
.about-history-content p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 18px;
    color: #e8e8e8;
    text-align: justify;
}

/* COLUMNA DERECHA (IMAGEN) */
.about-history-image {
    background: url('../img/nosotros-historia.jpg') center/cover no-repeat;
    width: 100%;
    height: 100%;
}


/* RESPONSIVE */
@media(max-width: 900px) {
    .about-history {
        grid-template-columns: 1fr;
    }

    .about-history-image {
        height: 300px;
    }

    .about-history-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .about-history-content {
        text-align: center;
    }
}

/* ============================
   SECCIÓN HISTORIA INVERTIDA
============================ */

.about-history-inverted {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
    width: 100%;
    background: var(--nsd-color); /* fondo corporativo */
    align-items: stretch;
    padding: 0;
}

/* COLUMNA IZQUIERDA (IMAGEN) */
.about-history-inverted-image {
    background: url('../img/imagen-relleno.jpg') center/cover no-repeat;
    width: 100%;
    height: 100%;
}

/* COLUMNA DERECHA (TEXTO) */
.about-history-inverted-content {
    padding: 60px 50px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* TÍTULO CON LÍNEA BLANCA */
.about-history-inverted-title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    color: white;
}

.about-history-inverted-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: white;
    border-radius: 2px;
}

/* TEXTO */
.about-history-inverted-content p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 18px;
    color: #e8e8e8;
    text-align: justify;
}

/* RESPONSIVE */
@media(max-width: 900px) {
    .about-history-inverted {
        grid-template-columns: 1fr;
    }

    .about-history-inverted-image {
        height: 300px;
    }

    .about-history-inverted-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .about-history-inverted-content {
        text-align: center;
    }
}

/* ============================================
   SECCIÓN QUÉ HACEMOS
============================================ */

.what-we-do {
    padding: 80px 60px;
    background: #f9f9f9;
    text-align: center;
    padding-top: 20px;

}

.what-we-do h2 {
    font-size: 36px;
    color: #09373b;
    margin-bottom: 50px;
    position: relative;
}

.what-we-do h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--nsd-color);
    border-radius: 2px;
}

/* Grid */
.wwd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

/* Item */
.wwd-item {
    background: #ffffff;
    padding: 35px 25px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transition: 0.35s ease;
    border: 2px solid transparent;
}

.wwd-item:hover {
    transform: translateY(-8px);
    border-color: var(--nsd-color);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
}

/* Iconos */
.wwd-item i {
    font-size: 40px;
    color: var(--nsd-color);
    margin-bottom: 15px;
    transition: 0.3s ease;
}

.wwd-item:hover i {
    color: #0a4f55;
}

/* Títulos */
.wwd-item h3 {
    font-size: 20px;
    color: #09373b;
    margin-bottom: 10px;
}

/* Texto */
.wwd-item p {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

/* Responsive */
@media(max-width: 900px) {
    .what-we-do {
        padding: 60px 20px;
    }
}

/* ==========================================================================
   SECCIONES: PROCESO, ESTADÍSTICAS Y CTA
   ========================================================================== */

/* --- SECCIÓN PROCESO (NUEVA) --- */
.about-process {
    padding: 80px 20px;
    background-color: #f9f9f9;
    text-align: center;
}

.process-steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto 0;
}

.step-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 250px;
    position: relative;
    transition: transform 0.3s;
    text-align: left; /* Alineado a la izquierda para mejor lectura del proceso */
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(0, 123, 131, 0.15); /* Tu color corporativo muy suavizado */
    position: absolute;
    top: 20px;
    right: 30px;
    line-height: 1;
}

.step-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
    padding-right: 40px; /* Evita que el texto choque con el número */
}

.step-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}


/* --- SECCIÓN ESTADÍSTICAS (MÁS DELGADA) --- */
.about-stats {
    background: linear-gradient(135deg, #004d51, #007b83);
    color: white;
    padding: 35px 20px; /* Franja estilizada y estrecha */
    text-align: center;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.stat-item {
    flex: 1;
    min-width: 180px;
}

.stat-number {
    font-size: 2.8rem; /* Tamaño equilibrado para el nuevo grosor */
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 300;
}


/* --- SECCIÓN CTA FINAL --- */
.about-cta {
    padding: 100px 20px;
    text-align: center;
    background: url(../img/test.jpg) center/cover no-repeat;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.btn-cta {
    display: inline-block;
    background-color: #007b83;
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.btn-cta:hover {
    background-color: #004d51;
    transform: scale(1.05);
}

.btn-cta i {
    margin-left: 10px;
}


/* ==========================================================================
   MEDIA QUERIES (ADAPTACIÓN A MÓVILES Y TABLETS)
   ========================================================================== */

@media (max-width: 992px) {
    .process-steps {
        flex-direction: column; /* Apila las tarjetas de proceso */
        align-items: center;
    }

    .step-card {
        width: 100%;
        max-width: 500px;
    }

    .about-process, .about-cta {
        padding: 60px 20px; /* Reducimos paddings generales */
    }

    .cta-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .stats-container {
        flex-direction: column; /* Apila las estadísticas en móviles */
        gap: 30px;
    }
    
    .about-stats {
        padding: 50px 20px; /* Un poco más de espacio vertical en móvil para que respire */
    }

    .stat-item {
        width: 100%;
        max-width: 300px;
    }
}

/* ============================================
   ANIMACIONES SCROLL REVEAL
============================================ */

/* Estado inicial: oculto y desplazado */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

/* Estado visible: aparece suavemente */
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);

}

.reveal-down {
    opacity: 0;
    transform: translateY(-40px);
    transition: all 0.8s ease;
}

/* Estado visible: aparece suavemente */
.reveal-down.active {
    opacity: 1;
    transform: translateY(0);

}

/* ============================================
   ANIMACIÓN SCROLL REVEAL 2 (slide-left)
============================================ */

/* Estado inicial */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.9s ease;
}

/* Estado visible */
.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Estado inicial */
.reveal-left-video {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 1.5s ease;
}

/* Estado visible */
.reveal-left-video.active {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   ANIMACIÓN SCROLL REVEAL 3 (slide-right)
============================================ */

/* Estado inicial */
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.9s ease;
}

/* Estado visible */
.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ============================
   BLOG HERO - PÁGINA BLOG
============================ */

/* ---------------- HERO DEL BLOG ---------------- */

.blog-hero {
    width: 100%;
    height: 350px;
    background: url('../img/fondo1.JPG') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.blog-hero-inner h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
}

.blog-hero-inner p {
    font-size: 18px;
    color: white;
    margin-top: 10px;
}

/* ================================================================
   SECCIÓN BLOG (UNIFICADA CON ESTILO NSD)
   ================================================================ */

.blog-layout {
    padding: 80px 0;
    background-color: #fcfcfc; /* Un gris muy sutil para que resalten las tarjetas blancas */
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

/* ---------------- TARJETAS DE POSTS ---------------- */

.post-card {
    background: white;
    border-radius: 20px; /* Bordes más redondeados como tus botones */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Sombra más suave y moderna */
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(17, 100, 108, 0.1); /* Sombra con tu color corporativo */
}

.post-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}

.post-card-body {
    padding: 35px;
}

.post-card-body h2 {
    margin-bottom: 15px;
}

.post-card-body h2 a {
    font-size: 28px;
    font-weight: 700;
    color: #09373b; /* El verde oscuro de tu marca */
    text-decoration: none;
    line-height: 1.2;
}

.post-card-body h2 a:hover {
    color: var(--nsd-color);
}

.post-date {
    display: inline-block;
    margin-bottom: 15px;
    color: #888;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-excerpt {
    color: #555;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 16px;
}

/* BOTÓN LEER MÁS (Estilo similar a btn-nav) */
.post-readmore {
    display: inline-block;
    background: var(--nsd-color);
    color: white !important;
    padding: 10px 25px;
    border-radius: 30px; /* Botón tipo píldora como el de 'Contactar' */
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
}

.post-readmore:hover {
    background: #0a4f55;
    transform: scale(1.05);
}

/* ---------------- SIDEBAR ---------------- */

.sidebar-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.sidebar-box h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 700;
    color: #09373b;
    position: relative;
    padding-bottom: 10px;
}

.sidebar-box h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--nsd-color);
}

#search-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
    transition: 0.3s;
}

#search-input:focus {
    border-color: var(--nsd-color);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.sidebar-list li:last-child { border: none; }

.sidebar-list li a {
    text-decoration: none;
    color: #444;
    transition: 0.3s;
    font-size: 15px;
}

.sidebar-list li a:hover {
    color: var(--nsd-color);
    padding-left: 5px;
}

/* ---------------- RESPONSIVE ---------------- */

@media(max-width: 900px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card img {
        height: 200px;
    }
}



/* ============================
   HERO DEL POST
============================ */

.post-hero {
    width: 100%;
    height: 380px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.post-hero h1 {
    font-size: 42px;
    font-weight: 700;
    color: #09373b;
    margin-bottom: 10px;
        word-break: break-word;
    overflow-wrap: break-word;
}

.post-hero .post-date {
    font-size: 16px;
    color: #777;
}

.post-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #09373b;
        word-break: break-word;
    overflow-wrap: break-word;
    
}

.sidebar-list li a {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ============================
   LAYOUT GENERAL DEL POST
============================ */

.post-layout {
    padding: 60px 0;
}

.post-grid {
    display: grid;
    grid-template-columns: 1fr 320px; /* Sidebar más ancha que antes */
    gap: 50px;
    max-width: 90%; /* Más ancho que antes */
    margin: auto;
}


/* ============================
   CONTENIDO DEL POST
============================ */

/* ================================================================
   CONTENIDO DEL POST (POST.PHP) - ESTILO UNIFICADO
   ================================================================ */

.post-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px; /* Unificado con las tarjetas del blog */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    word-break: break-word;
    overflow-wrap: break-word;
    border: 1px solid #f0f0f0;
}

.post-featured {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 500px; /* Limitamos un poco la altura para que no ocupe toda la pantalla */
    object-fit: cover;
    border-radius: 15px;
    display: block;
    margin-bottom: 35px;
}

.post-content h2 {
    font-size: 32px;
    margin: 30px 0 15px;
    color: #09373b; /* Verde oscuro NSD */
    font-weight: 700;
}

.post-content p {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 25px;
}

/* Imágenes dentro del texto del artículo */
.post-content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* ============================
   COMENTARIOS
============================ */

.comments-section {
    margin-top: 80px;
}
.comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

.comments-section h3 {
    font-size: 26px;
    margin-bottom: 25px;
    color: #09373b;
    font-weight: 700;
}

.comment {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    /* ESTO ES LO IMPORTANTE */
    word-wrap: break-word;       /* Compatibilidad antigua */
    overflow-wrap: break-word;   /* Estándar moderno: rompe palabras largas */
    word-break: break-word;      /* Asegura el salto en navegadores específicos */
    hyphens: auto;               /* Opcional: añade guiones si el idioma está configurado */
}

.comment strong {
    color: var(--nsd-color);
    font-size: 16px;
}

.comment p {
    margin-top: 10px;
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

/* FORMULARIO DE COMENTARIOS */
.comment-form {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #eee;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--nsd-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 100, 108, 0.1);
}

.comment-form button {
    width: fit-content;
    padding: 12px 30px;
    background: var(--nsd-color);
    color: white;
    border: none;
    border-radius: 30px; /* Estilo píldora como el resto de la web */
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.comment-form button:hover {
    background: #0a4f55;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 100, 108, 0.2);
}

/* ============================
   SIDEBAR (Post Interior)
============================ */

.blog-sidebar {
    position: sticky;
    top: 100px;
}

/* Reutiliza los estilos del sidebar del listado para coherencia */

.sidebar-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.sidebar-box h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #09373b;
}

.sidebar-box input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 15px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
}

.sidebar-list li {
    margin-bottom: 12px;
}

.sidebar-list a {
    text-decoration: none;
    color: #444;
    font-size: 16px;
}

.sidebar-list a:hover {
    color: var(--nsd-color);
}


/* ============================
   RESPONSIVE
============================ */

@media(max-width: 900px) {
    .post-grid {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .post-hero h1 {
        font-size: 32px;
    }
}

/* ==== INDEX ADMIN ==== */

.blog-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: break-word;
}


.post-edit {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 14px;
    background: #ff9800;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}

.post-edit:hover {
    background: #e68900;
}



/* ==========================================================================
   NUEVA SECCIÓN: CENTRO DE DESCARGAS PÚBLICO (CORREGIDO)
   ========================================================================== */

/* Contenedor principal con margen superior para no chocar con el header fixed */
.descargas-public-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px 20px; /* 120px arriba da espacio suficiente para el menú */
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

/* Bloque de bienvenida centrado y limpio */
.descargas-welcome {
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
}

.descargas-welcome h1 {
    color: #09373b;
    font-size: 36px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.descargas-welcome p {
    color: #889898;
    font-size: 16px;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   VENTANA MODAL: VISOR DE PDF PÚBLICO (DESCARGAS)
   ========================================================================== */

/* Capa oscura total de fondo */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 35, 38, 0.88); /* Color verde oscuro de NSD con opacidad */
    backdrop-filter: blur(5px); /* Filtro de desenfoque moderno */
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Estado activo del modal */
.modal-overlay.modal-active {
    opacity: 1;
    pointer-events: auto;
}

/* Tarjeta flotante interna */
.modal-container {
    background: #ffffff;
    width: 90%;
    max-width: 1100px;
    height: 85vh;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(40px);
    transition: transform 0.3s ease;
}

.modal-overlay.modal-active .modal-container {
    transform: translateY(0);
}

/* Botón flotante para la X de cerrar */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #e1e8e8;
    color: #09373b;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 100000;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.modal-close-btn:hover {
    background: #ff7675; /* Color sutil de alerta */
    color: #ffffff;
    border-color: #ff7675;
    transform: scale(1.08);
}

.modal-body {
    flex: 1;
    width: 100%;
    height: 100%;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Cambiamos el comportamiento visual para que el botón dinámico actúe bien */
button.btn-resource-view {
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    outline: none;
}

@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        height: 88vh;
    }
    .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

/* ==========================================================================
   REJILLA PÚBLICA DE CATÁLOGOS CON PORTADA (NUEVO)
   ========================================================================== */

/* Contenedor Grid general */
.descargas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Tarjeta individual del catálogo */
.resource-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #eef2f3;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Envoltorio de la imagen de portada */
.resource-cover-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f7f9fa;
    overflow: hidden;
}

.resource-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.resource-card:hover .resource-cover-img {
    transform: scale(1.03);
}

/* Etiqueta tipo (Catálogo / Manual) flotando arriba */
.resource-badge-tipo {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(30, 39, 46, 0.9);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Cuerpo del texto */
.resource-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.resource-card-body h3 {
    margin: 0 0 10px 0;
    font-size: 17px;
    color: #1e272e;
    font-weight: 600;
    line-height: 1.4;
}

.resource-card-body p {
    margin: 0;
    font-size: 13.5px;
    color: #7f8c8d;
    line-height: 1.6;
    flex-grow: 1; /* Esto hace que los botones siempre queden alineados abajo uniformemente */
}

/* Botones inferiores de Ver y Descargar */
.resource-actions {
    padding: 0 20px 20px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.resource-actions a {
    text-decoration: none;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-resource-view {
    background: #f1f3f5;
    color: #2c3e50;
}

.btn-resource-view:hover {
    background: #e2e6ea;
}

.btn-resource-download {
    background: #1e272e;
    color: #ffffff;
}

.btn-resource-download:hover {
    background: #2f3640;
}

/* Estado de lista vacía */
.descargas-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #b2bec3;
}

.descargas-empty-state i {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

/* ==========================================================================
   TARJETA DE VÍDEO — diseño con embed + badge verde + botón YouTube
   ========================================================================== */

/* El wrapper de portada en modo vídeo tiene ratio 16:9 y no altura fija */
.resource-cover-wrapper--video {
    height: 180px;
    background: #000;
}

/* El iframe ocupa todo el wrapper */
.resource-video-embed {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Badge verde para vídeos (sobreescribe el negro por defecto) */
.resource-badge-tipo--video {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #1e8449;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
    width: fit-content;
}

/* Zona de acciones para tarjeta de vídeo: columna única, ancho completo */
.resource-actions--video {
    grid-template-columns: 1fr;
    padding: 0 20px 20px;
}

/* Botón grande "Ver en YouTube" */
.btn-youtube-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    background: #c01515;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 7px;
    text-decoration: none;
    transition: background 0.2s ease;
    box-sizing: border-box;
}

.btn-youtube-full:hover {
    background: #0d47a1;
}

.btn-youtube-full i {
    font-size: 16px;
}


/* ==========================================================================
   PESTAÑAS DE CATEGORÍA — PÁGINA DESCARGAS
   Para añadir una nueva categoría en el futuro solo añade su tipo en la BD,
   el JS genera la pestaña automáticamente sin tocar el CSS.
   ========================================================================== */

.descargas-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eef2f3;
}

.descargas-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 50px;
    border: 2px solid #dde4e4;
    background: #ffffff;
    color: #445454;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.descargas-tab:hover {
    border-color: #11646c;
    color: #11646c;
    background: #f0f8f8;
}

.descargas-tab--active {
    background: #11646c;
    border-color: #11646c;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(17, 100, 108, 0.25);
}

.descargas-tab--active:hover {
    background: #0a4f55;
    border-color: #0a4f55;
    color: #ffffff;
}

.descargas-tab i {
    font-size: 13px;
}

@media (max-width: 600px) {
    .descargas-tabs {
        gap: 8px;
    }
    .descargas-tab {
        padding: 8px 16px;
        font-size: 12.5px;
    }
}