/* GOOGLE FONTS - Importar Playfair Display y Montserrat */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Variables de color - IDENTIDAD CORRECTA */
:root {
  --primary: #556644;      /* Verde Gestión Raíz */
  --beige: #fcfaf8;        /* Beige claro */
  --dark: #000000;         /* Negro */
  --white: #ffffff;        /* Blanco */
  --light: #f5f5f5;        /* Gris muy claro */
  --accent: #556644;       /* Verde para acentos */
  --border: #e0e0e0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ NAVBAR ============ */
.navbar {
  background: var(--primary);
  color: var(--white);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  font-weight: bold;
  font-family: 'Playfair Display', serif;
}

.logo {
  background: var(--primary);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 24px;
  letter-spacing: -1px;
  font-family: 'Playfair Display', serif;
}

.brand-text {
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  font-family: 'Playfair Display', serif;
}

.navbar-menu {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--beige);
}

.nav-link.nav-cta {
  background: var(--white);
  color: var(--primary);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
}

.nav-link.nav-cta:hover {
  color: var(--primary);
  background: rgba(255,255,255,0.9);
}

.nav-link.nav-cta::after {
  display: none;
}

.nav-link.nav-logout {
  font-weight: 700;
  margin-left: 10px;
}

/* Mobile navbar */
@media (max-width: 768px) {
  .navbar-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .navbar-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
  }

  .nav-link {
    font-size: 12px;
  }
  
  .navbar-brand a {
    gap: 8px;
  }
  
  .logo {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  
  .brand-text {
    font-size: 11px;
  }
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url('/public/images/fotocasino.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 100px 20px;
  text-align: center;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  font-weight: 400;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.5px;
  color: white;
}

.hero-content em {
  font-style: italic;
}

.hero-content p {
  font-size: 1.2rem;
  font-weight: 300;
  font-family: 'Montserrat', sans-serif;
  color: #f0f0f0;
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 20px;
    min-height: 50vh;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content p {
    font-size: 1rem;
  }
}

/* ============ SECCIÓN DE SERVICIOS ============ */
.services {
  padding: 80px 20px;
  background: var(--white);
}

.services h2 {
  font-size: 2.2rem;
  margin-bottom: 40px;
  color: var(--dark);
  font-weight: 400;
  font-family: 'Playfair Display', serif;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 15px;
  display: inline-block;
}

.services-description {
  max-width: 600px;
  margin-bottom: 50px;
  color: #555;
}

.services-description p {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 10px;
  line-height: 1.6;
}

.services-description p:first-of-type {
  font-weight: bold;
  font-size: 1.1rem;
  color: #222;
}

.services-grid {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.service-card {
  flex: 1;
  min-width: 280px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.service-card-image {
  height: 220px;
  background-size: cover;
  background-position: center;
}

.service-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 25px 22px;
  background: var(--primary);
  color: var(--white);
  text-align: left;
  transition: background 0.4s ease;
}

.service-card:hover .service-card-content {
  background: #ffffff;
}

.service-card h3 {
  color: var(--white);
  margin-bottom: 10px;
  font-size: 1.25rem;
  font-weight: 400;
  font-family: 'Playfair Display', serif;
  transition: color 0.4s ease;
}

.service-card:hover h3 {
  color: #556644;
}

.service-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e8ece3;
  margin: 0;
  font-weight: 300;
  font-family: 'Montserrat', sans-serif;
  transition: color 0.4s ease;
}

.service-card:hover p {
  color: #556644;
}

.services-cta {
  text-align: center;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 14px 36px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn:hover {
  background: #475131;
}

/* ============ SECCIÓN SOBRE NOSOTROS ============ */
.about {
  background: var(--primary);
  color: var(--white);
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.about img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.about-content {
  max-width: 850px;
  margin: 0 auto;
  padding: 60px 20px 80px;
}

.about h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  font-weight: 400;
  font-family: 'Playfair Display', serif;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding-bottom: 15px;
}

.about h2 em {
  font-style: italic;
}

.about p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #f0f5eb;
  font-weight: 300;
  font-family: 'Montserrat', sans-serif;
}

/* ============ LISTADO DE PROPIEDADES ============ */
.properties-section {
  background-color: var(--white);
  padding-bottom: 60px;
}

.hero-banner {
  position: relative;
  width: 100%;
  height: 320px;
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/public/images/fotocasino.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 40px;
}

.hero-banner h2 {
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.hero-banner h2 em {
  font-style: italic;
  font-weight: 700;
}

.properties-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  grid-column: 1 / -1;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 15px;
}

.filters {
  background: transparent;
  padding: 0;
  box-shadow: none;
  position: static;
}

.filter-group-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: bold;
  color: #444;
  margin-top: 25px;
  margin-bottom: 12px;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.checkbox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.btn-submit-filters {
  width: 100%;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px;
  margin-top: 20px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit-filters:hover {
  background-color: #475131;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
}

.property-card {
  background: var(--white);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 0px;
}

.property-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.property-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.property-card-content {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.property-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 6px;
}

.property-card-location {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 12px;
}

.property-card-details {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 15px;
  border-top: 1px solid #f9f9f9;
  padding-top: 8px;
}

.btn-view-more {
  display: inline-block;
  margin: 0 auto;
  padding: 6px 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: transparent;
  transition: all 0.2s;
  font-family: 'Montserrat', sans-serif;
}

.property-card:hover .btn-view-more {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

@media (max-width: 768px) {
  .properties-container {
    grid-template-columns: 1fr;
  }
  .filters {
    display: block;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
  }
  .checkbox-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  .checkbox-item {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid #eee;
  }
}

/* ============ DETALLE DE PROPIEDAD ============ */
.property-detail {
  padding: 40px 20px;
  background: var(--light);
  min-height: 100vh;
}

.property-detail-container {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

.property-detail-image-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.property-detail-main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 4px;
}

.property-detail-content {
  padding: 0;
}

.property-detail-title {
  font-size: 28px;
  color: var(--dark);
  margin-bottom: 15px;
  font-weight: 600;
  font-family: 'Playfair Display', serif;
}

.property-detail-price {
  font-size: 28px;
  color: var(--primary);
  font-weight: bold;
  margin-bottom: 30px;
  font-family: 'Montserrat', sans-serif;
}

.property-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.spec {
  text-align: left;
}

.spec-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

.spec-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  font-family: 'Montserrat', sans-serif;
}

.property-description {
  margin-bottom: 30px;
  line-height: 1.8;
  color: #555;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
}

.property-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s;
  border: 2px solid transparent;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

.property-contact {
  background: var(--light);
  padding: 20px;
  border-radius: 4px;
  text-align: center;
  margin-top: 30px;
}

.property-contact p {
  margin-bottom: 15px;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
}

.property-contact a {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
}

@media (max-width: 768px) {
  .property-detail-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .property-detail-main-image {
    height: 250px;
  }

  .property-specs {
    grid-template-columns: 1fr;
  }
  
  .property-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ DETALLE DE PROPIEDAD (nuevo diseño) ============ */
.property-detail-page {
  background: var(--white);
  padding-bottom: 60px;
}

.property-page-wrapper {
  padding-top: 40px;
}

.property-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.page-main-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--dark);
}

.btn-back-outline {
  display: inline-block;
  background: var(--white);
  color: var(--dark);
  border: 1px solid var(--border);
  padding: 10px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-back-outline:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.property-card-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.property-layout-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 50px;
}

.property-left-col {
  display: flex;
  flex-direction: column;
}

.main-display-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.main-display-image.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  color: #999;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
}

