/**
 * Recioil Theme - Estilos Personalizados
 * 
 * @package Recioil
 */

/* ============================================
   VARIABLES CSS ROOT
   ============================================ */
:root {
  /* Colores corporativos */
  --recioil-primary: #385152;
  --recioil-primary-hover: #2b4040;
  --recioil-accent: #50a696;
  --recioil-white: #ffffff;
  --recioil-dark: #1c1c1c;
  /* Colores de fondo */
  --recioil-background-light: #ffffff;
  --recioil-background-light-2: #f5f6f6;
  --recioil-background-dark: #171b1b;

  /* Colores de texto */
  --recioil-text-light: #1c1c1c;
  --recioil-text-dark: #ffffff;
  --particles-url: url("https://recioil.es/wp-content/uploads/2025/12/particulas-min-01.png");
  --cc-btn-primary-bg: var(--recioil-primary) !important;
  --cc-btn-primary-hover-bg: var(--recioil-primary-hover) !important;
  --cc-btn-primary-hover-border-color: var(--recioil-primary-hover) !important;
}

[type="text"]:focus,
input:where(:not([type])):focus,
[type="email"]:focus,
[type="url"]:focus,
[type="password"]:focus,
[type="number"]:focus,
[type="date"]:focus,
[type="datetime-local"]:focus,
[type="month"]:focus,
[type="search"]:focus,
[type="tel"]:focus,
[type="time"]:focus,
[type="week"]:focus,
[multiple]:focus,
textarea:focus,
select:focus {
  --tw-ring-color: var(--recioil-accent) !important;
  border-color: var(--recioil-accent) !important;
}
[type="checkbox"]:checked,
[type="radio"]:checked {
  background-color: var(--recioil-accent) !important;
  --tw-ring-color: var(--recioil-accent) !important;
}
[type="checkbox"]:focus,
[type="radio"]:focus {
  --tw-ring-color: var(--recioil-accent) !important;
}

/* ============================================
   CONTAINER
   ============================================ */
