/* ==========================================================================
   PLANTA EL RUBÍ | MINERA MH SAC
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Roboto:wght@300;400;500;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

:root {
  /* --- COLORES CORPORATIVOS PRINCIPALES --- */
  --gold: #e4b936;
  --gold-hover: #f2cb52;
  --gold-dark: #c59b20;
  --ruby: #7a081d;
  --ruby-dark: #7a081d;
  --ruby-light: #9c122b;

  /* --- PALETA NEUTRA Y FONDOS --- */
  --dark-bg: #7a081d;
  --dark-card: #7a081d;
  --dark-deep: #7a081d;
  --light-bg: #f8f9fa;
  --light-alt: #ffffff;
  --border-light: #e2e8f0;
  --border-dark: #7a081d;
  
  --text-dark: #1e293b;
  --text-muted: #525f70;
  --text-light: #f8fafc;
  --white: #94a3b8;
  --white: #ffffff;

  /* --- TIPOGRAFÍA --- */
  --font-main: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* --- SOMBRAS SUAVES Y BORDES (0px BORDER-RADIUS) --- */
  --radius: 0px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 18px 40px rgba(0, 0, 0, 0.16);
  --shadow-ruby: 0 12px 28px rgba(122, 8, 29, 0.35);

  /* --- TRANSICIONES NOTABLES Y FLUIDAS --- */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --trans-fast: 0.25s var(--ease);
  --trans-normal: 0.4s var(--ease);
  --trans-slow: 0.65s var(--ease);

  /* --- CONTENEDOR --- */
  --container-max: 1240px;
  --container: min(var(--container-max), calc(100% - 48px));
}

/* ==========================================================================
   RESET & REGLAS BASE (ESTRICTAMENTE 0px BORDER-RADIUS)
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important; /* Eliminación total de bordes redondeados */
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--light-bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, iframe {
  display: block;
  max-width: 100%;
  border-radius: 0 !important;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--trans-fast);
}

button, input, textarea, select {
  font: inherit;
  border-radius: 0 !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--text-dark);
  font-weight: 800;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
}

p {
  margin-bottom: 1.15rem;
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Títulos estilo MARSA con línea decorativa */
.ruby-title {
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 12px;
  text-transform: capitalize;
}

.ruby-title strong,
.ruby-title span.highlight {
  font-weight: 900;
  color: var(--ruby);
}

.ruby-title.on-dark {
  color: var(--white);
}

.ruby-title.on-dark strong,
.ruby-title.on-dark span.highlight {
  color: var(--gold);
}



/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--ruby);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  font-weight: 600;
  transition: top var(--trans-fast);
}

.skip-link:focus {
  top: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN (SOBRE EL HERO CON ALTA LEGIBILIDAD)
   ========================================================================== */

/* --- EL HEADER GLOBAL SIEMPRE TRANSPARENTE --- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent !important; /* Forzamos la transparencia total */
  border-bottom: none;
  transition: all var(--trans-normal);
  padding: 15px 0;
}

/* --- LA BARRA INTERNA EN ESTADO INICIAL --- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  width: var(--container);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  border-radius: 12px;
  
  /* CAMBIOS AQUÍ: Eliminamos el fondo grisáceo y el desenfoque */
  background: transparent !important; 
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  
  /* Opcional: Si quieres quitar también la línea dorada del borde, ponlo en 'none' */
  border: 3px solid rgba(229, 169, 59, 0.15); 
  
  transition: all var(--trans-normal);
}

/* --- ESTADO SCROLLED (Cuando el usuario baja en la página) --- */

.site-header.scrolled {
  position: fixed;
  width: 100%;
  padding: 0;
}

.site-header.scrolled .navbar {
  min-height: 85px;
  width: 100%;
  max-width: 100%; 
  padding: 0 calc(((100% - var(--container)) / 2) );
  border-radius: 0; /* Se vuelve rectangular al pegarse arriba */
  border-left: none;
  border-right: none;
  border-top: none;
  /* Cambiamos el fondo guinda que tenías por el negro/dorado institucional del diseño */
  background: transparent; 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(145, 104, 28, 0.147); /* Borde inferior dorado */
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 48px;
  width: auto;
  object-fit: contain;
  transition: transform var(--trans-normal);
}