.property-description-box {
  margin-top: 25px;
}

.property-description-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 12px;
}

.property-description-box p {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #666;
}

.property-right-col h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 20px;
}

.details-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 30px;
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-item .spec-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #999;
  font-weight: 600;
}

.spec-item .spec-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  color: var(--dark);
  font-weight: 600;
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 30px;
}

.thumb-img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  display: block;
}

.thumb-img:hover {
  border-color: var(--primary);
  transform: scale(1.03);
}

.action-btn-container {
  text-align: right;
}

.btn-enviar-consulta {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Montserrat', sans-serif;
  transition: background 0.3s;
}

.btn-enviar-consulta:hover {
  background: #475131;
}

@media (max-width: 900px) {
  .property-layout-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .property-card-box {
    padding: 20px;
  }

  .main-display-image {
    height: 250px;
  }

  .page-main-title {
    font-size: 1.6rem;
  }

  .details-specs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
  }

  .gallery-thumbnails {
    grid-template-columns: repeat(3, 1fr);
  }

  .action-btn-container {
    text-align: center;
  }

  .btn-enviar-consulta {
    width: 100%;
    text-align: center;
  }
}

/* ============ FOOTER ============ */
.footer {
  background: var(--white);
  padding: 60px 0 40px 0;
  margin-top: 0;
  position: relative;
  z-index: 10;
  border-top-left-radius: 50px;
  border-top-right-radius: 50px;
  transform: translateY(-50px);
  margin-bottom: -50px;
}