.container-content {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

@media (min-width: 640px) {
  .container-content {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

/* ============================================
   MATERIAL SYMBOLS
   ============================================ */
.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */
html {
  scroll-behavior: smooth;
}

/* ============================================
   TRANSICIONES GLOBALES
   ============================================ */
/* Transiciones solo para propiedades básicas, sin transform */
* {
  transition-property: color, background-color, border-color,
    text-decoration-color, fill, stroke, opacity, box-shadow, filter,
    backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

button,
a,
input,
select,
textarea {
  transition-duration: 150ms;
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease,
    box-shadow 0.3s ease;
}

/* Compensar el espacio del header fixed (altura h-16 = 4rem) */
main {
  padding-top: 4rem; /* 64px - altura del header */
}

/* Resaltado en hover de los enlaces del menú */
header nav a {
  transition: color 0.2s ease;
}

header nav a:hover {
  color: var(--recioil-accent, #50a696);
}

/* ============================================
   BOTONES DEL MENÚ NAVEGACIÓN
   ============================================ */
.nav-menu-button {
  position: relative;
  display: inline-block;
  overflow: hidden;
  /* Fondo transparente inicialmente */
  background-color: transparent !important;
  /* Transición suave para el efecto de revelación */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efecto de revelación en hover */
.nav-menu-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--recioil-background-light-2, #f5f6f6);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  border-radius: inherit;
}

.nav-menu-button:hover::before {
  opacity: 1;
}

/* Asegurar que el texto esté por encima del fondo */
.nav-menu-button {
  position: relative;
  z-index: 1;
}

/* Color del texto en hover - oscuro porque el fondo es claro */
.nav-menu-button:hover {
  color: var(--recioil-text-light, #1c1c1c) !important;
}

/* Estado activo (página actual) */
.nav-menu-button-active::before {
  opacity: 1;
}

.nav-menu-button-active {
  color: var(--recioil-text-light, #1c1c1c) !important;
}

/* Sombra cuando el header está en scroll */
header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Logo en header */
header img.logo {
  height: 1.25rem;
  width: auto;
  object-fit: contain;
}

/* Menú móvil */
#mobile-menu-toggle {
  transition: opacity 0.2s ease;
}

#mobile-menu-toggle:active {
  opacity: 0.7;
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

#mobile-menu:not(.hidden) {
  max-height: 500px;
  transition: max-height 0.3s ease-in;
}

#mobile-menu nav a {
  display: block;
  transition: color 0.2s ease;
}

/* ============================================
   BOTONES
   ============================================ */
button {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ============================================
   ENLACES
   ============================================ */
a {
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ============================================
   IMÁGENES
   ============================================ */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Imágenes de fondo con aspect-ratio */
[style*="background-image"] {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-overlay {
  position: relative;
  overflow: hidden;
}

.hero-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgb(29 37 38 / 70%) 0%,
    rgb(31 86 76 / 60%) 50%,
    rgb(2 15 16 / 80%) 100%
  );
  z-index: 1;
  backdrop-filter: blur(1.75px);
  -webkit-backdrop-filter: blur(1.75px);
}
/* .hero-overlay-services:before {
    background: #f9f9f9;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
} */

.hero-overlay-nosotros:before {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}
.hero-overlay-contacto:before {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.hero-overlay > * {
  position: relative;
  z-index: 2;
}

/* ============================================
   CARDS Y TARJETAS
   ============================================ */
/* Clase específica para cards con efecto hover */
.card-hover {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-2px);
}

/* ============================================
   FORMULARIOS
   ============================================ */
input,
textarea,
select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(80, 166, 150, 0.1);
}

/* ============================================
   UTILIDADES
   ============================================ */
/* Ocultar scrollbar pero mantener funcionalidad */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Texto seleccionado */
::selection {
  background-color: rgba(80, 166, 150, 0.3);
  color: inherit;
}

::-moz-selection {
  background-color: rgba(80, 166, 150, 0.3);
  color: inherit;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
/* Asegurar que las imágenes responsive funcionen */
@media (max-width: 640px) {
  .hero-section {
    min-height: 50vh !important;
  }
  .m-full {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */
@media (prefers-color-scheme: dark) {
  /* Ajustes adicionales para dark mode si es necesario */
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  header,
  footer,
  button,
  .no-print {
    display: none !important;
  }

  * {
    background: white !important;
    color: black !important;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
/* Mejorar contraste para accesibilidad */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible para teclado */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
  opacity: 0.6;
  pointer-events: none;
  cursor: wait;
}

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */
/* Estilos específicos de WordPress se pueden añadir aquí si es necesario */

/* Alineación de imágenes de WordPress */
.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1.5em;
}

.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1.5em;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5em;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
/* Optimización de renderizado */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* GPU acceleration para animaciones */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.particles-bg {
  position: relative;
}

.particles-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--particles-url);
  background-size: contain;
  opacity: 0.3; /* Ajusta este valor para cambiar la opacidad (0.0 a 1.0) */
  pointer-events: none; /* Permite que el contenido sea clickeable */
  z-index: 0;
}

.particles-bg > * {
  position: relative;
  z-index: 1; /* Asegura que el contenido esté por encima de la imagen */
}

.particles-bg-bottom-left::before {
  background-position: bottom left;
  background-repeat: no-repeat;
  background-origin: padding-box;
  background-size: contain;
}
.recioil-background-light-2 {
  background-color: var(--recioil-background-light-2);
}
.services-grid .icon-item {
  color: rgb(80 166 150 / var(--tw-text-opacity, 1));
}

/* ============================================
   CONTACT FORM 7 - MENSAJES
   ============================================ */

/* Mensajes de error (invalid, unaccepted, payment-required) */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid #ef4444;
  background-color: #fef2f2;
  color: #991b1b;
  font-size: 0.875rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Dark mode para mensajes de error */
.dark .wpcf7 form.invalid .wpcf7-response-output,
.dark .wpcf7 form.unaccepted .wpcf7-response-output,
.dark .wpcf7 form.payment-required .wpcf7-response-output {
  border-color: #dc2626;
  background-color: rgba(127, 29, 29, 0.2);
  color: #fca5a5;
}

/* Mensajes generales (por defecto) */
.wpcf7 form .wpcf7-response-output {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Dark mode para mensajes generales */
.dark .wpcf7 form .wpcf7-response-output {
  border-color: #374151;
  background-color: rgba(31, 41, 55, 0.5);
  color: #d1d5db;
}

/* Mensajes de éxito */
.wpcf7 form.sent .wpcf7-response-output {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid #10b981;
  background-color: #ecfdf5;
  color: #065f46;
  font-size: 0.875rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Dark mode para mensajes de éxito */
.dark .wpcf7 form.sent .wpcf7-response-output {
  border-color: #34d399;
  background-color: rgba(6, 95, 70, 0.2);
  color: #6ee7b7;
}

/* Ocultar mensajes cuando están vacíos */
.wpcf7-response-output:empty {
  display: none;
}

/* Estilos para campos con error */
.wpcf7-not-valid-tip {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #ef4444;
  display: block;
}

.dark .wpcf7-not-valid-tip {
  color: #fca5a5;
}

/* Campos con error */
.wpcf7-not-valid {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}

.dark .wpcf7-not-valid {
  border-color: #dc2626 !important;
  background-color: rgba(127, 29, 29, 0.1) !important;
}

/* ============================================
   ESTILOS PERSONALIZADOS PARA COOKIECONSENT
   ============================================ */

/* Estilos con mayor especificidad para asegurar que se apliquen */
div[data-cc="c-settings"] button,
.cc-banner button,
.cc-consent-modal button,
.cc-preferences-modal button {
  background-color: #385152 !important;
  border-color: #385152 !important;
  color: white !important;
  font-weight: 500 !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  transition: all 0.2s ease !important;
  border: 1px solid #385152 !important;
}

div[data-cc="c-settings"] button:hover,
.cc-banner button:hover,
.cc-consent-modal button:hover,
.cc-preferences-modal button:hover {
  background-color: #2a3f40 !important;
  border-color: #2a3f40 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(56, 81, 82, 0.3) !important;
}

/* Botón "Aceptar todas" - más prominente */
.cc-consent-modal button[data-cc="c-accept-all"],
.cc-preferences-modal button[data-cc="p-accept-all"] {
  background-color: #385152 !important;
  border-color: #385152 !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
}

.cc-consent-modal button[data-cc="c-accept-all"]:hover,
.cc-preferences-modal button[data-cc="p-accept-all"]:hover {
  background-color: #2a3f40 !important;
  border-color: #2a3f40 !important;
}

/* Botones secundarios - "Solo necesarias" */
.cc-consent-modal button[data-cc="c-accept-necessary"],
.cc-preferences-modal button[data-cc="p-accept-necessary"] {
  background-color: transparent !important;
  border-color: #385152 !important;
  color: #385152 !important;
  border: 1px solid #385152 !important;
}

.cc-consent-modal button[data-cc="c-accept-necessary"]:hover,
.cc-preferences-modal button[data-cc="p-accept-necessary"]:hover {
  background-color: #385152 !important;
  color: white !important;
}

/* Botón de configuración */
.cc-consent-modal button[data-cc="c-settings"],
.cc-banner button[data-cc="c-settings"] {
  background-color: transparent !important;
  border-color: #385152 !important;
  color: #385152 !important;
  border: 1px solid #385152 !important;
}

.cc-consent-modal button[data-cc="c-settings"]:hover,
.cc-banner button[data-cc="c-settings"]:hover {
  background-color: #385152 !important;
  color: white !important;
}

/* Enlaces dentro del modal */
.cc-consent-modal a,
.cc-preferences-modal a,
.cc-banner a {
  color: #385152 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
}

.cc-consent-modal a:hover,
.cc-preferences-modal a:hover,
.cc-banner a:hover {
  color: #2a3f40 !important;
  text-decoration: underline !important;
}

/* Ajustes para modo oscuro */
.dark div[data-cc="c-settings"] button,
.dark .cc-banner button,
.dark .cc-consent-modal button,
.dark .cc-preferences-modal button {
  background-color: #385152 !important;
  border-color: #385152 !important;
}

.dark div[data-cc="c-settings"] button:hover,
.dark .cc-banner button:hover,
.dark .cc-consent-modal button:hover,
.dark .cc-preferences-modal button:hover {
  background-color: #2a3f40 !important;
  border-color: #2a3f40 !important;
}

.dark .cc-consent-modal button[data-cc="c-accept-necessary"],
.dark .cc-preferences-modal button[data-cc="p-accept-necessary"],
.dark .cc-consent-modal button[data-cc="c-settings"],
.dark .cc-banner button[data-cc="c-settings"] {
  background-color: transparent !important;
  border-color: #385152 !important;
  color: #385152 !important;
}

.dark .cc-consent-modal button[data-cc="c-accept-necessary"]:hover,
.dark .cc-preferences-modal button[data-cc="p-accept-necessary"]:hover,
.dark .cc-consent-modal button[data-cc="c-settings"]:hover,
.dark .cc-banner button[data-cc="c-settings"]:hover {
  background-color: #385152 !important;
  color: white !important;
}

.dark .cc-consent-modal a,
.dark .cc-preferences-modal a,
.dark .cc-banner a {
  color: #385152 !important;
}

.dark .cc-consent-modal a:hover,
.dark .cc-preferences-modal a:hover,
.dark .cc-banner a:hover {
  color: #2a3f40 !important;
}
