/*
	Theme Name: Espai Veu Barcelona
	Theme URI: 
	Description: Child theme of Hello Elementor for Espai Veu Barcelona
	Author: Espai Veu Barcelona
	Author URI: 
	Template: hello-elementor
	Version: 1.0.0
	License: GNU General Public License v3 or later.
	License URI: https://www.gnu.org/licenses/gpl-3.0.html
	Text Domain: espai-veu-barcelona
*/

*LENIS*/ html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: clip;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/*END LENIS*/

html {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  overscroll-behavior: none;
  scroll-behavior: smooth;
}

/* Prevent scroll issues with certain elements */
img, iframe, video {
  max-width: 100%;
  height: auto;
}

/* Header animation styles */
[data-id="654a7c4"] img {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.6, 1);
  will-change: opacity;
}

/* Header adaptive color system */
.elementor-21 {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
}

.elementor-21 .cabecera-logo img {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.6, 1);
}

.elementor-21 .menu-cabecera .elementor-item {
  transition: color 0.3s cubic-bezier(0.4, 0, 0.6, 1);
}

/* Header on light backgrounds (dark text/logo) */
.elementor-21.header-on-light .menu-cabecera .elementor-item,
.elementor-21.header-on-light .menu-cabecera a {
  color: #2c2c2c !important;
}

.elementor-21.header-on-light .elementor-menu-toggle {
  color: #2c2c2c !important;
}

.elementor-21.header-on-light .elementor-menu-toggle svg,
.elementor-21.header-on-light .elementor-menu-toggle__icon--open,
.elementor-21.header-on-light .elementor-menu-toggle__icon--close {
  fill: #2c2c2c !important;
}

/* Header on dark backgrounds (light text/logo) - default state */
.elementor-21.header-on-dark .menu-cabecera .elementor-item,
.elementor-21.header-on-dark .menu-cabecera a,
.elementor-21 .menu-cabecera .elementor-item,
.elementor-21 .menu-cabecera a {
  color: #ffffff !important;
}

.elementor-21.header-on-dark .elementor-menu-toggle,
.elementor-21 .elementor-menu-toggle {
  color: #ffffff !important;
}

.elementor-21.header-on-dark .elementor-menu-toggle svg,
.elementor-21.header-on-dark .elementor-menu-toggle__icon--open,
.elementor-21.header-on-dark .elementor-menu-toggle__icon--close,
.elementor-21 .elementor-menu-toggle svg,
.elementor-21 .elementor-menu-toggle__icon--open,
.elementor-21 .elementor-menu-toggle__icon--close {
  fill: #ffffff !important;
}

/* Mobile menu dropdown colors */
.elementor-21.header-on-light .elementor-nav-menu--dropdown .elementor-item,
.elementor-21.header-on-light .elementor-nav-menu--dropdown a {
  color: #2c2c2c !important;
}

.elementor-21.header-on-dark .elementor-nav-menu--dropdown .elementor-item,
.elementor-21.header-on-dark .elementor-nav-menu--dropdown a,
.elementor-21 .elementor-nav-menu--dropdown .elementor-item,
.elementor-21 .elementor-nav-menu--dropdown a {
  color: #ffffff !important;
}

/* Debug styles - temporary (hidden) */
/*
.elementor-21.header-on-light {
  border-bottom: 3px solid red !important;
}

.elementor-21.header-on-dark {
  border-bottom: 3px solid blue !important;
}
*/

.elementor-21 .elementor-element.elementor-element-0c7e0cd {
background: rgba(255, 255, 255, 0.2);
border-radius: 16px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Variables CSS para la marca Espai Veu */
:root {
  --espaiveu-beix-clar: #e5e3d6;
  --espaiveu-beix-oliva: #bab599;
  --espaiveu-aiguamarina: #72aaa7;
  --espaiveu-alga: #376b68;
  --espaiveu-blanc: #ffffff;
  --espaiveu-gris-text: #2c2c2c;
  --espaiveu-error: #d63638;
  --espaiveu-success: #46b450;
  
  --espaiveu-font-titles: 'Instrument Serif', serif;
  --espaiveu-font-body: 'DM Sans', sans-serif;
  
  --espaiveu-shadow: 0 4px 20px rgba(55, 107, 104, 0.08);
  --espaiveu-shadow-hover: 0 8px 30px rgba(55, 107, 104, 0.12);
  --espaiveu-border-radius: 8px;
  --espaiveu-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Contenedor principal del formulario */
.espaiveu-contact-form {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--espaiveu-blanc);
  border-radius: var(--espaiveu-border-radius);
  box-shadow: var(--espaiveu-shadow);
  font-family: var(--espaiveu-font-body);
  position: relative;
  overflow: hidden;
}

/* Elemento decorativo de fondo */
.espaiveu-contact-form::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--espaiveu-aiguamarina) 0%, var(--espaiveu-alga) 100%);
  border-radius: 50%;
  opacity: 0.03;
  z-index: 0;
}

