@import url("variables.css");

/* ========================================
   PÁGINA RESPONSABILIDADES - ESTILOS OPTIMIZADOS
   ======================================== */

/* Variables CSS */
:root {
  --responsabilidades-bg: #408362;
  /*--responsabilidades-text: white;*/
  --responsabilidades-accent: #e6e6e6;
  --responsabilidades-secondary: #2e600b;
  --responsabilidades-spacing: clamp(2rem, 4vw, 5rem);
  --responsabilidades-transition:
    transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* ========================================
   CORRECCIÓN DE LÍNEA BLANCA
   ======================================== */
body {
  margin: 0;
  padding: 0;
}

/* Fondo específico para la página de Responsabilidades */
body.responsabilidades-page {
  background-image: url("/Imagenes/ImagenesCorrecion/SubImagenNoticias.jpeg");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
}

.responsabilidades-hero {
  margin-top: 0;
  padding-top: 0;
}

.caprichos {
  font-family: "", sans-serif;
}

/* Asegurar que no haya espacios en blanco */
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ========================================
   MEJORAS DEL MENÚ HAMBURGUESA
   ======================================== */
.hamburger-menu {
  z-index: var(--z-hamburger);
}

.nav-menu {
  z-index: var(--z-header);
}

.menu-overlay {
  z-index: var(--z-overlay);
}

/* Asegurar que el header esté correctamente posicionado */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* ========================================
   SECCIÓN PRINCIPAL RESPONSABILIDADES
   ======================================== */
.responsabilidades {
  background-color: var(--responsabilidades-bg);
  padding: var(--responsabilidades-spacing) 0;
  color: var(--responsabilidades-text);
}

.responsabilidades .container {
  max-width: min(1400px, 95%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}

.responsabilidades-titulo {
  text-align: left;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

/* ========================================
   BOTONES ACTIVOS
   ======================================== */
.responsabilidad-btn.activo {
  background-color: var(--responsabilidades-accent) !important;
  color: white !important;
}

/* ========================================
   CONTENIDO DINÁMICO
   ======================================== */
.responsabilidad-contenido {
  margin-top: clamp(2rem, 4vw, 3rem);
  transition: all 0.3s ease;
}

.contenido-placeholder {
  text-align: center;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 2.5vw, 1.25rem);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
}

.contenido-placeholder h3 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 1.25rem;
  color: var(--responsabilidades-text);
  font-weight: 600;
}

.contenido-placeholder p {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

/* ========================================
   DETALLE DE RESPONSABILIDAD
   ======================================== */
.responsabilidad-detalle {
  background: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.responsabilidad-header {
  background-color: #3b5145;
  padding: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}

.responsabilidad-header h2 {
  color: white;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0;
}

.responsabilidad-header h2::after {
  display: none;
}

.responsabilidad-body {
  display: flex;
  gap: clamp(2rem, 4vw, 2.5rem);
  padding: clamp(2rem, 4vw, 2.5rem);
}

.responsabilidad-imagen {
  flex: 0 0 clamp(250px, 25vw, 300px);
  border-radius: 10px;
  overflow: hidden;
}

.responsabilidad-imagen img {
  width: 100%;
  height: clamp(200px, 20vw, 250px);
  object-fit: cover;
  transition: transform 0.3s ease;
}

.responsabilidad-imagen:hover img {
  transform: scale(1.05);
}

.responsabilidad-info {
  flex: 1;
  color: #333;
}

.responsabilidad-descripcion {
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.responsabilidad-descripcion p {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  line-height: 1.7;
  color: black;
  margin: 0;
}

.responsabilidad-caracteristicas {
  display: grid;
  gap: clamp(1rem, 2vw, 1.25rem);
}

.responsabilidad-caracteristica {
  background: #f8f9fa;
  padding: clamp(1.25rem, 2.5vw, 1.5rem);
  border-radius: 10px;
  border-left: 4px solid var(--responsabilidades-accent);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.responsabilidad-caracteristica:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.responsabilidad-caracteristica h4 {
  color: black;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  font-weight: 700;
  margin: 0 0 0.8rem 0;
}

.responsabilidad-caracteristica p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/* ========================================
   CARRUSEL DE RESPONSABILIDADES
   ======================================== */
.responsabilidades-carousel .carousel-slide {
  width: 200%;
}

.responsabilidades-carousel .carousel-item {
  flex: 0 0 50%;
  height: 100%;
  width: 50%;
  min-width: 50%;
}

/* ========================================
   SECCIÓN TEXTO RESPONSABILIDAD
   ======================================== */
.responsabilidad-texto {
  background-color: var(--responsabilidades-accent);
  padding: var(--responsabilidades-spacing) 0;
  color: var(--responsabilidades-text);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 1);
}

.responsabilidades-texto-container {
  max-width: min(1200px, 95%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  text-align: center;
}

.responsabilidades-texto-container h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  color: black;
}

.responsabilidades-texto-container h2::after {
  display: none;
}

.responsabilidades-texto-parrafo {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  line-height: 1.8;
  color: black;
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 2px solid #111111a4;
  border-radius: 10px;
}

/* ========================================
   SECCIÓN IMAGEN RESPONSABILIDADES
   ======================================== */
.imagenresponsabilidades {
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.imagenresponsabilidades img {
  width: 100%;
  height: clamp(200px, 25vw, 400px);
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Efecto Parallax para la sección imagenresponsabilidades */
.imagenresponsabilidades {
  position: relative;
  height: 400px;
  overflow: hidden;
  opacity: 0.5;
  /* Optimizaciones para iOS */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

.imagenresponsabilidades img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, 0, 0);
  /* Optimizaciones específicas para iOS */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
  /* Eliminar transiciones que pueden interferir con el parallax */
  transition: none;
}

/* Movimiento Parallax - Clase para activar manualmente si es necesario */
.imagenresponsabilidades.parallax-active img {
  transform: translate3d(0, -20%, 0);
}

/* Optimizaciones específicas para iOS */
@supports (-webkit-touch-callout: none) {
  .imagenresponsabilidades {
    /* Forzar aceleración por hardware en iOS */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    perspective: 1000px;
    -webkit-perspective: 1000px;
  }

  .imagenresponsabilidades img {
    /* Optimizaciones específicas para iOS Safari */
    transform: translate3d(0, 0, 0) scale(1.1);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
  }
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .imagenresponsabilidades {
    height: 300px;
  }

  .imagenresponsabilidades img {
    /* Optimizaciones adicionales para móviles */
    transform: translate3d(0, 0, 0) scale(1.05);
  }
}

@media (max-width: 480px) {
  .imagenresponsabilidades {
    height: 250px;
  }

  .imagenresponsabilidades img {
    /* Optimizaciones para móviles pequeños */
    transform: translate3d(0, 0, 0) scale(1.02);
  }
}

/* ==============================
   ESTILOS ADICIONALES: NOTICIAS
   ============================== */

.noticias-overview {
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.04));
}

.tarjetas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (max-width: 1000px) {
  .tarjetas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tarjetas-grid {
    grid-template-columns: 1fr;
  }
}

.tarjeta {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tarjeta .tarjeta-imagen img {
  height: 180px;
  object-fit: cover;
  display: block;
  width: 100%;
}

.tarjeta-contenido {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tarjeta-contenido h3 {
  margin-top: 0;
}

.tarjeta-contenido p {
  flex-grow: 1;
  margin-bottom: 20px;
}

.noticias-detalle {
  background-color: #408362;
  margin-bottom: 2px;
  padding: 1px;
}

/* Ajustes para el carousel de miniaturas */

.carousel-gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.carousel-thumb {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 8px;
  flex: 0 0 auto;
  cursor: pointer;
}

.carousel-thumb img {
  display: block;
  height: 100px;
  width: 150px;
  object-fit: cover;
  border-radius: 8px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.carousel-thumb:focus img,
.carousel-thumb:hover img {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 1rem;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.modal-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.modal-content figure {
  margin: 0;
}

.modal-content figcaption {
  margin-top: 0.75rem;
  color: #333;
  font-weight: 600;
}

/* Estilos del carrusel de eventos y modal movidos al componente:
   /Components/noticiasCarruselComponent/noticiasCarruselComponent.css */

/* pequeños ajustes responsivos */
@media (max-width: 700px) {
  .responsabilidad-body {
    flex-direction: column;
  }

  .responsabilidad-imagen {
    flex: 0 0 auto;
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets */
@media (max-width: 768px) {
  .responsabilidad-body {
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2rem);
  }

  .responsabilidad-imagen {
    flex: none;
    width: 100%;
  }

  .actividad-item {
    flex-direction: column !important;
    gap: clamp(1.25rem, 2.5vw, 1.5rem);
    min-height: auto;
  }

  .actividad-texto {
    order: 1;
  }

  .actividad-imagen {
    order: 2;
    width: 100%;
  }

  .actividad-imagen img {
    width: 100%;
    height: clamp(180px, 25vw, 250px);
    max-width: none;
  }
}

/* Móviles */
@media (max-width: 480px) {
  .targetasresponsabilidades-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3vw, 2rem);
  }

  .targeta-responsabilidad p {
    max-width: 400px;
  }
}

/*Noticias Generales*/
.gildan-life {
  max-width: 100%;
  background-color: var(--bg-light);
  margin-bottom: 2px;
  padding-top: 0.1px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 1);
}

.gildan-header {
  text-align: center;
  margin-bottom: 50px;
}

.gildan-header h1 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 15px;
}

.gildan-header h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #3b5145;
}

.gildan-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 50px !important;
  padding: 0 20px;
}

.info-row {
  display: flex;
  align-items: center;
  min-height: 350px;
  border-radius: 10px;
  overflow: hidden;
}

.info-image {
  flex: 0 0 45%;
  height: 100%;
  overflow: hidden;
}

.info-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.info-row:hover .info-image img {
  transform: scale(1.05);
}

.info-content {
  flex: 0 0 55%;
  padding: 40px;
}

/* Filas con imagen a la izquierda */
.image-left {
  flex-direction: row;
}

/* Filas con imagen a la derecha */
.image-right {
  flex-direction: row-reverse;
}

/* Responsive */
@media (max-width: 900px) {
  .info-row {
    flex-direction: column !important;
    min-height: auto;
  }

  .info-image {
    width: 100%;
    height: 250px;
  }

  .info-content {
    width: 100%;
    padding: 30px;
  }
}

.gildan-card {
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.gildan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-content {
  padding: 30px;
}

.card-content h2 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 15px;
}

.card-content p {
  color: #555;
  margin-bottom: 25px;
  line-height: 1.7;
}

.card-button {
  display: inline-block;
  background: #3b5145;
  color: white;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
}

.card-button:hover {
  background: var(--bg-dark);
  transform: translateY(-2px);
}

.internship-section {
  background: white;
  border-radius: 10px;
  padding: 40px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  position: relative;
}

.internship-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(to right, transparent, #ddd, transparent);
}

.internship-section h2 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 20px;
}

.internship-section p {
  color: #555;
  max-width: 800px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .gildan-grid {
    grid-template-columns: 1fr;
  }

  .gildan-header h1 {
    font-size: 2rem;
  }

  .card-content h2 {
    font-size: 1.5rem;
  }

  .internship-section {
    padding: 30px 20px;
  }
}

/* ========================================
   ESTILO ESPECÍFICO PARA EL VIDEO DE RESPONSABILIDADES
   ======================================== */
.responsabilidades-page .hero-static video {
  object-position: center 20%;
}

/* ========================================
   BOTONES MEJORADOS PARA TARJETAS DE NOTICIAS
   ======================================== */
.responsabilidad-btn {
  /* Ancho completo de la tarjeta */
  width: 100%;

  /* Posicionamiento en la parte inferior */
  margin-top: auto;

  /* Estilos base consistentes con la página */
  background-color: #e6e6e6;
  color: black;
  border: none;
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

/* Responsive para los botones */
@media (max-width: 768px) {
  .responsabilidad-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .responsabilidad-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}
