@import url('https://fonts.googleapis.com/css2?family=Inria+Serif:ital,wght@0,400;0,700;1,400&family=Manrope:wght@400;500;600;700&display=swap');

/* ───────────────────────────────────────────────
   Design tokens — luisandreuorenes.com
─────────────────────────────────────────────── */
:root {
  --rc-bg:            #000000;
  --rc-bg-card:       #0d0d0d;
  --rc-accent:        #C5AD6C;
  --rc-accent-border: rgba(197, 173, 108, 0.36);
  --rc-text:          #E3E0E1;
  --rc-heading:       #F6F6F6;
  --rc-error:         #e05252;
  --rc-radius:        3px;
  --rc-font-title:    'Inria Serif', Georgia, serif;
  --rc-font-body:     'Manrope', system-ui, sans-serif;
}

/* ───────────────────────────────────────────────
   Wrapper principal
─────────────────────────────────────────────── */
.rc-contact-form-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
  font-family: var(--rc-font-body);
  color: var(--rc-text);
}

.rc-contact-form-wrapper.rc-no-contact-info {
  grid-template-columns: 1fr;
  max-width: 700px;
}

/* ───────────────────────────────────────────────
   Sidebar de contacto
─────────────────────────────────────────────── */
.rc-contact-buttons-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: sticky;
  top: 20px;
  background: var(--rc-bg-card);
  padding: 28px;
  border-radius: var(--rc-radius);
  border: 1px solid var(--rc-accent-border);
}

.rc-contact-buttons-sidebar .rc-contact-title {
  font-family: var(--rc-font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--rc-accent);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Botones de contacto primarios (vertical) */
.rc-primary-contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rc-contact-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid var(--rc-accent-border);
  border-radius: var(--rc-radius);
  text-decoration: none;
  color: var(--rc-text);
  font-family: var(--rc-font-body);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  width: 100%;
}

.rc-contact-btn:hover {
  background: rgba(197, 173, 108, 0.08);
  border-color: var(--rc-accent);
  color: var(--rc-heading);
}

.rc-btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.rc-btn-icon svg {
  width: 100%;
  height: 100%;
}

.rc-btn-text {
  font-size: 14px;
}

.rc-contact-btn-phone .rc-btn-icon svg,
.rc-contact-btn-whatsapp .rc-btn-icon svg,
.rc-contact-btn-email .rc-btn-icon svg {
  fill: var(--rc-accent);
}

.rc-contact-btn:hover .rc-btn-icon svg {
  fill: var(--rc-heading);
}

/* Botones de redes sociales (horizontal) */
.rc-social-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rc-contact-buttons-sidebar .rc-social-title {
  font-family: var(--rc-font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--rc-accent);
  margin: 10px 0 5px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.rc-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--rc-accent-border);
  border-radius: var(--rc-radius);
  text-decoration: none;
  transition: all 0.25s ease;
}

.rc-social-btn:hover {
  transform: translateY(-2px);
}

.rc-social-btn svg {
  width: 20px;
  height: 20px;
}