.footer .container {
  background: transparent;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  margin-bottom: 0;
}

.footer-section {
  text-align: left;
  font-family: 'Montserrat', sans-serif;
}

.footer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-social {
  display: flex;
  gap: 15px;
  align-items: center;
}

.footer-body {
  margin-bottom: 10px;
}

.footer-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: #222;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 400;
}

.footer-section p {
  font-size: 0.92rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 8px;
}

.footer-section a {
  color: #555;
  text-decoration: none;
}

.footer-section a:hover {
  text-decoration: underline;
}

.footer-section ul {
  list-style: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  font-size: 0.78rem;
  color: #888;
  font-family: 'Montserrat', sans-serif;
}

/* ============ FORMULARIOS ADMIN ============ */
.admin-form {
  max-width: 600px;
  margin: 40px auto;
  background: var(--white);
  padding: 40px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
  font-family: 'Montserrat', sans-serif;
}

.btn-submit:hover {
  background: #475131;
}

/* Admin Dashboard */
.admin-dashboard {
  padding: 40px 20px;
  background: var(--light);
  min-height: 100vh;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.admin-header h1 {
  font-size: 28px;
  color: var(--dark);
  font-family: 'Playfair Display', serif;
}

.admin-header a {
  background: var(--primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 13px;
}

.admin-table {
  width: 100%;
  background: var(--white);
  border-collapse: collapse;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-radius: 6px;
  overflow: hidden;
}

.admin-table th {
  background: var(--primary);
  color: var(--white);
  padding: 15px;
  text-align: left;
  font-weight: bold;
  font-family: 'Montserrat', sans-serif;
}

.admin-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  font-family: 'Montserrat', sans-serif;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-actions a,
.admin-actions form button {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

.edit-btn {
  background: var(--primary);
  color: var(--white);
}

.delete-btn {
  background: #dc3545;
  color: var(--white);
}

.activate-btn {
  background: #28a745;
  color: var(--white);
}

/* ============ BOTÓN FLOTANTE WHATSAPP ============ */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  background-color: #20ba5a;
}

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
  display: block;
}

@media (max-width: 768px) {
  .whatsapp-btn {
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
  }
  
  .whatsapp-btn svg {
    width: 28px;
    height: 28px;
  }
}

/* Botón volver */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.3s;
  font-family: 'Montserrat', sans-serif;
}

.btn-back:hover {
  background: #475131;
}

/* Alert styles */
.alert {
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-family: 'Montserrat', sans-serif;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.services-header {
  max-width: 600px;
  margin-bottom: 50px;
  text-align: left;
}

.services-header h2 {
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  display: inline-block;
  width: 100%;
}

.services-subtitle {
  font-weight: bold;
  font-size: 1.1rem;
  margin-top: 20px;
  color: #222;
}

.services-description {
  color: #666;
  line-height: 1.6;
  margin-top: 10px;
}

.about-image {
  width: 100%;
  max-height: 380px;
  overflow: hidden;
  margin-bottom: 0;
}

.about-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: bottom;
  display: block;
}

.about-content {
  background-color: var(--primary);
  padding: 60px 0 100px 0;
  color: white;
  margin-top: -5px;
}

.about-content .container {
  max-width: 850px;
  text-align: left;
}

.about-content h2 {
  color: white;
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding-bottom: 15px;
}

.about-content h2 em {
  font-style: italic;
}

.about-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #f0f5eb;
  font-weight: 300;
}

/* ==========================================================================
   FIX: Tarjetas de servicio del Home (portado del CSS viejo)
   Estas reglas pisan el .service-card / .services-grid genérico de más
   arriba en este mismo archivo, por eso llevan !important.
   ========================================================================== */

.services-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 30px !important;
  margin-top: 40px !important;
  margin-bottom: 50px !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr !important;
  }
}

.service-card {
  background: var(--white) !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform 0.3s, box-shadow 0.3s !important;
  height: 420px !important;
  position: relative !important;
}

.service-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.15) !important;
}

.service-img-box {
  height: 55% !important;
  width: 100% !important;
  overflow: hidden !important;
}

