/* Estilos generales */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding-top: 100px;
    background-color: #f8f9fa;
    color: #333;
}

/* Encabezado */
.header {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 600;
}

/* Logo en el menú */
.menu-logo {
    max-width: 150px;
    /* Ajusta el tamaño del logo */
    height: auto;
}

/* Compensación automática para navegación con anclas */
section[id] {
    scroll-margin-top: 90px;
}

/* Sección Hero */
.hero {
    height: 60vh;
    min-height: 450px;
    max-height: 700px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(52, 58, 64, 0.8)), url('../images_sitio/hero/hero-background.jpg') center/cover no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive para hero */
@media (max-width: 768px) {
    .hero {
        height: 50vh;
        min-height: 350px;
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 45vh;
        min-height: 300px;
    }
}

.hero-details {
    padding: 2rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: bold;
}

.hero p {
    font-size: 1.5rem;
}

/* Botón primario */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

/* Carrusel */
.carousel-inner img {
    border-radius: 10px;
    object-fit: contain;
    /* Ajusta la imagen sin recortarla */
    width: 100%;
    /* Asegura que la imagen ocupe todo el ancho del contenedor */
    height: 100%;
}

/* .card {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
} */

/* Tarjetas de Noticias */
.card {
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    /* Evita que la imagen sobresalga */
    display: flex;
    flex-direction: column;
}

.card-img-top {
    width: 100%;
    height: 200px;
    /* Altura fija para la imagen */
    object-fit: cover;
    /* Asegura que la imagen cubra el área sin deformarse */
}

.card-body {
    padding: 15px;
    flex-grow: 1;
    /* Hace que el cuerpo de la tarjeta ocupe el espacio restante */
}

.card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Drawer de Noticias */
.drawer {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    width: 90vw;
    max-width: 1200px;
    height: 100%;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    padding: 0;
    overflow-y: auto;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.drawer.open {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Drawer responsivo para mobile */
@media (max-width: 768px) {
    .drawer {
        width: 100vw;
        max-width: 100%;
        border-radius: 0;
        height: 100%;
        top: 0;
    }
    
    .drawer.open {
        transform: translateX(-50%) scale(1);
    }
}

.close-btn {
    background: none;
    border: none;
    font-size: 30px;
    font-weight: bold;
    color: #343a40;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #007bff;
}

/* ==================== ESTILOS PARA ARTÍCULOS DE NOTICIAS ==================== */
.noticia-contenido {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.8;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.noticia-contenido h2 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: #212529;
    text-align: left;
}

.noticia-contenido .text-muted {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: #6c757d;
    font-style: italic;
}

.noticia-contenido img {
    display: block;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-width: 100%;
    height: auto;
}

.noticia-contenido .content-text {
    font-size: 1.1rem;
    color: #343a40;
    line-height: 1.9;
}

.noticia-contenido .content-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.noticia-contenido .content-text h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #212529;
    border-left: 4px solid #007bff;
    padding-left: 1rem;
}

.noticia-contenido .content-text strong {
    font-weight: 700;
    color: #212529;
}

.noticia-contenido .content-text em {
    font-style: italic;
    color: #495057;
}

.noticia-contenido .content-text ul,
.noticia-contenido .content-text ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.noticia-contenido .content-text li {
    margin-bottom: 0.8rem;
    color: #343a40;
}

.noticia-contenido .content-text blockquote {
    border-left: 4px solid #007bff;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    margin: 2rem 0;
    font-style: italic;
    color: #495057;
}

/* Responsivo para móvil */
@media (max-width: 768px) {
    .noticia-contenido {
        padding: 15px;
    }

    .noticia-contenido h2 {
        font-size: 1.6rem;
    }

    .noticia-contenido .content-text {
        font-size: 1rem;
    }

    .noticia-contenido .content-text h3 {
        font-size: 1.3rem;
    }
}

/* Pie de Página */
footer {
    background: #343a40;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}


pre {
    color: #343a40;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    overflow-x: auto;
    font-family: 'Poppins', sans-serif;
    white-space: pre-wrap;
    /* Permite que el texto se ajuste */
    word-wrap: break-word;
    text-align: left;
}

#map {
    width: 100%;
    height: -webkit-fill-available;
}

/* ================================================
   CONTACT CARD & MAP IMPROVEMENTS
   ================================================ */

/* Tarjeta de contacto mejorada */
.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.icon-location { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; 
}

.icon-phone { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); 
    color: white; 
}

.icon-email { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); 
    color: white; 
}

.icon-web { 
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); 
    color: white; 
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.contact-value {
    font-size: 1rem;
    color: #212529;
    font-weight: 500;
    word-break: break-word;
}

.contact-value a {
    color: #007bff;
}

.contact-value a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.contact-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.map-container {
    position: relative;
    height: 450px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.map-container #map {
    width: 100%;
    height: 100%;
}

