/* ======================================================
   VARIABLES GLOBALES
====================================================== */
:root {
  --accent: #4b2fdf;
  --accent-dark: #3d25c2;
  --accent-contrast: #ffffff;
  --page-bg: #ffffff;
  --card-bg: #ffffff;
  --text-muted: #6b6f76;
  --navbar-h: 100px;
  --footer-h: 0px;
}

/* ======================================================
   RESET GLOBAL
====================================================== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--page-bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #222;
  overflow-x: hidden;
}

/* Ocultar scrollbar en Chrome, Safari y Opera */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* Ocultar scrollbar en Firefox */
html {
  scrollbar-width: none;
}

/* Ocultar scrollbar en IE/Edge */
body {
  -ms-overflow-style: none;
}

/* ======================================================
   LAYOUT BASE
====================================================== */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ======================================================
   NAVBAR
====================================================== */
.navbar {
  height: var(--navbar-h);
  min-height: var(--navbar-h);
  background: #fff !important;
  box-shadow: 0 3px 10px rgba(33,33,33,0.08);
  position: relative;
  z-index: 10000;
  padding: 1rem 0;
}

.navbar-brand img {
  height: 70px !important;
  max-height: 70px !important;
  width: auto;
  max-width: 400px;
  object-fit: contain;
}

/* Foto de perfil en navbar - MÁS GRANDE */
.navbar .rounded-circle {
  border: none !important;
  width: 45px !important;
  height: 45px !important;
  object-fit: cover;
}

.nav-link {
  font-weight: 500;
  color: #444 !important;
  padding-top: .35rem !important;
  padding-bottom: .35rem !important;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
}

.navbar .dropdown-menu {
  z-index: 100000 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25) !important;
  border: 1px solid rgba(0,0,0,0.1);
  position: absolute !important;
}

.navbar .dropdown {
  z-index: 100000 !important;
}

/* ======================================================
   HERO PRINCIPAL
====================================================== */
.page-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem 1rem;
  min-height: 120px;
  max-height: 120px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.page-hero h1 {
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -1px;
  margin-bottom: .2rem;
  color: #222;
}

.page-hero h2 {
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -1px;
  margin-bottom: .2rem;
  color: #222;
}

.page-hero p,
.page-hero .lead {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  font-size: 0.85rem;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  font-size: 0.85rem;
}

/* ======================================================
   FORMULARIO DE CONTACTO
====================================================== */
.contact-card {
  max-width: 100%;
}

.contact-card .form-label {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.contact-card .form-control {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
}

.contact-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.contact-card p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.contact-card .mb-2 {
  margin-bottom: 0.5rem !important;
}

/* ======================================================
   TARJETAS GENERALES
====================================================== */
.card-clean,
.service-card,
.prop-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(33,33,33,0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-clean:hover,
.service-card:hover,
.prop-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(33,33,33,0.1);
}

/* ======================================================
   SEARCH CARD
====================================================== */
.search-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 10px 30px rgba(33,33,33,0.06);
}

/* ======================================================
   SERVICIOS
====================================================== */
.services {
  padding: 0 0 3rem;
  margin-top: -1rem;
}

.service-card {
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card .img-wrap {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f9ff;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-card .service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: .3s ease;
}

.service-card:hover .service-img {
  transform: scale(1.05);
}

.service-card h5 {
  font-weight: 700;
  margin-top: .6rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: .96rem;
}

/* ======================================================
   LLAVE EN MANO
====================================================== */
.llave-section {
  padding: 3rem 0 4rem;
  text-align: center;
}

.llave-img {
  width: 320px;
  height: 240px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(33,33,33,0.06);
  margin: 0 auto 1rem;
}

/* ======================================================
   TARJETAS DE PROPIEDADES
====================================================== */
.prop-card {
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(33,33,33,0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.prop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(33,33,33,0.12);
}

.prop-card img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

/* ======================================================
   BOTONES
====================================================== */
.btn-primary {
  background: var(--accent);
  border: none;
  padding: .65rem 1.3rem;
  border-radius: 8px;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 8px;
  padding: .65rem 1.2rem;
  border: none;
  font-weight: 700;
}

.btn-accent:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* ======================================================
   FOOTER
====================================================== */
footer {
  margin-top: auto;
  width: 100%;
  background: #ffffff !important;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.12);
  border-top: 2px solid #e9ecef;
  padding: 0.5rem 0;
}

footer .container {
  max-width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

footer .row {
  min-height: 50px;
  align-items: center;
}

footer a {
  color: #444 !important;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  line-height: 1.5;
  display: inline-block;
  margin: 0 0.75rem;
}

footer a:hover {
  color: var(--accent) !important;
  transform: translateY(-1px);
}

footer .fs-5 {
  color: #222;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
}

footer small {
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Forzar que todos los contenidos del footer tengan la misma altura */
footer .col-md-3 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}

/* ======================================================
   BANNER DE COOKIES (RGPD)
====================================================== */
#cookieBanner,
#cookiePreferences {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 999999;
  padding: 1.5rem 0;
  border-top: 3px solid var(--accent);
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

#cookieBanner.show,
#cookiePreferences.show {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.cookie-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.cookie-text {
  flex: 1;
  padding-right: 1rem;
}

.cookie-text h5 {
  font-weight: 700;
  color: #222;
  margin-bottom: 0.5rem;
}

.cookie-text p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-buttons .btn {
  white-space: nowrap;
  font-weight: 600;
}

.cookie-preference-item {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 3px solid var(--accent);
}

.cookie-preference-item h6 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cookie-preference-item p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Responsive */
/* ======================================================
   RESPONSIVE MODERNO (MÓVIL)
====================================================== */
@media (max-width: 768px) {
    /* 1. Ajuste del Navbar y el menú desplegable */
    .navbar-collapse {
        background: #ffffff; /* Fondo sólido para que no se transparente el texto de atrás */
        position: absolute;
        top: 100%; /* Justo debajo de la barra */
        left: 0;
        right: 0;
        padding: 1.5rem;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1); /* Sombra para que flote sobre el contenido */
        border-bottom: 3px solid var(--accent);
        border-radius: 0 0 15px 15px;
    }

    /* 2. Enlaces del menú más grandes para "dedos" */
    .nav-link {
        padding: 0.8rem 0 !important;
        font-size: 1.1rem;
        border-bottom: 1px solid #f0f0f0; /* Línea divisoria sutil */
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    /* 3. Ajuste del Hero para que no se amontone */
    .page-hero {
        min-height: 160px; /* Le damos un poco más de aire */
        max-height: none;  /* Quitamos el límite rígido en móvil */
        padding: 2.5rem 1rem;
        margin-top: 0;
    }

    .page-hero h1, .page-hero h2 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    /* 4. Perfil de usuario en el menú móvil */
    .navbar .dropdown-menu {
        position: static !important; /* Que no flote en móvil, que se expanda */
        box-shadow: none !important;
        border: none;
        padding-left: 1rem;
        background: #f8f9fa;
        border-radius: 8px;
    }

    /* Logo un poco más pequeño en móvil */
    .navbar-brand img {
        height: 50px !important;
    }
}

@media (max-height: 650px) {
  .page-hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}
