/*
Theme Name: Rossana Torres Elementor Base
Theme URI: https://example.com/rossana-torres-elementor-base
Author: Tania Forero
Description: Tema base ligero para construir la web de Rossana Torres con Elementor. Define colores, tipografías, tamaños de contenedores, botones, espaciados responsive y estilos globales editables desde WordPress/Elementor. No incluye maqueta rígida en código.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: rossana-torres-elementor
*/

/*
  Rossana Torres — Design System for Elementor
  ------------------------------------------------------------------
  Uso recomendado en Elementor:
  - Sección principal: rt-section
  - Contenedor normal: rt-container
  - Contenedor amplio: rt-container-wide
  - Contenido de texto: rt-container-narrow o rt-container-text
  - Card: rt-card
  - Label superior: rt-label
  - Línea decorativa: rt-rule
  - Botones: rt-btn-primary, rt-btn-outline, rt-btn-light
*/

:root {
  /* ------------------------------------------------------------
   * Layout / Widths
   * ------------------------------------------------------------ */
  --rt-site-max: 1920px;
  --rt-container: 1280px;
  --rt-container-wide: 1320px;
  --rt-container-narrow: 820px;
  --rt-container-text: 480px;

  /* ------------------------------------------------------------
   * Brand Colors
   * ------------------------------------------------------------ */
  --rt-black: #2C2420;
  --rt-white: #FFFFFF;
  --rt-off-white: #FAF7F4;
  --rt-cream: #FAF7F4;
  --rt-cream-dark: #F5EDE7;
  --rt-rose: #F0E4DE;
  --rt-terracotta: #D4897A;
  --rt-terracota: #D4897A; /* Alias por compatibilidad con versión anterior */
  --rt-accent: #B07A6E;
  --rt-gray-light: #F5EDE7;
  --rt-gray-mid: #C8C4BE;
  --rt-gray-dark: #7A6560;
  --rt-border: #E8DDD6;

  /* ------------------------------------------------------------
   * Typography Families
   * ------------------------------------------------------------ */
  --rt-font-heading: 'Cormorant Garamond', serif;
  --rt-font-body-family: 'Jost', sans-serif;

  /* ------------------------------------------------------------
   * Responsive Spacing
   * Mobile aprox. 375px / Desktop aprox. 1440px+
   * ------------------------------------------------------------ */
  --rt-space-xs: clamp(0.5rem, 0.45rem + 0.25vw, 0.75rem);       /* 8px  -> 12px */
  --rt-space-sm: clamp(0.75rem, 0.65rem + 0.45vw, 1rem);         /* 12px -> 16px */
  --rt-space-md: clamp(1rem, 0.85rem + 0.75vw, 1.5rem);          /* 16px -> 24px */
  --rt-space-lg: clamp(1.5rem, 1.1rem + 1.5vw, 2.5rem);          /* 24px -> 40px */
  --rt-space-xl: clamp(2rem, 1.3rem + 2.5vw, 4rem);              /* 32px -> 64px */
  --rt-space-2xl: clamp(3.5rem, 2rem + 4vw, 6.25rem);            /* 56px -> 100px */
  --rt-space-3xl: clamp(4rem, 2.5rem + 5vw, 7.5rem);             /* 64px -> 120px */

  --rt-section-x: clamp(1.5rem, 0.8rem + 2.2vw, 3.5rem);         /* 24px -> 56px */
  --rt-section-y: clamp(3.5rem, 2rem + 4vw, 6.25rem);            /* 56px -> 100px */
  --rt-section-y-lg: clamp(4rem, 2.5rem + 5vw, 7.5rem);          /* 64px -> 120px */
  --rt-card-padding: clamp(1.375rem, 1rem + 1vw, 2.5rem);        /* 22px -> 40px */

  --rt-grid-gap: clamp(1.5rem, 1.1rem + 1.2vw, 3rem);            /* 24px -> 48px */
  --rt-card-gap: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);            /* 16px -> 24px */

  /* ------------------------------------------------------------
   * Responsive Font Sizes
   * ------------------------------------------------------------ */
  --rt-font-label: clamp(0.625rem, 0.58rem + 0.12vw, 0.6875rem);      /* 10px -> 11px */
  --rt-font-small: clamp(0.75rem, 0.70rem + 0.18vw, 0.8125rem);       /* 12px -> 13px */
  --rt-font-body: clamp(0.875rem, 0.83rem + 0.18vw, 0.9375rem);       /* 14px -> 15px */
  --rt-font-body-large: clamp(0.9375rem, 0.86rem + 0.28vw, 1rem);     /* 15px -> 16px */

  --rt-font-h4: clamp(1.25rem, 1.10rem + 0.55vw, 1.5rem);            /* 20px -> 24px */
  --rt-font-h3: clamp(1.625rem, 1.35rem + 0.90vw, 2.25rem);          /* 26px -> 36px */
  --rt-font-h2: clamp(2.125rem, 1.55rem + 2vw, 3.25rem);             /* 34px -> 52px */
  --rt-font-h1: clamp(2.5rem, 1.65rem + 3vw, 4rem);                  /* 40px -> 64px */

  /* Aliases por compatibilidad con versión anterior */
  --rt-h1-size: var(--rt-font-h1);
  --rt-h2-size: var(--rt-font-h2);
  --rt-h3-size: var(--rt-font-h3);
  --rt-h4-size: var(--rt-font-h4);
  --rt-body-size: var(--rt-font-body);
  --rt-small-size: var(--rt-font-small);
  --rt-label-size: var(--rt-font-label);

  /* ------------------------------------------------------------
   * Line Heights / Letter Spacing
   * ------------------------------------------------------------ */
  --rt-line-h1: 1.08;
  --rt-line-h2: 1.12;
  --rt-line-h3: 1.18;
  --rt-line-h4: 1.2;
  --rt-line-body: 1.75;
  --rt-line-body-loose: 1.9;
  --rt-line-label: 1.2;

  --rt-letter-label: 2.5px;
  --rt-letter-button: 2px;
  --rt-letter-menu: 1.5px;

  /* ------------------------------------------------------------
   * Buttons
   * ------------------------------------------------------------ */
  --rt-btn-font-size: clamp(0.625rem, 0.58rem + 0.12vw, 0.6875rem);
  --rt-btn-padding-y: clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem);
  --rt-btn-padding-x: clamp(1.5rem, 1.1rem + 1vw, 2rem);
  --rt-btn-radius: 2px;
  --rt-btn-letter: var(--rt-letter-button);
  --rt-btn-weight: 500;

  --rt-btn-bg: var(--rt-terracotta);
  --rt-btn-bg-hover: var(--rt-accent);
  --rt-btn-text: var(--rt-white);

  --rt-btn-outline-text: var(--rt-black);
  --rt-btn-outline-border: var(--rt-black);

  --rt-btn-light-bg: var(--rt-white);
  --rt-btn-light-text: var(--rt-black);

  /* Generic UI */
  --rt-radius: 2px;
  --rt-border-width: 1px;
  --rt-transition: 200ms ease;
}

