/* ==========================================================================
   La Piedrera — Sistema de Diseño Mobile-First (Fiel a Maqueta)
   ========================================================================== */

:root {
  --lp-terracotta: #c55839;
  --lp-terracotta-eyebrow: #c45a3b;
  --lp-terracotta-price: #b94e30;
  --lp-dark: #151515;
  --lp-hero-bg: #292522;
  --lp-sand: #efe9e1;
  --lp-cream-btn: #f0e8df;
  --lp-muted: #777777;
  --lp-stock: #42864e;
  --lp-border: #e5e5e5;
  --lp-input-border: #dddddd;
  --lp-input-bg: #f8f8f8;
  --lp-font-body: 'Poppins', Arial, Helvetica, sans-serif;
  --lp-font-heading: 'Montserrat', Arial, Helvetica, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--lp-font-body);
  color: var(--lp-dark);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--lp-font-heading);
  font-weight: 800;
}

h2,
.lp-h2 {
  font-size: clamp(27px, 7vw, 36px);
  letter-spacing: -1px;
  line-height: 1.04;
  margin: 8px 0 12px;
}

p {
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
}

button,
select,
input,
textarea {
  font: inherit;
}

.lp-site-main {
  flex: 1 0 auto;
}

/* Accesibilidad */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.screen-reader-text:focus {
  background: #ffffff;
  color: var(--lp-dark);
  clip: auto !important;
  clip-path: none;
  font-weight: 600;
  height: auto;
  left: 12px;
  padding: 10px 16px;
  top: 12px;
  width: auto;
  z-index: 100000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Contenedores Mobile-First */
.lp-wrap {
  width: calc(100% - 36px);
  margin-inline: auto;
}

.lp-section {
  padding: 42px 0;
}

.lp-eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--lp-terracotta-eyebrow);
  text-transform: uppercase;
}

.lp-muted {
  font-size: 13px;
  color: var(--lp-muted);
  max-width: 440px;
}

.lp-sectionhead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.lp-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.lp-split > * {
  min-width: 0;
}

.lp-split h2 {
  max-width: 380px;
}

.lp-split p {
  margin: 12px 0;
}

/* Botones */
button,
.lp-btn,
.wpcf7 input[type="submit"],
.wpcf7 button[type="submit"] {
  cursor: pointer;
  border: 0;
  background: var(--lp-dark);
  color: #ffffff;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  min-height: 44px;
  text-align: center;
  transition: opacity 0.2s ease;
}

button:hover,
.lp-btn:hover,
.wpcf7 input[type="submit"]:hover,
.wpcf7 button[type="submit"]:hover {
  opacity: 0.82;
}

.lp-btn--outline {
  background: #ffffff;
  border: 1px solid #333333;
  color: var(--lp-dark);
}

.lp-btn--accent {
  background: var(--lp-terracotta);
  color: #ffffff;
}

/* ==========================================================================
   Cabecera (Header) Mobile-First
   ========================================================================== */
.lp-top {
  background: var(--lp-terracotta);
  color: #ffffff;
  text-align: center;
  font-size: 9px;
  padding: 9px 12px;
}

.lp-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 20px 0;
}

.lp-header__logo {
  flex-shrink: 0;
  display: inline-flex;
}

.lp-header__logo img,
.lp-header .custom-logo {
  width: 160px;
  height: auto;
  object-fit: contain;
  display: block;
}

.lp-header__contact {
  font-size: 11px;
  text-align: center;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.lp-header__contact > span,
.lp-header__contact > a {
  display: block;
}

.lp-header__contact .phones a {
  display: inline;
}

.lp-header__contact b {
  color: var(--lp-terracotta);
}

/* Barra de Navegación Principal */
.lp-nav {
  background: var(--lp-dark);
  color: #ffffff;
  display: block;
  padding: 4px 18px;
  font-size: 14px;
}

.lp-nav.is-sticky {
  position: sticky;
  top: 0;
  z-index: 999;
}

body.admin-bar .lp-nav.is-sticky {
  top: 46px;
}

.lp-mobile-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  min-height: 44px;
  background: transparent;
  color: #ffffff;
  padding: 8px 0;
  width: 100%;
  justify-content: flex-start;
}

.lp-mobile-toggle svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.lp-navlinks {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-bottom: 12px;
}

.lp-navlinks.open {
  display: flex;
}

.lp-nav__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.lp-nav__menu > li > a {
  display: flex;
  align-items: center;
  padding: 13px 8px;
  min-height: 44px;
  color: #ffffff;
}

.lp-nav__menu > li > a:hover {
  opacity: 0.82;
}

.lp-navlinks .lp-btn {
  background: var(--lp-terracotta);
  color: #ffffff;
  text-align: center;
  margin-top: 5px;
}

/* ==========================================================================
   Formularios (Contact Form 7 y Controles Globales) Mobile-First
   ========================================================================== */
