/* ============================================================
       VARIABLES & BASE
    ============================================================ */
:root {
  --green: #2e7d32;
  --green-light: #43a047;
  --green-bright: #66bb6a;
  --dark: #0d0d0d;
  --dark2: #111111;
  --dark3: #1a1a1a;
  --gray-bg: #d6d6d6;
  --white: #ffffff;
  --font-display: "Playfair Display", serif;
  --font-body: "DM Sans", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
}
/* ============================================================
       NAVBAR
    ============================================================ */
#mainNav {
  background: rgba(10, 10, 10, 0.82);
  -webkit-backdrop-filter: blur(14px); /* primero el prefijo */
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.4s;
  z-index: 1000;
}

#mainNav.scrolled {
  background: rgba(5, 5, 5, 0.97);
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white) !important;
  letter-spacing: 0.02em;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78) !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding: 0.5rem 0.9rem !important;
  transition: color 0.3s;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  right: 50%;
  height: 1.5px;
  background: var(--green-light);
  transition:
    left 0.3s,
    right 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
  left: 0.9rem;
  right: 0.9rem;
}

/* ============================================================
     INICIO
   ============================================================ 
*/
#inicio {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("./img/fondo_contadora.jpg") center/cover no-repeat;
  filter: brightness(0.38) grayscale(0.25);
  transform: scale(1.06);
  animation: heroZoom 18s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from {
    transform: scale(1.06);
  }
  to {
    transform: scale(1.12);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.45) 50%,
    rgba(10, 40, 10, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  max-width: 520px;
  -webkit-backdrop-filter: blur(4px); /* Safari */
  backdrop-filter: blur(4px);
  animation: fadeUp 1.1s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
  animation: fadeUp 1s 0.2s ease both;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--green-bright);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0.1rem 0 0.1rem;
  animation: fadeUp 1s 0.45s ease both;
}
.texto-inicio {
  animation: fadeUp 1s 0.45s ease both;
}
.btn-hero {
  display: inline-block;
  padding: 0.7rem 2.2rem;
  background: var(--green);
  color: var(--white);
  border: 2px solid var(--green);
  border-radius: 4px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.25s,
    box-shadow 0.3s;
  animation: fadeUp 1s 0.65s ease both;
}

.btn-hero:hover {
  background: transparent;
  color: var(--white);
  box-shadow: 0 0 22px rgba(46, 125, 50, 0.55);
  transform: translateY(-2px);
}

/*Scroll*/
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.55;
  animation: fadeIn 2s 1.5s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.55;
  }
}

.scroll-hint span {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 18px;
  height: 18px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: rotate(45deg) translateY(0);
  }
  50% {
    transform: rotate(45deg) translateY(6px);
  }
}

/* ============================================================
    SERVICIOS
   ============================================================ 
*/
#servicios {
  position: relative;
  padding: 7rem 0 6rem;
  overflow: hidden;
  width: 100vw; /* ← ancho completo del viewport */
  margin-left: calc(-50vw + 50%); /* ← truco para romper el container */
  background-image:
    linear-gradient(rgba(5, 5, 5, 0.8), rgba(5, 5, 5, 0.8)),
    url("img/fondo_servicios.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 700;
  position: relative;
}

.services-grid {
  position: relative;
  z-index: 2;
}

.service-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 1.6rem 1.4rem;
  height: 100%;
  transition:
    background 0.35s,
    border-color 0.35s,
    transform 0.35s,
    box-shadow 0.35s;
  cursor: default;
}

.service-card:hover {
  background: rgba(46, 125, 50, 0.14);
  border-color: var(--green-light);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.service-icon {
  font-size: 1.7rem;
  color: var(--green-light);
  margin-bottom: 0.75rem;
  display: block;
}

.service-card h5 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.service-card p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
}

/* ============================================================
    SOBRE MÍ
   ============================================================ 
*/
#sobre-mi {
  background-color: var(--gray-bg);
  background-image: url("./img/fondo_sobre_mi.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #1a1a1a;
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 900;
  position: relative;
  display: inline-block;
  color: #111;
}

.about-title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #333;
}

.about-img {
  border-radius: 10px;
  box-shadow: 0 0px 0px rgba(0, 0, 0, 0.22);
  width: 500px;
  max-width: 100%;
  object-fit: cover;
  transform: rotate(0.8deg);
  transition: transform 0.5s;
  margin-left: 8rem;
}

.about-img:hover {
  transform: rotate(0deg) scale(1.01);
}