.rc-social-btn-facebook { border-color: rgba(24, 119, 242, 0.4); }
.rc-social-btn-facebook:hover { background: rgba(24, 119, 242, 0.15); border-color: #1877f2; }

.rc-social-btn-instagram { border-color: rgba(225, 48, 108, 0.4); }
.rc-social-btn-instagram:hover { background: rgba(225, 48, 108, 0.15); border-color: #e1306c; }

.rc-social-btn-twitter { border-color: var(--rc-accent-border); }
.rc-social-btn-twitter:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; }
.rc-social-btn-twitter:hover svg { fill: #fff; }

.rc-social-btn-linkedin { border-color: rgba(0, 119, 181, 0.4); }
.rc-social-btn-linkedin:hover { background: rgba(0, 119, 181, 0.15); border-color: #0077b5; }

/* ───────────────────────────────────────────────
   Formulario — contenedor y grid de dos columnas
─────────────────────────────────────────────── */
.rc-contact-form {
  background: var(--rc-bg-card);
  padding: 32px;
  border-radius: var(--rc-radius);
  border: 1px solid var(--rc-accent-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
}

/* Campos que ocupan las dos columnas */
.rc-form-field.rc-field-message,
.rc-form-field.rc-field-textarea,
.rc-form-field.rc-privacy-field,
.rc-form-field.rc-captcha-field,
.rc-form-field.rc-recaptcha-field,
.rc-form-actions,
.rc-form-message {
  grid-column: 1 / -1;
}

.rc-form-field {
  margin-bottom: 20px;
}

.rc-form-field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--rc-font-title);
  font-weight: 700;
  color: var(--rc-heading);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.rc-required {
  color: var(--rc-accent);
  margin-left: 3px;
}

/* ───────────────────────────────────────────────
   Inputs — alta especificidad para sobrescribir Divi
─────────────────────────────────────────────── */
.rc-contact-form .rc-form-field .rc-input,
.rc-contact-form .rc-form-field input.rc-input,
.rc-contact-form .rc-form-field input[type="text"].rc-input,
.rc-contact-form .rc-form-field input[type="email"].rc-input,
.rc-contact-form .rc-form-field input[type="tel"].rc-input,
.rc-contact-form .rc-form-field input[type="number"].rc-input {
  width: 100% !important;
  max-width: 100% !important;
  padding: 12px 15px !important;
  background: var(--rc-bg) !important;
  border: 1px solid var(--rc-accent-border) !important;
  border-radius: var(--rc-radius) !important;
  font-size: 14px !important;
  font-family: var(--rc-font-body) !important;
  color: var(--rc-text) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  box-sizing: border-box !important;
  line-height: 1.5 !important;
  height: auto !important;
}

.rc-contact-form .rc-form-field .rc-input::placeholder {
  color: rgba(227, 224, 225, 0.4) !important;
}

.rc-contact-form .rc-form-field .rc-input:focus,
.rc-contact-form .rc-form-field input.rc-input:focus {
  outline: none !important;
  border-color: var(--rc-accent) !important;
  box-shadow: 0 0 0 3px rgba(197, 173, 108, 0.12) !important;
}

.rc-contact-form .rc-form-field .rc-input:invalid:not(:focus):not(:placeholder-shown),
.rc-contact-form .rc-form-field input.rc-input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--rc-error) !important;
}

.rc-contact-form .rc-form-field textarea.rc-input {
  resize: vertical !important;
  min-height: 120px !important;
  background: var(--rc-bg) !important;
  border: 1px solid var(--rc-accent-border) !important;
  border-radius: var(--rc-radius) !important;
  color: var(--rc-text) !important;
  font-family: var(--rc-font-body) !important;
  font-size: 14px !important;
  padding: 12px 15px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  line-height: 1.6 !important;
}

.rc-contact-form .rc-form-field textarea.rc-input:focus {
  outline: none !important;
  border-color: var(--rc-accent) !important;
  box-shadow: 0 0 0 3px rgba(197, 173, 108, 0.12) !important;
}

.rc-contact-form .rc-form-field textarea.rc-input::placeholder {
  color: rgba(227, 224, 225, 0.4) !important;
}

.rc-contact-form .rc-form-field select.rc-input {
  cursor: pointer !important;
  background-color: var(--rc-bg) !important;
  background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23C5AD6C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e') !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 18px !important;
  padding-right: 40px !important;
  appearance: none !important;
  color: var(--rc-text) !important;
}

.rc-contact-form .rc-form-field select.rc-input option {
  background: #111;
  color: var(--rc-text);
}

/* Checkbox */
.rc-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: var(--rc-font-body);
  color: var(--rc-text);
  font-weight: normal !important;
}

.rc-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--rc-accent);
  flex-shrink: 0;
}

.rc-field-error {
  display: block;
  color: var(--rc-error);
  font-size: 12px;
  margin-top: 5px;
  font-family: var(--rc-font-body);
}

/* ───────────────────────────────────────────────
   Botón de envío
─────────────────────────────────────────────── */
.rc-form-actions {
  margin-top: 8px;
}

.rc-submit-btn {
  background: var(--rc-accent);
  color: #000;
  border: none;
  padding: 13px 32px;
  border-radius: var(--rc-radius);
  font-family: var(--rc-font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  width: 100%;
}

.rc-submit-btn:hover {
  background: #b09a5c;
}

.rc-submit-btn:disabled {
  background: rgba(197, 173, 108, 0.35);
  color: rgba(0, 0, 0, 0.5);
  cursor: not-allowed;
}

.rc-submit-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(197, 173, 108, 0.35);
}

/* ───────────────────────────────────────────────
   Mensajes de éxito / error
─────────────────────────────────────────────── */
.rc-form-message {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--rc-radius);
  font-family: var(--rc-font-body);
  font-size: 14px;
  text-align: center;
}

.rc-form-message.success {
  background: rgba(197, 173, 108, 0.1);
  color: var(--rc-accent);
  border: 1px solid var(--rc-accent-border);
}

.rc-form-message.error {
  background: rgba(224, 82, 82, 0.1);
  color: var(--rc-error);
  border: 1px solid rgba(224, 82, 82, 0.4);
}

.rc-error {
  background: rgba(224, 82, 82, 0.1);
  color: var(--rc-error);
  padding: 14px 18px;
  border-radius: var(--rc-radius);
  border: 1px solid rgba(224, 82, 82, 0.4);
  font-family: var(--rc-font-body);
}