.open-maps-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: white;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.open-maps-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (max-width: 991px) {
    .map-container {
        height: 350px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .contact-card {
        padding: 1.5rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .contact-actions {
        flex-direction: column;
    }
    
    .contact-actions .btn {
        width: 100%;
    }
}



.product-card {
    background: white;
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

.product-image {
    width: 100%;
    height: 250px;
    /* Altura fija para uniformidad */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: contain;
}

.card.producto.agotado {
    opacity: 0.5;
}

.offer-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: red;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
}

.soldout-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(50, 50, 50, 0.6);
    color: white;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: none;
    text-transform: uppercase;
}

.soldout-badge {
    background-color: #9e9e9e;
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #343a40;
    /* border-bottom: 3px solid #007bff;
    display: inline-block; */
    padding-bottom: 5px;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
}

.section-light {
    background-color: #f8f9fa;
    padding: 60px 20px;
}

.section-dark {
    background: linear-gradient(to bottom, #f8f9fa, #dee2e6);
    /* De blanco a un gris claro */
    color: #333;
    padding: 60px 20px;
}

.section-dark h2 {
    color: #007bff;
    /* Resalta los títulos en azul */
    border-bottom-color: #0056b3;
    /* Un azul más oscuro para diferenciar */
}


.section-divider {
    width: 60%;
    height: 3px;
    background: linear-gradient(to right, transparent, #007bff, transparent);
    margin: 40px auto;
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.portfolio img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.portfolio img:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.modal-content {
    background: black;
}

.carousel-item img {
    width: 100%;
    border-radius: 10px;
}

.carousel-control-prev,
.carousel-control-next {
    filter: invert(1);
}

.zoom-hover {
    overflow: hidden;
    display: inline-block;
}

.zoom-hover img {
    transition: transform 0.4s ease;
    display: block;
    width: 100%;
    height: auto;
}

.zoom-hover:hover img {
    transform: scale(1.1);
}

/* #gallery .video-item {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#gallery .video-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}
#gallery .video-item label {
  font-weight: 500;
  color: #555;
}
#gallery .video-item input,
#gallery .video-item textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 10px;
}
#gallery .btn-eliminar {
  background: transparent;
  border: none;
  color: #d9534f;
  cursor: pointer;
  font-size: 20px;
} */

/* ================================================
   GALERÍA DE VIDEOS YOUTUBE - RESPONSIVE
   ================================================ */

/* Contenedor principal */
.video-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Reproductor principal con aspect ratio 16:9 */
.main-video {
    width: 100%;
    margin-bottom: 30px;
}

.main-video .player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    background: #000;
}

.main-video .player-wrapper > div,
.main-video .player-wrapper iframe,
#playerGallery {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    border-radius: 12px;
}

/* Lista de miniaturas en grid responsive */
.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}

/* Scrollbar personalizado para la lista de videos */
.video-list::-webkit-scrollbar {
    width: 8px;
}

.video-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.video-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.video-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Cada item de video */
.video-item {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Estado activo del video */
.video-item.active {
    border: 2px solid #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.video-item.active .video-title {
    color: #0d6efd;
    font-weight: 600;
}

/* Miniatura del video */
.video-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    background: #e0e0e0;
}

/* Título del video */
.video-title {
    font-size: 13px;
    font-weight: 500;
    color: #2c2c2c;
    text-align: left;
    margin-top: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================
   RESPONSIVE BREAKPOINTS
   ================================================ */

/* Tablets grandes y desktop pequeño (768px - 1024px) */
@media (max-width: 1024px) {
    .video-gallery {
        max-width: 960px;
        padding: 30px 15px;
    }
    
    .video-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }
}

/* Tablets (600px - 768px) */
@media (max-width: 768px) {
    .video-gallery {
        padding: 20px 10px;
    }
    
    .main-video {
        margin-bottom: 20px;
    }
    
    .video-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .video-title {
        font-size: 12px;
        margin-top: 6px;
    }
}

/* Móviles (hasta 600px) */
@media (max-width: 600px) {
    .video-gallery {
        padding: 15px 5px;
    }
    
    .main-video > div {
        border-radius: 8px;
    }
    
    .video-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .video-item {
        padding: 8px;
    }
    
    .video-title {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
}

/* Móviles muy pequeños (hasta 400px) */
@media (max-width: 400px) {
    .video-list {
        grid-template-columns: 1fr;
    }
    
    .video-item {
        max-width: 280px;
        margin: 0 auto;
    }
}

.video-fluid {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    /* Opcional */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    /* Opcional */
}

.video-fluid iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.content-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #343a40;
    margin: 0;
    padding: 8px 0;
}

.content-description {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    color: #555;
    font-size: 14px;
    padding: 15px;
}

.content-detail {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #666;
    font-size: 13px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #007bff;
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}