/* ============================================================
       CONTACTO
   ============================================================
*/
#contacto {
  background: #000;
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

#contacto::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(46, 125, 50, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
}

.form-label-custom {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.3rem;
}

.form-control-custom {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 0.6rem 0.9rem;
  transition:
    border-color 0.3s,
    box-shadow 0.3s,
    background 0.3s;
  width: 100%;
  outline: none;
}

.form-control-custom:focus {
  border-color: var(--green-light);
  background: rgba(46, 125, 50, 0.08);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.18);
  color: var(--white);
}

.form-control-custom::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

textarea.form-control-custom {
  resize: vertical;
  min-height: 110px;
}

.btn-send {
  background: var(--green);
  border: none;
  color: var(--white);
  padding: 0.72rem 2.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.3s,
    transform 0.25s,
    box-shadow 0.3s;
}

.btn-send:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(46, 125, 50, 0.4);
}

/* Contacto panel */
.ci-icon--wa {
  color: #25d366;
}

.ci-value--lg {
  font-size: 1rem;
}

.contact-info {
  padding-left: 1.5rem;
}

.contact-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 2rem;
}

.contact-info-item .ci-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.contact-info-item .ci-value {
  font-size: 0.92rem;
  color: var(--white);
  line-height: 1.5;
}

.ci-icon {
  font-size: 2.5rem;
  color: var(--green-light);
  margin-bottom: 0.2rem;
}

/* Mapa */
.map-embed {
  width: 100%;
  border-radius: 10px 10px;
  border: none;
  height: 200px;
  filter: grayscale(0.4) contrast(0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* QR */
.qr-box {
  border-radius: 100px;
}

/* Redes Sociales */
.social-bar {
  display: flex;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.social-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.45rem;
  text-decoration: none;
  transition:
    border-color 0.3s,
    color 0.3s,
    background 0.3s,
    transform 0.3s;
}

.social-bar a:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  transform: translateY(-3px);
}

/* WhatsApp */
.wa-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 0.6rem;
}

.wa-number {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
}

/* ============================================================
       FOOTER
   ============================================================
*/
footer {
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.2rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
}

footer span {
  color: var(--green-light);
}

/* ============================================================
       SCROLL REVEAL ANIMATIONS
   ============================================================ 
*/
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.delay-1 {
  transition-delay: 0.12s;
}
.delay-2 {
  transition-delay: 0.24s;
}
.delay-3 {
  transition-delay: 0.36s;
}
.delay-4 {
  transition-delay: 0.48s;
}
.delay-5 {
  transition-delay: 0.6s;
}
.delay-6 {
  transition-delay: 0.72s;
}
.delay-7 {
  transition-delay: 0.84s;
}
.delay-8 {
  transition-delay: 0.96s;
}

/* ============================================================
       WHATSAPP FLOATING BUTTON
   ============================================================ 
*/
.wa-float {
  position: fixed;
  bottom: 1.8rem;
  right: 1.8rem;
  width: 54px;
  height: 54px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  text-decoration: none;
  z-index: 9999;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  animation: waPulse 3s ease infinite;
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(37, 211, 102, 0.6);
  color: #fff;
}

@keyframes waPulse {
  0%,
  100% {
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
  }
  50% {
    box-shadow: 0 6px 36px rgba(37, 211, 102, 0.75);
  }
}

/* ============================================================
       RESPONSIVE
   ============================================================
*/
@media (max-width: 1439px) {
  .about-img {
    transform: none;
    max-width: 100%;
    height: auto; /* ← altura automática para que no se corte */
    margin: 0 auto; /* ← centra la imagen */
    display: block; /* ← necesario para que el margin auto funcione */
  }
}
@media (max-width: 908px) {
  .contact-info {
    padding-left: 0;
    margin-top: 3rem;
  }
  .about-img {
    transform: none;
    max-width: 100%;
    height: auto; /* ← altura automática para que no se corte */
    margin: 0 auto; /* ← centra la imagen */
    display: block; /* ← necesario para que el margin auto funcione */
  }
}
@media (max-width: 992px) {
  #sobre-mi {
    background-size: cover;
    background-position: top center;
    padding: 5rem 0;
  }
}

@media (max-width: 768px) {
  #sobre-mi {
    background-size: cover;
    background-position: center center;
    background-attachment: scroll; /* evita problemas en iOS */
    padding: 3.5rem 0;
  }
}
/* Navbar toggler */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}