/*
Theme Name: Gremi-Cat
Theme URI: https://prestigia.es
Description: Child theme for Gremi de Garatges.
Author: Prestigia
Template: hello-elementor
Version: 2.0.0
Text Domain: gremicat
*/

:root {
  --gremi-blue: #2252ac;
  --gremi-charcoal: #333333;
  --gremi-surface: #f5f5f5;
  --gremi-border: #e1e1e1;
  --gremi-font: Inter, Arial, sans-serif;
}

body { color: var(--gremi-charcoal); font-family: var(--gremi-font); }
.site-main { max-width: none; margin: 0; padding: 0; }
/* Hello Elementor constrains non-Elementor pages at several breakpoints. */
body:not([class*="elementor-page-"]) .site-main { margin: 0; max-width: none; padding: 0; width: 100%; }

.gremicat-header { background: #fff; border-bottom: 1px solid var(--gremi-border); position: sticky; top: 0; transition: box-shadow .2s ease, transform .25s ease; z-index: 100; }
.gremicat-header.is-scrolled { box-shadow: 0 4px 16px rgb(0 0 0 / 8%); }
.gremicat-header.is-hidden { transform: translateY(-100%); }
.gremicat-header__inner { align-items: center; box-sizing: border-box; display: flex; gap: 40px; min-height: 120px; padding: 24px 50px; width: 100%; }
.gremicat-header__brand { flex: 0 0 auto; line-height: 0; }
.gremicat-header__brand .custom-logo-link { display: inline-block; }
.gremicat-header__brand .custom-logo { display: block; height: auto; max-height: 72px; max-width: 350px; width: 100%; }
.gremicat-header__navigation { align-items: center; display: flex; flex: 1 1 auto; gap: 24px; min-width: 0; }
.gremicat-menu, .gremicat-footer-menu { list-style: none; margin: 0; padding: 0; }
.gremicat-menu { align-items: center; display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 24px; }
.gremicat-menu a { color: var(--gremi-charcoal); font-size: 16px; line-height: 1.25; text-decoration: none; }
.gremicat-menu .current-menu-item > a, .gremicat-menu .current_page_item > a, .gremicat-menu a:hover, .gremicat-menu a:focus { color: var(--gremi-blue); }
.gremicat-header__actions { align-items: center; display: flex; flex: 0 0 auto; gap: 8px; }
.gremicat-button, .gremicat-language-switcher__link { align-items: center; background: var(--gremi-blue); border: 0; border-radius: 60px; box-sizing: border-box; color: #fff; display: inline-flex; font-size: 14px; font-weight: 500; justify-content: center; letter-spacing: .02em; line-height: 1.2; min-height: 32px; padding: 8px 16px; text-decoration: none; text-transform: uppercase; }
.gremicat-button:hover, .gremicat-button:focus, .gremicat-language-switcher__link:hover, .gremicat-language-switcher__link:focus { background: #173b7f; color: #fff; }
.gremicat-language-switcher { display: flex; gap: 8px; }
.gremicat-language-switcher__link { min-width: 42px; }
.gremicat-language-switcher__link:not(.is-active) { background: var(--gremi-charcoal); }
.gremicat-header__toggle { align-items: center; background: transparent; border: 0; color: var(--gremi-charcoal); cursor: pointer; display: none; flex-direction: column; gap: 5px; height: 40px; justify-content: center; padding: 8px; width: 40px; }
.gremicat-header__toggle:hover,
.gremicat-header__toggle:active,
.gremicat-header__toggle:focus { background: transparent !important; border: 0 !important; color: #173b7f !important; outline: 2px solid #173b7f; outline-offset: 2px; }
.gremicat-header__toggle span:not(.screen-reader-text) { background: currentColor; display: block; flex: 0 0 2px; height: 2px; margin: 0; transform-origin: center; transition: opacity .2s ease, transform .2s ease; width: 24px; }
.gremicat-header.is-menu-open .gremicat-header__toggle { color: #173b7f; }
.gremicat-header.is-menu-open .gremicat-header__toggle span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
.gremicat-header.is-menu-open .gremicat-header__toggle span:nth-of-type(3) { opacity: 0; }
.gremicat-header.is-menu-open .gremicat-header__toggle span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }

.gremicat-footer { background: #fff; border-top: 1px solid var(--gremi-border); color: var(--gremi-charcoal); font-family: var(--gremi-font); }
.gremicat-footer__top { box-sizing: border-box; display: grid; gap: 40px; grid-template-columns: 1fr 1.5fr 1fr 1fr; padding: 40px 50px; width: 100%; }
.gremicat-footer__title { color: var(--gremi-blue); font-size: 24px; line-height: 34px; }
.gremicat-footer a { color: var(--gremi-charcoal); text-decoration: none; }
.gremicat-footer a:hover, .gremicat-footer a:focus, .gremicat-footer__map { color: var(--gremi-blue); text-decoration: underline; }
.gremicat-footer__contact { display: flex; flex-direction: column; font-size: 16px; gap: 8px; line-height: 24px; }
.gremicat-footer__contact p { margin: 0; }
.gremicat-footer-menu { display: flex; flex-direction: column; gap: 8px; }
.gremicat-footer-menu a { font-size: 16px; line-height: 24px; }
.gremicat-footer__partners { align-items: flex-start; display: flex; gap: 16px; }
.gremicat-footer__partners img { display: block; height: auto; max-height: 97px; max-width: 130px; object-fit: contain; width: auto; }
.gremicat-footer__partners a:nth-child(2) img { max-height: 75px; max-width: 182px; }
.gremicat-footer__bottom { border-top: 1px solid var(--gremi-border); box-sizing: border-box; padding: 24px 50px; width: 100%; }
.gremicat-footer__bottom p { font-size: 16px; line-height: 24px; margin: 0; }
.gremicat-footer__bottom a { text-decoration: underline; }

/* Contact Form 7 — forms on dark and blue Elementor sections. */
.text-wl,
.te-white { color: #fff !important; }

.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat),
.form-agremiat {
  --cf7-text: #fff;
  --cf7-line: rgb(255 255 255 / 90%);
  --cf7-button-text: #333;
  color: var(--cf7-text);
  font-family: var(--gremi-font);
  max-width: 100%;
}

.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) > p,
.form-agremiat > p {
  margin: 0 0 16px !important;
  padding: 0;
}

.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) > p > label,
.form-agremiat > p > label {
  color: var(--cf7-text);
  display: block;
  font-family: var(--gremi-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  width: 100%;
}

.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) br,
.form-agremiat br { display: none; }

.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) .wpcf7-form-control-wrap,
.form-agremiat .wpcf7-form-control-wrap {
  display: block;
  margin-top: 0;
  max-width: none;
  width: 100%;
}

.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) input[type="text"],
.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) input[type="email"],
.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) input[type="tel"],
.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) textarea,
.form-agremiat input[type="text"],
.form-agremiat input[type="email"],
.form-agremiat input[type="tel"],
.form-agremiat textarea {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--cf7-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box;
  color: var(--cf7-text) !important;
  font-family: var(--gremi-font);
  font-size: 16px;
  height: 32px;
  margin: 0 !important;
  outline: 0;
  padding: 0 !important;
  width: 100% !important;
}

