/* ── VARIABLES ── */
:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray-mid: #999999;
  --gray-dark: #333333;
  --accent: #c9a96e;
  --font-head: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --transition: 0.3s ease;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* ── RESET ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  padding: 1rem 0;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 150px;
  filter: brightness(0) invert(1);
  transition: var(--transition);
}

.navbar.scrolled .nav-logo img {
  filter: none;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--white);
  transition: var(--transition);
}

.navbar.scrolled .nav-menu a {
  color: var(--black);
}

.nav-menu a:hover {
  color: var(--accent);
}

.nav-cta {
  padding: 0.6rem 1.4rem !important;
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  border-radius: 2px;
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

.navbar.scrolled .nav-toggle span {
  background: var(--black);
}

/* ── HERO ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../img/fachada.png') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 0 1.5rem;
}

.hero-content h1 {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  opacity: 0.9;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.9rem 2.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: #b8904f;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--black);
}

/* ── SECCIONES GENERALES ── */
.section {
  padding: 6rem 2rem;
}

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

.section-gray {
  background: var(--gray-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-mid);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 4rem;
}

.section-dark .section-subtitle {
  color: #aaa;
}

.divider {
  width: 50px;
  height: 2px;
  background: var(--accent);
  margin: 1rem auto 1.5rem;
}

/* ── SERVICIOS ── */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.servicio-card {
  padding: 2.5rem 2rem;
  border: 1px solid #eee;
  text-align: center;
  transition: var(--transition);
  background: var(--white);
}

.servicio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.servicio-card i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.servicio-card h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.servicio-card p {
  color: var(--gray-mid);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── TESTIMONIOS ── */
.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.testimonio-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.stars {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.testimonio-card p {
  font-size: 0.95rem;
  line-height: 1.8;
  opacity: 0.85;
  margin-bottom: 1.2rem;
}

.testimonio-card strong {
  font-size: 0.85rem;
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.google-btn {
  display: inline-block;
  margin-top: 3rem;
  padding: 0.9rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: var(--transition);
}

.google-btn:hover {
  background: var(--white);
  color: var(--black);
}

/* ── BLOG PREVIEW ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.blog-card {
  border: 1px solid #eee;
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-body h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.blog-card-body p {
  color: var(--gray-mid);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.blog-card-body a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── CONTACTO ── */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contacto-info h3 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.contacto-info p {
  color: var(--gray-mid);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.contacto-info a {
  color: var(--accent);
}

.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contacto-form input,
.contacto-form textarea {
  padding: 0.9rem 1.2rem;
  border: 1px solid #ddd;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  background: var(--white);
}

.contacto-form input:focus,
.contacto-form textarea:focus {
  border-color: var(--accent);
}

.contacto-form textarea {
  resize: vertical;
  min-height: 130px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: var(--gray-mid);
}

.form-check input {
  width: auto;
  margin-top: 3px;
}

/* ── WHATSAPP FLOTANTE ── */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background: #1ebe5d;
}

/* ── FOOTER ── */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 4rem 2rem 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-brand img {
  height: 45px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h4 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  color: var(--accent);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #aaa;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-contact p {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.footer-contact a {
  color: #aaa;
  transition: var(--transition);
}

.footer-contact a:hover {
  color: var(--accent);
}

.footer-contact i {
  color: var(--accent);
  margin-right: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #1a1a1a;
  padding: 1.5rem 0;
  text-align: center;
  color: #555;
  font-size: 0.8rem;
}

/* ── ANIMACIONES ── */
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width:768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    color: var(--black) !important;
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* -- NOSOTROS -- */
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.nosotros-desc {
  color: var(--gray-mid);
  line-height: 1.9;
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.feature-item i {
  color: var(--accent);
  font-size: 1.4rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.feature-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.feature-item p {
  color: var(--gray-mid);
  font-size: 0.9rem;
  line-height: 1.7;
}

.nosotros-img-inner {
  width: 100%;
  height: 500px;
  background: url('../img/fachada.png') center/cover no-repeat;
  border-radius: 2px;
  filter: grayscale(20%);
}

@media (max-width:768px) {
  .nosotros-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .nosotros-img-inner {
    height: 300px;
  }
}

/* ── RESPONSIVE COMPLETO ── */

/* Tablets 1024px */
@media (max-width:1024px) {
  .nav-menu { gap:1.2rem; }
  .nosotros-grid { gap:3rem; }
  .footer-container { grid-template-columns:1fr 1fr; gap:2rem; }
  .footer-brand { grid-column: span 2; }
}

/* Ocultar elementos exclusivos de móvil por defecto */
.nav-menu-logo-mobile,
.nav-close-container { display: none; }

/* Tablets pequeñas 768px */
@media (max-width:768px) {
  /* Navbar */
  .nav-menu {
    position:fixed; top:0; right:-100%; width:75%; height:100vh;
    background:var(--white); flex-direction:column; justify-content:flex-start;
    gap:2rem; transition:var(--transition); box-shadow:var(--shadow);
    padding:6rem 2rem 2rem;
  }
  .nav-menu.active { right:0; }
  .nav-menu a { color:var(--black) !important; font-size:1.1rem; }
  .nav-toggle { display:flex; z-index:1001; }

  /* Nuevo botón de cerrar */
  .nav-close-container {
    display: block;
    position: absolute;
    top: 2rem;
    left: 2rem;
  }
  .nav-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--black);
    cursor: pointer;
    transition: var(--transition);
  }
  .nav-close:hover {
    color: var(--accent);
  }

  /* Nuevo logo dentro del menú desplegado */
  .nav-menu-logo-mobile { display: block; margin-bottom: 2rem; }
  .nav-menu-logo-mobile img { height: 65px; margin: 0 auto; filter: none; }

  /* Hero */
  .hero { height:100svh; }
  .hero-content h1 { font-size:clamp(2rem,8vw,3rem); }
  .hero-content p { font-size:0.95rem; }
  .hero-btns { flex-direction:column; align-items:center; }
  .hero-btns .btn { width:100%; max-width:280px; text-align:center; }

  /* Secciones */
  .section { padding:4rem 1.5rem; }
  .section-title { font-size:clamp(1.6rem,5vw,2.2rem); }

  /* Servicios */
  .servicios-grid { grid-template-columns:1fr; }

  /* Nosotros */
  .nosotros-grid { grid-template-columns:1fr; gap:2.5rem; }
  .nosotros-img-inner { height:280px; }
  .section-title[style] { text-align:center !important; }
  .divider[style] { margin-left:auto !important; }

  /* Testimonios */
  .testimonios-grid { grid-template-columns:1fr; }

  /* Blog */
  .blog-grid { grid-template-columns:1fr; }

  /* Contacto */
  .contacto-grid { grid-template-columns:1fr; gap:2.5rem; }
  .contacto-info { text-align:center; }
  .contacto-info div[style] { justify-content:center; display:flex; flex-wrap:wrap; gap:1rem; }

  /* Footer */
  .footer-container { grid-template-columns:1fr; gap:2rem; }
  .footer-brand { grid-column:auto; }
  .footer { padding:3rem 1.5rem 0; }

  /* WhatsApp flotante */
  .whatsapp-float { bottom:1.5rem; right:1.5rem; width:50px; height:50px; font-size:1.4rem; }
}

/* Móviles pequeños 480px */
@media (max-width:480px) {
  .nav-container { padding:0 1rem; }
  .nav-logo img { height:75px; }
  .hero-content h1 { font-size:clamp(1.8rem,7vw,2.5rem); }
  .section { padding:3.5rem 1rem; }
  .servicio-card { padding:2rem 1.5rem; }
  .testimonio-card { padding:1.5rem; }
  .blog-card-body { padding:1.2rem; }
  .contacto-form input,
  .contacto-form textarea { padding:0.8rem 1rem; font-size:0.9rem; }
  .btn { padding:0.8rem 1.8rem; font-size:0.85rem; }
  .footer-bottom { font-size:0.75rem; }
}

/* Pantallas grandes 1400px+ */
@media (min-width:1400px) {
  .container { max-width:1320px; }
  .hero-content h1 { font-size:5.5rem; }
  .section-title { font-size:3.2rem; }
  .servicio-card { padding:3rem 2.5rem; }
  .nosotros-img-inner { height:580px; }
}

/* Ajuste altura hero en landscape móvil */
@media (max-height:500px) and (orientation:landscape) {
  .hero { height:auto; min-height:100vh; padding:8rem 1rem 4rem; }
}

/* ── VALORACION ── */
.valoracion-wrapper {
  max-width:620px; margin:0 auto;
}
.valoracion-intro {
  text-align:center; color:var(--gray-mid); margin-bottom:2.5rem; line-height:1.7;
}
.valoracion-form {
  background:var(--white); padding:3rem; border:1px solid #eee; box-shadow:var(--shadow); border-radius:4px; display:flex; flex-direction:column; gap:1.5rem;
}
.form-row {
  display:grid; grid-template-columns:1fr 1fr; gap:1rem;
}
.valoracion-form input[type="text"],
.valoracion-form textarea {
  width:100%; padding:0.9rem 1.2rem; border:1px solid #ddd; font-family:var(--font-body); font-size:0.95rem; outline:none; transition:var(--transition); background:#fafafa;
}
.valoracion-form input[type="text"]:focus,
.valoracion-form textarea:focus {
  border-color:var(--accent); background:var(--white);
}
.valoracion-form textarea {
  resize:vertical; min-height:140px;
}
.star-rating-group {
  margin:1rem 0;
}
.star-rating-group label {
  display:block; font-size:0.9rem; color:var(--gray-mid); margin-bottom:0.8rem; font-weight:500;
}
.star-rating {
  display:inline-flex; flex-direction:row-reverse; justify-content:flex-end;
}
.star-rating input {
  display:none;
}
.star-rating label {
  color:#ddd; font-size:1.8rem; padding:0 0.2rem; cursor:pointer; transition:color 0.2s; margin:0;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color:var(--accent);
}
@media (max-width:768px) {
  .valoracion-form { padding:2rem 1.5rem; }
  .form-row { grid-template-columns:1fr; }
}