/* ------------------------------------------------------------
 * Base / Reset
 * ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  max-width: var(--rt-site-max);
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--rt-white);
  color: var(--rt-black);
  font-family: var(--rt-font-body-family);
  font-size: var(--rt-font-body);
  font-weight: 300;
  line-height: var(--rt-line-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

p {
  margin-top: 0;
  color: inherit;
}

/* ------------------------------------------------------------
 * Global Typography
 * ------------------------------------------------------------ */
h1,
h2,
h3,
h4,
h5,
h6,
.rt-heading,
.elementor-heading-title {
  margin-top: 0;
  color: var(--rt-black);
  font-family: var(--rt-font-heading);
  font-weight: 300;
}

h1,
.rt-h1 .elementor-heading-title,
.elementor-heading-title.rt-h1 {
  font-size: var(--rt-font-h1);
  line-height: var(--rt-line-h1);
}

h2,
.rt-h2 .elementor-heading-title,
.elementor-heading-title.rt-h2 {
  font-size: var(--rt-font-h2);
  line-height: var(--rt-line-h2);
}

h3,
.rt-h3 .elementor-heading-title,
.elementor-heading-title.rt-h3 {
  font-size: var(--rt-font-h3);
  line-height: var(--rt-line-h3);
}

h4,
.rt-h4 .elementor-heading-title,
.elementor-heading-title.rt-h4 {
  font-size: var(--rt-font-h4);
  line-height: var(--rt-line-h4);
}

.rt-body-large,
.rt-body-large p,
.elementor-widget-text-editor.rt-body-large {
  font-size: var(--rt-font-body-large);
  line-height: var(--rt-line-body-loose);
}

.rt-body,
.rt-body p,
.elementor-widget-text-editor.rt-body {
  font-size: var(--rt-font-body);
  line-height: var(--rt-line-body);
}

.rt-small,
.rt-small p,
.elementor-widget-text-editor.rt-small {
  font-size: var(--rt-font-small);
  line-height: 1.6;
}

.rt-label,
.rt-label .elementor-heading-title,
.elementor-widget.rt-label .elementor-heading-title {
  color: var(--rt-gray-dark);
  font-family: var(--rt-font-body-family);
  font-size: var(--rt-font-label);
  font-weight: 400;
  line-height: var(--rt-line-label);
  letter-spacing: var(--rt-letter-label);
  text-transform: uppercase;
}

.rt-text-muted,
.rt-text-muted p,
.rt-text-muted .elementor-heading-title {
  color: var(--rt-gray-dark);
}