.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) textarea {
  height: 80px;
  min-height: 80px;
  resize: vertical;
}

.form-agremiat textarea {
  height: 32px;
  min-height: 32px;
  resize: vertical;
}

.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) input:focus,
.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) textarea:focus,
.form-agremiat input:focus,
.form-agremiat textarea:focus { border-bottom-width: 2px !important; }

.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) input::placeholder,
.elementor-widget-shortcode .wpcf7-form:not(.form-agremiat) textarea::placeholder,
.form-agremiat input::placeholder,
.form-agremiat textarea::placeholder { color: rgb(255 255 255 / 55%); }

.form-agremiat .codedropz-upload-wrapper {
  margin: 8px 0 0;
  max-width: none;
  width: 100%;
}

.form-agremiat .codedropz-upload-handler {
  background: transparent !important;
  border: 1px solid var(--cf7-line) !important;
  border-radius: 10px !important;
  margin: 0 !important;
}

.form-agremiat .codedropz-upload-container { padding: 24px !important; }

.form-agremiat .codedropz-upload-inner {
  align-items: center;
  color: var(--cf7-text);
  display: flex;
  flex-direction: column;
  font-family: var(--gremi-font);
  gap: 4px;
}

.form-agremiat .codedropz-upload-inner::before {
  background: #fff url("assets/images/upload-icon.svg") center / 24px 24px no-repeat;
  border-radius: 50%;
  content: "";
  display: block;
  height: 56px;
  margin-bottom: 8px;
  width: 56px;
}

.form-agremiat .codedropz-upload-inner h3 {
  color: var(--cf7-text) !important;
  font-family: var(--gremi-font) !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 24px;
  margin: 0 !important;
  text-align: center;
}