.service-img-box img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.service-text-box {
  height: 45% !important;
  background-color: var(--primary) !important;
  padding: 25px 20px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  transition: background-color 0.3s ease, color 0.3s ease !important;
}

.service-text-box h3 {
  color: var(--white) !important;
  margin-top: 0 !important;
  margin-bottom: 10px !important;
  font-size: 1.3rem !important;
  font-weight: 500 !important;
  font-family: 'Playfair Display', serif !important;
  transition: color 0.3s ease !important;
}

.service-text-box p {
  font-size: 0.88rem !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0 !important;
  font-weight: 300 !important;
  font-family: 'Montserrat', sans-serif !important;
  transition: color 0.3s ease !important;
}

.service-card:hover .service-text-box {
  background-color: var(--white) !important;
  border-top: 1px solid #eee !important;
}

.service-card:hover .service-text-box h3 {
  color: var(--primary) !important;
}

.service-card:hover .service-text-box p {
  color: #555 !important;
}

/* ==========================================================================
   FIX: Logo del navbar/footer e íconos que faltaban en este CSS
   ========================================================================== */

.navbar-logo {
  height: 55px;
  width: auto;
  object-fit: contain;
}

.footer-logo {
  height: 65px;
  width: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 10px;
}

.instagram-link {
  color: var(--primary);
  display: inline-block;
}