.rt-text-light,
.rt-text-light p,
.rt-text-light .elementor-heading-title {
  color: var(--rt-gray-mid);
}

/* ------------------------------------------------------------
 * Elementor Layout Helpers
 * ------------------------------------------------------------ */
.rt-site-max {
  max-width: var(--rt-site-max);
  margin-inline: auto;
}

.rt-section,
.rt-section-padding,
.e-con.rt-section,
.e-con.rt-section-padding,
.elementor-section.rt-section,
.elementor-section.rt-section-padding {
  padding: var(--rt-section-y) var(--rt-section-x);
}

.rt-section-lg,
.e-con.rt-section-lg,
.elementor-section.rt-section-lg {
  padding: var(--rt-section-y-lg) var(--rt-section-x);
}

.rt-container,
.e-con.rt-container,
.elementor-section.rt-container > .elementor-container {
  width: min(100%, var(--rt-container));
  max-width: var(--rt-container);
  margin-inline: auto;
}

.rt-container-wide,
.e-con.rt-container-wide,
.elementor-section.rt-container-wide > .elementor-container {
  width: min(100%, var(--rt-container-wide));
  max-width: var(--rt-container-wide);
  margin-inline: auto;
}

.rt-container-narrow,
.e-con.rt-container-narrow,
.elementor-section.rt-container-narrow > .elementor-container {
  width: min(100%, var(--rt-container-narrow));
  max-width: var(--rt-container-narrow);
  margin-inline: auto;
}

.rt-container-text,
.e-con.rt-container-text,
.elementor-section.rt-container-text > .elementor-container {
  width: min(100%, var(--rt-container-text));
  max-width: var(--rt-container-text);
}

.rt-gap-grid {
  gap: var(--rt-grid-gap);
}

.rt-gap-card {
  gap: var(--rt-card-gap);
}

/* ------------------------------------------------------------
 * Background Helpers
 * ------------------------------------------------------------ */
.rt-section-white {
  background: var(--rt-white);
}

.rt-section-soft,
.rt-bg-cream {
  background: var(--rt-cream);
}

.rt-section-cream-dark,
.rt-bg-cream-dark {
  background: var(--rt-cream-dark);
}

.rt-section-rose,
.rt-bg-rose {
  background: var(--rt-rose);
}

.rt-section-dark,
.rt-bg-dark {
  background: var(--rt-black);
  color: var(--rt-white);
}

.rt-section-dark h1,
.rt-section-dark h2,
.rt-section-dark h3,
.rt-section-dark h4,
.rt-section-dark h5,
.rt-section-dark h6,
.rt-section-dark .elementor-heading-title,
.rt-bg-dark h1,
.rt-bg-dark h2,
.rt-bg-dark h3,
.rt-bg-dark h4,
.rt-bg-dark h5,
.rt-bg-dark h6,
.rt-bg-dark .elementor-heading-title {
  color: var(--rt-white);
}

.rt-section-dark p,
.rt-bg-dark p {
  color: var(--rt-gray-mid);
}

/* ------------------------------------------------------------
 * Components
 * ------------------------------------------------------------ */
.rt-card {
  padding: var(--rt-card-padding);
  border: var(--rt-border-width) solid var(--rt-border);
  border-radius: var(--rt-radius);
  background: var(--rt-white);
}

.rt-card-soft {
  padding: var(--rt-card-padding);
  border: var(--rt-border-width) solid var(--rt-border);
  border-radius: var(--rt-radius);
  background: var(--rt-cream);
}

.rt-rule {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: var(--rt-accent);
}

.rt-rule-center {
  display: block;
  width: 48px;
  height: 1px;
  margin-inline: auto;
  background: var(--rt-accent);
}

/* ------------------------------------------------------------
 * Buttons for Elementor
 * Add class on Button widget: rt-btn-primary / rt-btn-outline / rt-btn-light
 * ------------------------------------------------------------ */
.rt-btn-primary .elementor-button,
.elementor-button.rt-btn-primary,
button.rt-btn-primary,
a.rt-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: var(--rt-btn-padding-y) var(--rt-btn-padding-x);
  border: 1px solid var(--rt-btn-bg);
  border-radius: var(--rt-btn-radius);
  background: var(--rt-btn-bg);
  color: var(--rt-btn-text);
  font-family: var(--rt-font-body-family);
  font-size: var(--rt-btn-font-size);
  font-weight: var(--rt-btn-weight);
  line-height: 1;
  letter-spacing: var(--rt-btn-letter);
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--rt-transition), border-color var(--rt-transition), color var(--rt-transition), transform var(--rt-transition);
}