.lp-form,
.wpcf7-form {
  display: grid;
  gap: 8px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--lp-input-border);
  background: var(--lp-input-bg);
  color: var(--lp-dark);
  padding: 12px;
  font-size: 16px;
  min-height: 48px;
  border-radius: 0;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.wpcf7-spinner {
  display: none;
}

.wpcf7 form .wpcf7-response-output {
  margin: 8px 0 0;
  padding: 10px 14px;
  font-size: 12px;
  border-width: 1px;
}

/* ==========================================================================
   Pie de Página (Footer) Mobile-First
   ========================================================================== */
.lp-footer {
  background: var(--lp-dark);
  color: #aaaaaa;
  border-top: 3px solid var(--lp-terracotta);
  padding: 30px 0;
  margin-top: auto;
}

.lp-footer .lp-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.lp-footer__logo img {
  width: 150px;
  height: auto;
  object-fit: contain;
  display: block;
}

.lp-footer__socials {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.lp-footer__social-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lp-footer__social-link img,
.lp-footer__social-link svg {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.lp-footer__copy {
  flex-basis: 100%;
  text-align: center;
  line-height: 1.7;
  font-size: 11px;
  margin: 0;
}

/* ==========================================================================
   Modal Nativo (<dialog>) Mobile-First
   ========================================================================== */
dialog.lp-modal {
  border: 0;
  border-radius: 8px;
  padding: 22px;
  max-width: 90%;
  width: 440px;
  max-height: 85dvh;
  overflow: auto;
  color: var(--lp-dark);
}

dialog.lp-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

dialog.lp-modal h2 {
  font-size: clamp(20px, 5vw, 26px);
  letter-spacing: -0.8px;
  margin: 0 0 10px;
}

dialog.lp-modal p {
  margin: 12px 0;
  font-size: 13px;
}

.lp-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* Lienzo Gutenberg para páginas estándar */
.lp-blocks-canvas > *:not(.alignfull):not(.alignwide):not(.lp-block) {
  width: calc(100% - 36px);
  margin-inline: auto;
}

/* ==========================================================================
   Breakpoints Tablet y Desktop (min-width: 761px / 1001px)
   ========================================================================== */
@media (min-width: 761px) {
  .lp-wrap,
  .lp-blocks-canvas > *:not(.alignfull):not(.alignwide):not(.lp-block) {
    width: 88%;
  }

  .lp-section {
    padding: 58px 0;
  }

  h2,
  .lp-h2 {
    font-size: clamp(28px, 4vw, 43px);
    letter-spacing: -1.8px;
  }

  .lp-muted {
    font-size: 12px;
  }

  button,
  .lp-btn,
  .wpcf7 input[type="submit"],
  .wpcf7 button[type="submit"] {
    min-height: 0;
  }

  .lp-sectionhead {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }

  .lp-split {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  /* Header Desktop */
  .lp-top {
    font-size: 10px;
    padding: 7px;
  }

  .lp-header {
    flex-direction: row;
    padding: 24px 0;
    gap: 20px;
  }

  .lp-header__logo img,
  .lp-header .custom-logo {
    width: 150px;
  }

  .lp-header__contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 20px;
    max-width: 760px;
    font-size: 12px;
    text-align: right;
  }

  .lp-header__contact > span,
  .lp-header__contact > a {
    display: inline;
  }

  .lp-header__contact .phones {
    flex-basis: 100%;
  }

  /* Nav Desktop */
  .lp-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 5px 12px;
    flex-wrap: wrap;
  }

  body.admin-bar .lp-nav.is-sticky {
    top: 32px;
  }

  .lp-mobile-toggle {
    display: none;
  }

  .lp-navlinks {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .lp-nav__menu {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
  }

  .lp-nav__menu > li {
    display: inline-flex;
    align-items: center;
    gap: 20px;
  }

  .lp-nav__menu > li:not(:last-child)::after {
    content: "|";
    color: rgba(255, 255, 255, 0.55);
    pointer-events: none;
  }

  .lp-nav__menu > li > a {
    padding: 0;
    min-height: 0;
    display: inline;
  }

  .lp-navlinks .lp-btn {
    margin-top: 0;
  }

  /* Inputs Desktop */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  select,
  textarea {
    padding: 13px;
    font-size: 12px;
    min-height: 0;
  }

  textarea {
    min-height: 90px;
  }

  /* Footer Desktop */
  .lp-footer .lp-wrap {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 35px;
  }

  .lp-footer__logo img {
    width: 145px;
  }

  .lp-footer__copy {
    flex-basis: auto;
    margin-left: auto;
    text-align: right;
    line-height: 1.5;
  }

  dialog.lp-modal {
    padding: 28px;
  }
}

@media (min-width: 1001px) {
  .lp-wrap,
  .lp-blocks-canvas > *:not(.alignfull):not(.alignwide):not(.lp-block) {
    width: min(76%, 1100px);
  }

  .lp-split {
    gap: 55px;
  }
}