.brand:hover img {
  transform: scale(1.03);
}

/* --- COMPORTAMIENTO INICIAL POR DEFECTO --- */
.brand .logo-principal {
  display: block; /* Se muestra el logo principal al iniciar */
}

.brand .logo-scroll {
  display: none; /* Se oculta el logo de scroll al iniciar */
}





.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 26px);
}

.nav-link-item {
  position: relative;
  font-size: 0.90rem;
  font-weight: 600;
  color: rgb(255, 255, 255);
  padding: 10px 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color var(--trans-fast);
}

.nav-link-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--trans-normal);
}

.nav-link-item:hover {
  color: var(--gold);
}

.nav-link-item:hover::after,
.nav-link-item.active::after {
  transform: scaleX(1);
}

.nav-link-item.active{
  color: var(--gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 90%;
}



/* Botón Hamburguesa Móvil */
.nav-toggle {
  display: none;
  background:transparent;
  border: 1px solid var(--gold-dark);
  width: 44px;
  height: 44px;
  position: relative;
  cursor: pointer;
  padding: 0;
  transition: background var(--trans-fast);
}

.nav-toggle:hover {
  background: rgba(204, 202, 202, 0.16);
}

.nav-toggle span:not(.sr-only) {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  background: var(--gold);
  transform: translateX(-50%);
  transition: transform var(--trans-normal), opacity var(--trans-fast), top var(--trans-normal), background var(--trans-fast);
}

.nav-toggle span:not(.sr-only):nth-child(1) { top: 14px; }
.nav-toggle span:not(.sr-only):nth-child(2) { top: 21px; }
.nav-toggle span:not(.sr-only):nth-child(3) { top: 28px; }


/* Transformación en 'X' al abrir menú */
.nav-toggle[aria-expanded="true"] {
  background: transparent;
  border-color: var(--gold);
}

.nav-toggle[aria-expanded="true"] span:not(.sr-only):nth-child(1) {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--gold);
}

.nav-toggle[aria-expanded="true"] span:not(.sr-only):nth-child(2) {
  opacity: 0;
  transform: translateX(15px);
}

.nav-toggle[aria-expanded="true"] span:not(.sr-only):nth-child(3) {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
  background: var(--gold);
}


/* ==========================================================================
   SISTEMA DE BOTONES (ESTILO MINERO RECTANGULAR)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: all var(--trans-normal);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(0);
}

/* Botón Primario: Oro */
.btn-primary {
  color: black;
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 6px 18px rgba(228, 185, 54, 0.3);
}

.btn-primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  box-shadow: 0 10px 24px rgba(228, 185, 54, 0.45);
}

/* Botón Secundario: Rubí */
.btn-secondary {
  color: var(--white);
  background: var(--ruby);
  border-color: var(--ruby);
  box-shadow: var(--shadow-ruby);
}

.btn-secondary:hover {
  background: var(--ruby-dark);
  border-color: var(--ruby-dark);
  box-shadow: 0 12px 30px rgba(86, 4, 19, 0.5);
}

/* Botón Outline */
.btn-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  color: black;
  background: var(--white);
  border-color: var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn-outline.dark {
  color: var(--text-dark);
  border-color: #33383f;
  background: transparent;
}

.btn-outline.dark:hover {
  color: var(--white);
  background: var(--ruby);
  border-color: var(--ruby);
}

.btn-login {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 10px;
}

.btn-login:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(228, 185, 54, 0.1);
}

/* ==========================================================================
   HERO PRINCIPAL (IMAGEN  CON OPACIDAD ELEGANTE Y HEADER INTEGRADO)
   ========================================================================== */

.hero-home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items:center;
  color: var(--white);
  overflow: hidden;
  padding-top: 100px;
  padding-bottom: 60px;
  /* Eliminamos las propiedades de fondo de aquí ya que usas la etiqueta img dentro de .hero-bg-media */
  background-color: #0b090637; /* Color de respaldo por si tarda en cargar la imagen */
}