/* Header del formulario */
.espaiveu-form-header {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.espaiveu-form-header h2 {
  font-family: var(--espaiveu-font-titles);
  font-size: 2.25rem;
  color: var(--espaiveu-alga);
  margin: 0;
  font-weight: 400;
  line-height: 1.2;
}

.espaiveu-form-header p {
  font-size: 1.1rem;
  color: var(--espaiveu-alga);
  margin: 0;
  font-weight: 400;
}

/* Grid del formulario */
.espaiveu-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

/* Grupos de campos */
.espaiveu-field-group {
  display: flex;
  flex-direction: column;
}

.espaiveu-field-full {
  grid-column: 1 / -1;
}

.espaiveu-field-half {
  grid-column: span 1;
}

/* Labels */
.espaiveu-field-group label {
  font-family: var(--espaiveu-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--espaiveu-alga);
  margin-bottom: 0.5rem;
  transition: var(--espaiveu-transition);
}

/* Inputs base */
.espaiveu-input,
.espaiveu-textarea {
  font-family: var(--espaiveu-font-body);
  font-size: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--espaiveu-beix-clar);
  border-radius: var(--espaiveu-border-radius);
  background: var(--espaiveu-blanc);
  color: var(--espaiveu-gris-text);
  transition: var(--espaiveu-transition);
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.espaiveu-input:focus,
.espaiveu-textarea:focus {
  border-color: var(--espaiveu-aiguamarina);
  box-shadow: 0 0 0 3px rgba(114, 170, 167, 0.1);
  transform: translateY(-1px);
}

.espaiveu-input:hover,
.espaiveu-textarea:hover {
  border-color: var(--espaiveu-beix-oliva);
}

/* Placeholder */
.espaiveu-input::placeholder,
.espaiveu-textarea::placeholder {
  color: var(--espaiveu-aiguamarina);
  opacity: 0.8;
}

/* Textarea específico */
.espaiveu-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--espaiveu-font-body);
}

/* Checkbox de privacidad */
.espaiveu-privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--espaiveu-gris-text);
  line-height: 1.5;
}

.espaiveu-checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--espaiveu-aiguamarina);
  flex-shrink: 0;
  margin-top: 2px;
}

.espaiveu-link {
  color: var(--espaiveu-alga);
  text-decoration: underline;
  text-decoration-color: var(--espaiveu-aiguamarina);
  text-underline-offset: 3px;
  transition: var(--espaiveu-transition);
}

.espaiveu-link:hover {
  color: var(--espaiveu-aiguamarina);
  text-decoration-color: var(--espaiveu-alga);
}

/* Botón de envío */
.espaiveu-submit {
  font-family: var(--espaiveu-font-body)!important;
  font-size: 1.1rem!important;
  font-weight: 600!important;
  padding: 1.25rem 2.5rem!important;
  background: var(--espaiveu-alga)!important;
  color: var(--espaiveu-blanc)!important;
  border: none!important;
  border-radius: var(--espaiveu-border-radius)!important;
  cursor: pointer!important;
  transition: var(--espaiveu-transition)!important;
  box-shadow: 0 4px 15px rgba(114, 170, 167, 0.3)!important;
  width: 100%!important;
  text-transform: none!important;
  letter-spacing: 0.3px!important;
}

.espaiveu-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(114, 170, 167, 0.4);
}

.espaiveu-submit:active {
  transform: translateY(-1px);
}

/* Estados de error */
.wpcf7-not-valid {
  border-color: var(--espaiveu-error) !important;
  box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.1) !important;
}

.wpcf7-validation-errors {
  background: #ffe6e6;
  border: 1px solid var(--espaiveu-error);
  border-radius: var(--espaiveu-border-radius);
  padding: 1rem;
  margin: 1rem 0;
  color: var(--espaiveu-error);
  font-family: var(--espaiveu-font-body);
}

/* Mensaje de éxito */
.wpcf7-mail-sent-ok {
  background: #e6f7e6;
  border: 1px solid var(--espaiveu-success);
  border-radius: var(--espaiveu-border-radius);
  padding: 1rem;
  margin: 1rem 0;
  color: var(--espaiveu-success);
  font-family: var(--espaiveu-font-body);
}

/* Spinner de carga */
.wpcf7-spinner {
  margin-left: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .espaiveu-contact-form {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .espaiveu-form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .espaiveu-field-half {
    grid-column: 1;
  }
  
  .espaiveu-form-header h2 {
    font-size: 1.875rem;
  }
  
  .espaiveu-form-header p {
    font-size: 1rem;
  }
  
  .espaiveu-input,
  .espaiveu-textarea {
    padding: 0.875rem 1rem;
  }
  
  .espaiveu-submit {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .espaiveu-contact-form {
    padding: 1rem;
  }
  
  .espaiveu-form-header h2 {
    font-size: 1.625rem;
  }
  
  .espaiveu-privacy {
    font-size: 0.85rem;
  }
}

/* Animaciones de entrada */
@keyframes espaiveufadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.espaiveu-contact-form {
  animation: espaiveufadeInUp 0.6s ease-out;
}

/* Mejoras de accesibilidad */
.espaiveu-input:focus,
.espaiveu-textarea:focus,
.espaiveu-submit:focus {
  outline: 2px solid var(--espaiveu-aiguamarina);
  outline-offset: 2px;
}

/* Estilos para modo oscuro */
@media (prefers-color-scheme: dark) {
  .espaiveu-contact-form {
    background: #1a1a1a;
    color: #e5e3d6;
  }
  
  .espaiveu-input,
  .espaiveu-textarea {
    background: #2a2a2a;
    border-color: var(--espaiveu-beix-oliva);
    color: #e5e3d6;
  }
}