.form-agremiat .codedropz-upload-inner > span {
  color: var(--cf7-text);
  font-size: 14px;
  line-height: 20px;
}

.form-agremiat .codedropz-btn-wrap { margin-top: 8px; }

.form-agremiat .codedropz-btn-wrap a.cd-upload-btn {
  align-items: center;
  background: #fff;
  border-radius: 100px;
  color: var(--cf7-button-text) !important;
  display: inline-flex;
  font-family: var(--gremi-font);
  font-size: 12px;
  font-weight: 600;
  height: 40px;
  justify-content: center;
  min-width: 202px;
  padding: 0 24px;
  text-decoration: none !important;
}

.form-agremiat .dnd-upload-counter { display: none !important; }
.form-agremiat .dnd-upload-status { border-bottom: 1px solid rgb(255 255 255 / 20%); color: var(--cf7-text); padding: 12px 0; }
.form-agremiat .dnd-upload-status .dnd-upload-details .name,
.form-agremiat .dnd-upload-status .dnd-upload-details .name span { color: var(--cf7-text); }

.elementor-widget-shortcode .wpcf7-acceptance,
.form-agremiat .wpcf7-acceptance { display: block; margin: 0; }

.elementor-widget-shortcode .wpcf7-acceptance .wpcf7-list-item,
.form-agremiat .wpcf7-acceptance .wpcf7-list-item { margin: 0; }

.elementor-widget-shortcode .wpcf7-acceptance label,
.form-agremiat .wpcf7-acceptance label {
  align-items: center;
  color: var(--cf7-text);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--gremi-font);
  font-size: 16px;
  gap: 11px;
  line-height: 24px;
}

.elementor-widget-shortcode .wpcf7-acceptance input[type="checkbox"],
.form-agremiat .wpcf7-acceptance input[type="checkbox"] {
  appearance: none;
  background: transparent;
  border: 1px solid var(--cf7-line);
  border-radius: 0;
  flex: 0 0 15px;
  height: 15px;
  margin: 0;
  position: relative;
  width: 15px;
}