.hero-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  transition: transform 8s ease-out;
  background: #191f29da;
}

.hero-home:hover .hero-bg-media video {
  transform: scale(1.06);
}

/* Capa optimizada para calcar el contraste de la imagen */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    /* Gradiente 1: Oscurece fuertemente la zona del texto (izquierda) y se aclara hacia las piedras (derecha) */
    linear-gradient(120deg, rgba(0, 0, 0, 0.919) 30%, rgba(21, 21, 21, 0.162) 60%, rgba(0, 0, 0, 0.1) 80%),
    /* Gradiente 2: Viñeta de arriba hacia abajo para oscurecer el menú superior y la base */
    linear-gradient(0deg, rgba(11, 9, 6, 0.899) 1%, rgba(0, 0, 0, 0) 40%, rgba(18, 17, 17, 0.833) 98%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
}


.hero-home h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-family: 'Inter';
  line-height :1.0;
  max-width: 500px;
  font-size: clamp(2.0rem, 5vw, 3.0rem);  
  font-weight: 200;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.772);
  
}

.hero-home h1 span {
  font-weight: 800;
  color: var(--gold);
  display: inline;
}

.hero-lead {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 550px;
  line-height: 1.65;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

/* Hero de Páginas Internas */
.page-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  color: var(--text-dark);
  padding-top: 110px;
  padding-bottom: 60px;
  overflow: hidden;
}

.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(21, 3, 6, 1.5) 0%, rgba(156, 17, 31, 0) 80%, rgba(134, 9, 9, 0.1) 90%),
    linear-gradient(0deg, rgba(139, 8, 47, 0.137), rgba(95, 20, 32, 0.1));
  min-height: 320px;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.page-hero .container {
  position: relative;
  z-index: 3;
}


.page-hero h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
  font-weight: 300px;
}

.page-hero-subtitle {
  font-size: 1.15rem;
  color:white;
  max-width: 680px;
}

/* ==========================================================================
   ESTILO DE IMAGEN MARSA (FUSIÓN/DESVANECIMIENTO LATERAL SUAVE - IMAGEN 1)
   ========================================================================== */

/* Bloque Claro: Texto a la izquierda, Imagen fundida a la derecha */
.ruby-split-light {
  background: var(--light-bg);
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.ruby-split-light .split-container {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 48px;
}

.ruby-split-light .text-content {
  position: relative;
  z-index: 2;
  padding-right: 20px;
}

.ruby-split-light .image-blend-right {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
}

.ruby-split-light .image-blend-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Efecto de desvanecimiento lateral como en Imagen 1 */
  mask-image: linear-gradient(to right, transparent 0%, black 35%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 35%);
  transition: transform var(--trans-slow);
}

.ruby-split-light:hover .image-blend-right img {
  transform: scale(1.04);
}

/* Bloque Oscuro: Imagen fundida a la izquierda, Misión/Visión a la derecha */
.ruby-split-dark {
  background: var(--dark-bg);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.ruby-split-dark .split-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
}

.ruby-split-dark .image-blend-left {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
}

.ruby-split-dark .image-blend-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Desvanecimiento hacia el fondo oscuro como en Imagen 1 */
  mask-image: linear-gradient(to left, transparent 0%, black 35%);
  -webkit-mask-image: linear-gradient(to left, transparent 0%, black 35%);
  transition: transform var(--trans-slow);
}

.ruby-split-dark:hover .image-blend-left img {
  transform: scale(1.04);
}

.ruby-split-dark .mission-vision-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  z-index: 2;
  padding-left: 20px;
}

.mission-block p,
.vision-block p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ==========================================================================
   INDICADORES Y ESTADÍSTICAS (STATS STRIP)
   ========================================================================== */