/* ───────────────────────────────────────────────
   Política de privacidad
─────────────────────────────────────────────── */
.rc-privacy-field {
  margin-top: 4px;
  padding: 14px 16px;
  background: rgba(197, 173, 108, 0.05);
  border: 1px solid var(--rc-accent-border);
  border-radius: var(--rc-radius);
}

.rc-privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--rc-font-body);
  font-size: 14px;
  color: var(--rc-text);
  cursor: pointer;
  margin: 0;
}

.rc-privacy-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--rc-accent);
}

.rc-privacy-label a {
  color: var(--rc-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rc-privacy-label a:hover {
  color: var(--rc-heading);
}

/* ───────────────────────────────────────────────
   Captcha matemático
─────────────────────────────────────────────── */
.rc-captcha-field {
  background: rgba(197, 173, 108, 0.05);
  border: 1px solid var(--rc-accent-border);
  border-radius: var(--rc-radius);
  padding: 18px 20px;
  margin-top: 0;
}

.rc-captcha-field label {
  color: var(--rc-heading);
  font-family: var(--rc-font-title);
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 14px;
}

.rc-captcha-question {
  font-family: var(--rc-font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--rc-text);
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  text-align: left;
  display: inline-block;
  margin-right: 10px;
}

.rc-captcha-input {
  max-width: 90px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  display: inline-block;
  vertical-align: middle;
  padding: 8px 12px;
  background: var(--rc-bg) !important;
  color: var(--rc-text) !important;
  border: 1px solid var(--rc-accent-border) !important;
  border-radius: var(--rc-radius) !important;
  font-family: var(--rc-font-body) !important;
}

/* ───────────────────────────────────────────────
   Loading spinner
─────────────────────────────────────────────── */
.rc-submit-btn.loading {
  position: relative;
  color: transparent;
}

.rc-submit-btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  border-top-color: #000;
  animation: rc-spinner 0.6s linear infinite;
}

@keyframes rc-spinner {
  to { transform: rotate(360deg); }
}

/* ───────────────────────────────────────────────
   reCAPTCHA
─────────────────────────────────────────────── */
.rc-recaptcha-field {
  margin-bottom: 20px;
}

.rc-recaptcha-field .g-recaptcha {
  transform: scale(1);
  transform-origin: 0 0;
}

@media (max-width: 480px) {
  .rc-recaptcha-field .g-recaptcha {
    transform: scale(0.85);
    transform-origin: 0 0;
  }
}

/* ───────────────────────────────────────────────
   Botón popup trigger
─────────────────────────────────────────────── */
.rc-popup-trigger {
  background: var(--rc-accent);
  color: #000;
  border: none;
  padding: 13px 28px;
  font-family: var(--rc-font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: var(--rc-radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.rc-popup-trigger:hover {
  background: #b09a5c;
  transform: translateY(-2px);
}

.rc-popup-trigger:active {
  transform: translateY(0);
}

/* ───────────────────────────────────────────────
   Modal
─────────────────────────────────────────────── */
.rc-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: table;
  width: 100%;
  height: 100%;
}

.rc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1;
}

.rc-modal-content {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
  padding: 30px;
  position: relative;
  z-index: 2;
}

.rc-modal-inner {
  display: inline-block;
  text-align: left;
  background: var(--rc-bg-card);
  border-radius: var(--rc-radius);
  border: 1px solid var(--rc-accent-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  padding: 48px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: rc-modal-appear 0.25s ease;
}

.rc-modal-inner:has(.rc-contact-form-wrapper:not(.rc-no-contact-info)) {
  min-width: 1100px;
}

@keyframes rc-modal-appear {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.rc-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 1px solid var(--rc-accent-border);
  border-radius: var(--rc-radius);
  font-size: 28px;
  line-height: 1;
  color: var(--rc-text);
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.rc-modal-close:hover {
  background: rgba(197, 173, 108, 0.1);
  border-color: var(--rc-accent);
  color: var(--rc-heading);
}

/* ───────────────────────────────────────────────
   Responsive
─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .rc-contact-form-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .rc-contact-buttons-sidebar {
    position: static;
    order: -1;
  }

  .rc-contact-form {
    padding: 24px 20px;
    grid-template-columns: 1fr;
  }

  .rc-form-field.rc-field-message,
  .rc-form-field.rc-field-textarea,
  .rc-form-field.rc-privacy-field,
  .rc-form-field.rc-captcha-field,
  .rc-form-field.rc-recaptcha-field,
  .rc-form-actions,
  .rc-form-message {
    grid-column: 1;
  }

  .rc-submit-btn {
    font-size: 14px;
    padding: 12px 20px;
  }

  .rc-modal-content {
    padding: 15px;
  }

  .rc-modal-inner {
    padding: 30px 22px;
    max-height: 95vh;
    width: 100%;
    max-width: calc(100vw - 30px);
  }

  .rc-popup-trigger {
    width: 100%;
    padding: 14px 24px;
  }
}