.elementor-widget-shortcode .wpcf7-acceptance input[type="checkbox"]:checked,
.form-agremiat .wpcf7-acceptance input[type="checkbox"]:checked { background: #fff; }

.elementor-widget-shortcode .wpcf7-acceptance input[type="checkbox"]:checked::after,
.form-agremiat .wpcf7-acceptance input[type="checkbox"]:checked::after {
  border: solid #333;
  border-width: 0 1px 1px 0;
  content: "";
  height: 8px;
  left: 5px;
  position: absolute;
  top: 2px;
  transform: rotate(45deg);
  width: 4px;
}

.elementor-widget-shortcode .wpcf7-acceptance a,
.form-agremiat .wpcf7-acceptance a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.elementor-widget-shortcode .wpcf7-submit,
.form-agremiat .wpcf7-submit {
  background: #fff !important;
  border: 0 !important;
  border-radius: 60px !important;
  box-shadow: none !important;
  color: var(--cf7-button-text) !important;
  cursor: pointer;
  font-family: var(--gremi-font);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 24px;
  min-height: 56px;
  padding: 16px 32px !important;
  text-transform: uppercase;
  width: auto !important;
}

.elementor-widget-shortcode .wpcf7-not-valid-tip,
.form-agremiat .wpcf7-not-valid-tip { color: #ffb3b3; font-size: 14px; margin-top: 6px; }
.elementor-widget-shortcode .wpcf7-response-output,
.form-agremiat .wpcf7-response-output { color: var(--cf7-text); margin: 16px 0 0; }

/* Legal policy pages */
.gremicat-legal-policy .page-header { box-sizing: border-box; margin: 0; padding: 72px 50px 24px; }
.gremicat-legal-policy .page-header .entry-title { color: var(--gremi-charcoal); font-family: var(--gremi-font); font-size: 40px; font-weight: 400; line-height: 1.2; margin: 0; max-width: none; padding-inline: 0; width: auto; }
.gremicat-legal-policy .page-content { box-sizing: border-box; color: #4b4b4b; font-family: var(--gremi-font); font-size: 16px; line-height: 1.6; margin: 0; max-width: 1180px; padding: 16px 50px 88px; }
.gremicat-legal-policy .page-content > h2 { border-top: 1px solid var(--gremi-border); color: var(--gremi-blue); font-size: 24px; font-weight: 500; line-height: 1.35; margin: 48px 0 16px; padding-top: 32px; }
.gremicat-legal-policy .page-content > h2:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.gremicat-legal-policy .page-content > h3 { color: var(--gremi-charcoal); font-size: 18px; font-weight: 600; line-height: 1.4; margin: 28px 0 16px; }
.gremicat-legal-policy .page-content p { margin: 0 0 16px; }
.gremicat-legal-table { -webkit-overflow-scrolling: touch; margin: 0 0 32px; overflow-x: auto; }
.gremicat-legal-table table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--gremi-border); border-radius: 10px; min-width: 640px; overflow: hidden; width: 100%; }
.gremicat-legal-table th,
.gremicat-legal-table td { border-bottom: 1px solid var(--gremi-border); padding: 18px 20px; text-align: left; vertical-align: top; }
.gremicat-legal-table thead th { background: var(--gremi-blue); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.gremicat-legal-table tbody th { background: #f5f7fb; color: var(--gremi-charcoal); font-size: 15px; font-weight: 600; width: 30%; }
.gremicat-legal-table tbody td { color: #4b4b4b; font-size: 15px; }
.gremicat-legal-table tr:last-child > * { border-bottom: 0; }
.gremicat-legal-table td p:last-child { margin-bottom: 0; }

/* Contact page: keep the page title aligned with the two-column content below on wide screens. */
@media (min-width: 1025px) {
  .elementor-184 .elementor-element.elementor-element-122ab34f,
  .elementor-4737 .elementor-element.elementor-element-122ab34f {
    --container-widget-width: calc(100% - 160px) !important;
    max-width: calc(100% - 160px) !important;
    width: calc(100% - 160px) !important;
  }
}

@media (max-width: 1100px) {
  .gremicat-header__inner { gap: 20px; min-height: 96px; padding: 18px 50px; }
  .gremicat-header__brand .custom-logo { max-width: 260px; }
  .gremicat-menu { gap: 14px; }
  .gremicat-menu a { font-size: 14px; }
  .gremicat-footer__top { grid-template-columns: 1fr 1fr; padding: 40px 50px; }
}

/* The header needs more horizontal room than page content; collapse at Elementor's laptop breakpoint. */
@media (max-width: 1400px) {
  .gremicat-header__inner { flex-wrap: wrap; }
  .gremicat-header__brand { flex: 1; }
  .gremicat-header__toggle { display: inline-flex; }
  .gremicat-header__navigation { align-items: stretch; display: none; flex-basis: 100%; flex-direction: column; gap: 20px; order: 4; }
  .gremicat-header.is-menu-open .gremicat-header__navigation { display: flex; }
  .gremicat-menu { align-items: stretch; flex-direction: column; gap: 0; padding: 12px 0 4px; }
  .gremicat-menu li { border-top: 1px solid var(--gremi-border); }
  .gremicat-menu a { display: block; font-size: 16px; padding: 14px 0; }
  .gremicat-header__actions { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 767px) {
  /* Home hero: Elementor keeps a 24px left margin at 100% width, causing 4px overflow. */
  .elementor-91 .elementor-element.elementor-element-118f9a05 {
    --width: calc(100% - 24px);
    max-width: calc(100% - 24px);
  }
  .gremicat-header__inner { flex-wrap: wrap; gap: 12px; min-height: 0; padding: 15px 20px; }
  .gremicat-header__brand .custom-logo { max-width: 220px; }
  .gremicat-button { font-size: 12px; padding: 8px 12px; }
  .gremicat-language-switcher__link { font-size: 12px; min-width: 36px; padding: 8px 10px; }
  .gremicat-footer__top { gap: 28px; grid-template-columns: 1fr; padding: 32px 20px; }
  .gremicat-footer__bottom { padding: 20px; }
  .gremicat-legal-policy .page-header { padding: 24px 20px 0; }
  .gremicat-legal-policy .page-header .entry-title { font-size: 28px; }
  .gremicat-legal-policy .page-content { font-size: 15px; padding: 16px 20px 56px; }
  .gremicat-legal-policy .page-content > h2 { font-size: 21px; margin-top: 36px; padding-top: 24px; }
  .gremicat-legal-table { margin-right: 0; overflow: visible; padding-right: 0; }
  .gremicat-legal-table table { min-width: 0; table-layout: fixed; }
  .gremicat-legal-table thead th:first-child,
  .gremicat-legal-table tbody th { width: 38%; }
  .gremicat-legal-table th,
  .gremicat-legal-table td { overflow-wrap: anywhere; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .gremicat-header { transition: none; }
}