.stats-strip {
  background: var(--white);
  border-block: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-box {
  padding: 36px 24px;
  text-align: center;
  border-right: 1px solid var(--border-light);
  transition: background var(--trans-fast), transform var(--trans-fast);
}

.stat-box:last-child {
  border-right: 0;
}

.stat-box:hover {
  background: #83838321;
  transform: translateY(-2px);
}

.stat-number {
  display: block;
  font-size: clamp(1.4rem, 2.4vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  color: var(--ruby);
  margin-bottom: 8px;
}



.stat-label {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 220px;
  margin-inline: auto;
  line-height: 1.45;
}

/* ==========================================================================
   SECCIÓN VIDEO INSTITUCIONAL
   ========================================================================== */

.dark-video-section {
  background: var(--ruby);
  color: var(--white);
  padding: 90px 0;
  border-block: 1px solid var(--border-dark);
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
}

.video-frame-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(228, 185, 54, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  background: #000;
}

.video-frame-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   TARJETAS DE SERVICIOS (PROCESOS PRODUCTIVOS / CERRO VERDE & MARSA)
   ========================================================================== */

.section-services {
  padding: 90px 0;
  background: var(--white);
}

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

.service-card-item {
  background: var(--light-bg);
  border: 1px solid var(--border-light);
  padding: 36px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--trans-normal);
}

.service-card-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--ruby);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--trans-normal);
}

.service-card-item:hover::before {
  transform: scaleX(1);
}

.service-icon-wrap {
  display: inline;
  margin: auto;
  width: 92px;
  height: 92px;
  color: var(--ruby);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all var(--trans-fast);
}

.service-icon-wrap .material-symbols-outlined{
  font-size: 70px;

}
.value-icon-circle .material-symbols-outlined{
  font-size: 70px;

}

.service-card-item h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.service-card-item p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ruby);
  letter-spacing: 0.05em;
  margin-top: auto;
  transition: gap var(--trans-fast), color var(--trans-fast);
}

/* Catálogo Detallado de Servicios (servicios.html) */
.services-catalog {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

.service-process-box {
  background: var(--white);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: all var(--trans-normal);
}

.service-process-box:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--ruby);
}

.process-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.process-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--trans-slow);
}

.service-process-box:hover .process-media img {
  transform: scale(1.05);
}

.process-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.process-body h3 {
  color: var(--ruby);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.process-body p {
  color: var(--text-muted);
  font-size: 0.975rem;
  margin-bottom: 20px;
}

.process-checklist {
  list-style: none;
  margin-bottom: 26px;
}

.process-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.925rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.process-checklist li .material-symbols-outlined {
  color: var(--dark-bg);
  font-size:20px;
}

/* ==========================================================================
   VALORES CORPORATIVOS (PÁGINA NOSOTROS)
   ========================================================================== */

.values-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.value-box {
  background: var(--white);
  border: 1px solid var(--border-light);
  padding: 36px 24px;
  text-align: center;
  transition: all var(--trans-normal);
}

.value-box:hover {
  transform: translateY(-6px);
  border-color: var(--ruby);
  box-shadow: var(--shadow-hover);
}

.value-icon-circle {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all var(--trans-fast);
}



.value-box h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.value-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   NOTICIAS Y PRECIO DEL ORO (DINÁMICO CON PHP + SQLITE)
   ========================================================================== */

.news-filter-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 12px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--white);
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.tab-btn:hover {
  color: var(--ruby);
  border-color: var(--ruby);
  background: #fdf2f4;
}

.tab-btn.active {
  background: var(--dark-bg);
  color: var(--white);
  border-color: var(--ruby);
}

.tab-panel {
  display: block;
}

.tab-panel[hidden] {
  display: none;
}

/* Carrusel de Noticias */
.news-carousel {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 20px;
  scrollbar-width: thin;
}

.news-card {
  flex: 0 0 min(370px, calc(100% - 30px));
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: all var(--trans-normal);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--dark-bg);
}

.news-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #23262a;
}

.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--trans-slow);
}

.news-card:hover .news-card-media img {
  transform: scale(1.06);
}

.news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: end;
  margin-bottom: 12px;
}