.rt-btn-primary .elementor-button:hover,
.rt-btn-primary .elementor-button:focus,
.elementor-button.rt-btn-primary:hover,
.elementor-button.rt-btn-primary:focus,
button.rt-btn-primary:hover,
button.rt-btn-primary:focus,
a.rt-btn-primary:hover,
a.rt-btn-primary:focus {
  border-color: var(--rt-btn-bg-hover);
  background: var(--rt-btn-bg-hover);
  color: var(--rt-white);
}

.rt-btn-outline .elementor-button,
.elementor-button.rt-btn-outline,
button.rt-btn-outline,
a.rt-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: var(--rt-btn-padding-y) var(--rt-btn-padding-x);
  border: 1px solid var(--rt-btn-outline-border);
  border-radius: var(--rt-btn-radius);
  background: transparent;
  color: var(--rt-btn-outline-text);
  font-family: var(--rt-font-body-family);
  font-size: var(--rt-btn-font-size);
  font-weight: var(--rt-btn-weight);
  line-height: 1;
  letter-spacing: var(--rt-btn-letter);
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--rt-transition), border-color var(--rt-transition), color var(--rt-transition), transform var(--rt-transition);
}

.rt-btn-outline .elementor-button:hover,
.rt-btn-outline .elementor-button:focus,
.elementor-button.rt-btn-outline:hover,
.elementor-button.rt-btn-outline:focus,
button.rt-btn-outline:hover,
button.rt-btn-outline:focus,
a.rt-btn-outline:hover,
a.rt-btn-outline:focus {
  border-color: var(--rt-black);
  background: var(--rt-black);
  color: var(--rt-white);
}

.rt-btn-light .elementor-button,
.elementor-button.rt-btn-light,
button.rt-btn-light,
a.rt-btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: var(--rt-btn-padding-y) var(--rt-btn-padding-x);
  border: 1px solid var(--rt-btn-light-bg);
  border-radius: var(--rt-btn-radius);
  background: var(--rt-btn-light-bg);
  color: var(--rt-btn-light-text);
  font-family: var(--rt-font-body-family);
  font-size: var(--rt-btn-font-size);
  font-weight: var(--rt-btn-weight);
  line-height: 1;
  letter-spacing: var(--rt-btn-letter);
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--rt-transition), border-color var(--rt-transition), color var(--rt-transition), transform var(--rt-transition);
}

.rt-btn-light .elementor-button:hover,
.rt-btn-light .elementor-button:focus,
.elementor-button.rt-btn-light:hover,
.elementor-button.rt-btn-light:focus,
button.rt-btn-light:hover,
button.rt-btn-light:focus,
a.rt-btn-light:hover,
a.rt-btn-light:focus {
  border-color: var(--rt-cream-dark);
  background: var(--rt-cream-dark);
  color: var(--rt-black);
}

/* Botones full width en mobile cuando se necesite */
.rt-btn-full-mobile .elementor-button {
  width: 100%;
}

/* ------------------------------------------------------------
 * WordPress Shell / Elementor Compatibility
 * ------------------------------------------------------------ */
.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.content-wrap {
  width: min(calc(100% - (var(--rt-section-x) * 2)), var(--rt-container));
  margin: 0 auto;
  padding: var(--rt-section-y) 0;
}

/* Keep pages clean when Elementor is used */
.elementor-page .content-wrap {
  width: 100%;
  max-width: none;
  padding: 0;
}

/* Elementor default improvements */
.elementor-widget-text-editor {
  color: inherit;
  font-family: var(--rt-font-body-family);
  font-size: var(--rt-font-body);
  font-weight: 300;
  line-height: var(--rt-line-body);
}

.elementor-widget-text-editor p:last-child {
  margin-bottom: 0;
}

.elementor-widget-button .elementor-button {
  border-radius: var(--rt-btn-radius);
}

/* ------------------------------------------------------------
 * Responsive Fine Tuning
 * ------------------------------------------------------------ */
@media (max-width: 1024px) {
  :root {
    --rt-container: 92vw;
    --rt-container-wide: 92vw;
    --rt-container-narrow: 88vw;
  }
}

@media (max-width: 767px) {
  :root {
    --rt-container: 100%;
    --rt-container-wide: 100%;
    --rt-container-narrow: 100%;
    --rt-container-text: 100%;
  }

  .rt-section,
  .rt-section-padding,
  .e-con.rt-section,
  .e-con.rt-section-padding,
  .elementor-section.rt-section,
  .elementor-section.rt-section-padding {
    padding: var(--rt-section-y) var(--rt-section-x);
  }

  .rt-btn-full-mobile .elementor-button,
  .rt-btn-primary.rt-btn-full-mobile .elementor-button,
  .rt-btn-outline.rt-btn-full-mobile .elementor-button,
  .rt-btn-light.rt-btn-full-mobile .elementor-button {
    width: 100%;
  }
}