.admin-logout-box .btn-logout {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE MOBILE - AJUSTES GENERALES
   Cubre navbar, hero, servicios, sobre nosotros, propiedades, detalle de
   propiedad, footer y panel de administración.
   ========================================================================== */

@media (max-width: 768px) {

  /* --- Navbar --- */
  .navbar-logo {
    height: 42px;
  }

  /* --- Hero (inicio) --- */
  .hero {
    padding: 50px 20px;
    min-height: 45vh;
  }

  /* --- Banner de propiedades / detalle --- */
  .hero-banner {
    height: 200px;
    margin-bottom: 25px;
  }

  .hero-banner h2 {
    font-size: 1.5rem;
    padding: 0 15px;
  }

  /* --- Servicios --- */
  .services {
    padding: 50px 15px;
  }

  .services-header {
    margin-bottom: 30px;
  }

  .services-header h2,
  .services h2 {
    font-size: 1.7rem;
  }

  .service-card {
    height: auto !important;
    min-height: 340px !important;
  }

  /* --- Sobre nosotros --- */
  .about-image img {
    height: 220px;
  }

  .about-content {
    padding: 40px 0 60px 0;
  }

  .about-content h2 {
    font-size: 1.7rem;
  }

  .about-content p {
    font-size: 0.95rem;
  }

  /* --- Listado de propiedades --- */
  .properties-container {
    padding: 0 15px;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .properties-grid {
    grid-template-columns: 1fr;
  }

  /* --- Detalle de propiedad --- */
  .property-page-wrapper {
    padding-top: 25px;
  }

  .property-header-top {
    justify-content: center;
    text-align: center;
  }

  /* --- Footer --- */
  .footer {
    padding: 40px 0 30px 0;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
  }

  .footer-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .footer-section h3 {
    font-size: 1.2rem;
  }

  .footer-section p {
    font-size: 0.85rem;
  }

  /* --- Panel de administración --- */
  .admin-dashboard {
    padding: 25px 15px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .admin-header h1 {
    font-size: 22px;
  }

  .admin-header > div {
    width: 100%;
    flex-wrap: wrap;
  }

  .admin-header > div a,
  .admin-header > div button {
    flex: 1;
    text-align: center;
    white-space: nowrap;
  }

  .admin-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .admin-actions {
    flex-wrap: nowrap;
  }

  /* --- Formularios admin --- */
  .admin-form {
    margin: 20px auto;
    padding: 25px 20px;
  }
}

@media (max-width: 480px) {

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .page-main-title {
    font-size: 1.4rem;
  }

  .btn-back-outline {
    padding: 8px 22px;
    font-size: 0.8rem;
  }

  .details-specs-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .gallery-thumbnails {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .thumb-img {
    height: 65px;
  }

  .navbar-brand a {
    gap: 6px;
  }

  .navbar-logo {
    height: 36px;
  }

  .service-card {
    min-height: 300px !important;
  }

  .footer-social svg {
    width: 26px;
    height: 26px;
  }

  .whatsapp-btn {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  .whatsapp-btn svg {
    width: 24px;
    height: 24px;
  }
}
/* ============ GALERÍA CON FLECHAS MOBILE ============ */
.gallery-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  width: 100%;
}

.gallery-prev, .gallery-next {
  position: absolute;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  border-radius: 4px;
  transition: background 0.3s;
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.gallery-prev:hover, .gallery-next:hover {
  background: rgba(0,0,0,0.8);
}

/* ============ MEJORAS MOBILE ============ */
@media (max-width: 768px) {
  /* SERVICIOS EN MOBILE */
  .services-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .service-card {
    height: auto !important;
    min-height: 350px !important;
  }

  .service-img-box {
    height: 200px !important;
  }

  .service-text-box {
    height: auto !important;
    padding: 25px 15px !important;
    min-height: 120px !important;
  }

  .service-text-box h3 {
    font-size: 1.1rem !important;
    margin-bottom: 8px !important;
  }

  .service-text-box p {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
  }

  /* PROPIEDADES LISTADO EN MOBILE */
  .properties-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .properties-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  .property-card {
    height: auto !important;
  }

  .property-card-image {
    height: 250px !important;
  }

  .property-card-content {
    padding: 15px !important;
  }

  .property-card-title {
    font-size: 1rem !important;
  }

  .property-card-location {
    font-size: 0.8rem !important;
  }

  .filters {
    margin-bottom: 30px !important;
  }

  /* GALERÍA EN MOBILE */
  .gallery-prev, .gallery-next {
    font-size: 20px;
    padding: 8px 12px;
  }

  .main-display-image {
    max-width: 100% !important;
    height: auto !important;
  }

  /* DETALLE PROPIEDAD EN MOBILE */
  .property-layout-grid {
    grid-template-columns: 1fr !important;
  }

  .details-specs-grid {
    grid-template-columns: 1fr !important;
  }

  .gallery-thumbnails {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  .thumb-img {
    height: 80px !important;
  }
}
/* ==========================================================================
   FIX: Galería del detalle de propiedad — miniatura activa + flechas
   El .gallery-container / .gallery-prev / .gallery-next ya existían en el
   CSS pero no se usaban en el HTML. Ahora sí se usan en property.php.
   ========================================================================== */

.gallery-container {
  justify-content: center;
}

.gallery-container .property-detail-main-image {
  cursor: pointer;
}

.gallery-thumb.thumb-active {
  border-color: var(--primary);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

@media (max-width: 768px) {
  .gallery-prev,
  .gallery-next {
    padding: 6px 10px;
    font-size: 18px;
  }
}

/* ==========================================================================
   FIX MOBILE-ONLY: menos zoom en las fotos de servicios + flechas de
   galería a los costados de la foto (no arriba/abajo). Todo dentro de
   este media query para no tocar desktop.
   ========================================================================== */
@media (max-width: 768px) {

  /* Menos zoom/recorte en las fotos de las 3 tarjetas de servicio */
  .service-img-box {
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }

  /* Flechas de la galería de fotos de la propiedad: centradas a los costados */
  .gallery-prev,
  .gallery-next {
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
  }
}

/* ==========================================================================
   LIGHTBOX: al tocar/clickear la foto principal de una propiedad se abre
   más grande centrada en pantalla (no fullscreen), con fondo oscuro atrás.
   Funciona igual en desktop y mobile.
   ========================================================================== */

.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox-overlay.lightbox-open {
  display: flex;
}

.lightbox-image {
  max-width: 88vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: none;
  font-size: 28px;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s;
}

.lightbox-prev { left: 15px; }
.lightbox-next { right: 15px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
  .lightbox-overlay {
    padding: 15px;
  }

  .lightbox-image {
    max-width: 92vw;
    max-height: 75vh;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 20px;
    padding: 8px 12px;
  }
}

/* ==========================================================================
   FIX SOLO CELULAR (<480px): que "Contacto" quede en la misma fila que
   los demás links del navbar en vez de aparecer solo debajo. No afecta
   compu ni iPad (ambos están por encima de este ancho).
   ========================================================================== */
@media (max-width: 480px) {
  .navbar .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .navbar-logo {
    height: 34px !important;
  }

  .navbar-menu {
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .navbar-menu::-webkit-scrollbar {
    display: none;
  }

  .navbar-menu .nav-link {
    font-size: 11px !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
    flex-shrink: 0;
  }

  .navbar-menu .nav-link.nav-cta {
    font-size: 11px !important;
    padding: 6px 14px !important;
  }
}