.news-tag {
  display: inline-block;
  padding: 4px 8px;
  background: #fdf2f4;
  color: var(--ruby);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.news-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.news-card h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.news-card-text {
  font-size: 0.925rem;
  color: var(--text-muted);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.news-card.is-expanded .news-card-text {
  max-height: 800px;
  opacity: 1;
  margin-bottom: 16px;
}

.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding: 6px 0;
  background: transparent;
  border: 0;
  color: var(--ruby);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: gap var(--trans-fast), color var(--trans-fast);
}

.news-read-more:hover {
  gap: 8px;
  color: var(--gold-dark);
}

.carousel-controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  background: var(--white);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.carousel-btn:hover {
  background: var(--ruby);
  color: var(--white);
  border-color: var(--ruby);
}

/* Gráfico Kitco */
.gold-chart-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.gold-chart-header {
  padding: 18px 24px;
  background: var(--dark-bg);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gold-chart-header h3 {
  color: var(--white);
  font-size: 1.1rem;
}

.gold-chart-header a {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
}

.gold-chart-body iframe {
  width: 100%;
  min-height: 520px;
  border: 0;
}

/* ==========================================================================
   CONTACTO Y FORMULARIO
   ========================================================================== */

.contact-dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}

.contact-dept-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  padding: 32px 28px;
  transition: all var(--trans-normal);
}

.contact-dept-card:hover {
  transform: translateY(-6px);
  border-color: var(--ruby);
  box-shadow: var(--shadow-hover);
}

.dept-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.dept-icon {
  width: 48px;
  height: 48px;
  color: var(--ruby);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.dept-icon .material-symbols-outlined{
  color: var(--dark-bg);
}

.dept-header h3 {
  font-size: 1.2rem;
}

.dept-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.dept-info-item .material-symbols-outlined {
  color: var(--gold-dark);
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.dept-info-item a:hover {
  color: var(--ruby);
}

/* Formulario */
.contact-form-wrapper {
  background: var(--white);
  border: 1px solid var(--border-light);
  padding: clamp(36px, 5vw, 64px);
  box-shadow: var(--shadow-card);
  max-width: 960px;
  margin-inline: auto;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  background: var(--light-bg);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  font-size: 0.95rem;
  transition: all var(--trans-fast);
}

.form-control:focus {
  outline: 0;
  background: var(--white);
  border-color: var(--ruby);
  box-shadow: 0 0 0 3px rgba(122, 8, 29, 0.12);
}

textarea.form-control {
  min-height: 130px;
  resize: vertical;
}

.form-actions {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 12px;
}

/* ==========================================================================
   CALL TO ACTION (CTA BANNER)
   ========================================================================== */

.cta-banner-box {
  background: var(--dark-bg);
  border-left: 5px solid var(--gold);
  padding: clamp(40px, 5vw, 60px);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-banner-box h2 {
  color: var(--white);
  margin-bottom: 8px;
}

.cta-banner-box p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================================== */

.site-footer {
  background: var(--ruby);
  color: var(--white);
  padding-top: 72px;
  border-top: 4px solid var(--ruby);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 1.4fr;
  gap: clamp(28px, 4vw, 52px);
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand img {
  height: 56px;
  width: auto;
  margin-bottom: 18px;
}

.footer-brand p {
  color: var(--white);
  font-size: 0.925rem;
  line-height: 1.65;
  margin-bottom: 22px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-btn {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 16px;
  transition: all var(--trans-fast);
}

.social-btn:hover {
  background: var(--gold);
  color: var();
  border-color: var(--gold);
  transform: translateY(-3px);
}

.footer-column h4 {
  color: var(--white);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  background: var(--gold);
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 12px;
}

.footer-nav a {
  color: var(--white);
  font-size: 0.925rem;
  transition: all var(--trans-fast);
}

.footer-nav a:hover {
  color: var(--gold);
  padding-left: 6px;
}

.footer-contact-info p {
  color: var(--white);
  font-size: 0.925rem;
  line-height: 1.65;
  margin-bottom: 12px;
}

.footer-bottom {
  padding-block: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--border-light);
  font-size: 0.85rem;
}

/* ==========================================================================
   ANIMACIONES Y TRANSICIONES NOTABLES (SCROLL REVEAL)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}

.reveal.reveal-left {
  transform: translateX(-50px);
}

.reveal.reveal-right {
  transform: translateX(50px);
}

.reveal.reveal-scale {
  transform: scale(0.9);
}

.reveal.active {
  opacity: 1;
  transform: translate(0) scale(1);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.reveal .delay-100{
  font-weight: 30px;
  font-size: 16px;
}
.delay-100 span{
  color: var(--gold);
  font-weight: 200px;
}
/* ==========================================================================
   RESPONSIVE DESIGN & MENÚ MÓVIL (CORREGIDO SIN MARGENES NI BORDES AMARILLOS)
   ========================================================================== */

@media (max-width: 1024px) {
  .nav-link-item{
    font-size: 14px;
    gap: 0px;
  }
  .nav-actions .btn-primary {
    font-size: 12px;
    padding: 13px 5px;
  }
  .btn-login{
    font-size: 12px;

  }
  .services-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .values-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-dept-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
}


@media (max-width: 940px) {
  .nav-toggle {
    display: block;
  }
  
  /* Menú móvil pegado arriba y a la izquierda sin márgenes */
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--light-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid var(--ruby);
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-150%);
    transition: transform var(--trans-normal);
    overflow-y: auto;
    max-height: calc(100vh - 70px);
    z-index: 99;
    color: black;
  }
  
  .nav-actions .btn-primary {
    font-size: 14px;
  }
  .btn-login{
    font-size: 14px;
  
  }

  .nav-links.open {
    transform: translateY(0);
  }

  /* Enlaces del menú móvil: Sin bordes amarillos en hover */
  .nav-link-item {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 1rem;
    color: var(--white);
    background: transparent;
    display: block;
    width: 100%;
    text-align: left;
    color: #0b0906;
  }

  .nav-link-item::after {
    display: none; /* Eliminar cualquier subrayado animado en móvil */
  }

  .nav-link-item:hover,
  .nav-link-item:focus {
    background: rgba(202, 194, 194, 0.089);
    color: var(--gold);
    padding-left: 30px;
  }

  .nav-link-item.active {
    background: var(--ruby);
    color: var(--white);
    font-weight: 700;
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px 28px;
    gap: 12px;
    background: #ececee2a;
  }

  .nav-actions .btn {
    width: 100%;
  }
  .nav-actions .btn-login{
    color: #9c122b;
    background-color: transparent;
    border: 1px solid var(--border-dark);
  }

  /* Secciones MARSA en móvil */
  .ruby-split-light .split-container,
  .ruby-split-dark .split-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ruby-split-light .image-blend-right,
  .ruby-split-dark .image-blend-left {
    height: 300px;
  }

  .ruby-split-light .image-blend-right img,
  .ruby-split-dark .image-blend-left img {
    mask-image: none !important;
    -webkit-mask-image: none !important;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-box:nth-child(2) {
    border-right: 0;
  }

  .stat-box:nth-child(1),
  .stat-box:nth-child(2) {
    border-bottom: 1px solid var(--border-light);
  }

  .services-catalog {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner-box {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 490px) {

  .navbar {
    height: 30px;
  }
  .brand img {
    height: 28px;
    width: auto;
    object-fit: contain;
    transition: transform var(--trans-normal);
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-box {
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }

  .stat-box:last-child {
    border-bottom: 0;
  }
 
  .services-grid-4,
  .values-grid-4 {
    grid-template-columns: 1fr;
  }
  .services-catalog {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      width: 100%;
      max-width: 100%;
      gap: 20px;
      box-sizing: border-box;
  }

  .service-process-box {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
  }
  .service-process-box .btn-outline{
    width: 95%;
    font-size: 8px;
    margin: auto;
 
  }
  .btn-outline, .btn-primary, .btn-secondary{
    width: 95%;
    font-size: 8px;
    margin: auto;

  }
 
  
  .service-process-box img {
      width: 100%;
      max-width: 100%;
      height: auto;
      object-fit: cover;
  }
  .news-filter-tabs {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 12px;
  }

  .news-filter-tabs .tab-btn {
      width: 100%;
      max-width: 320px;
      box-sizing: border-box;
      justify-content: center;
      text-align: center;
      font-size: 10px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}
