/* ========================================
   Variables CSS - TEMA VERDE PROFESIONAL
   ======================================== */
:root {
  --primary-color: #059669;
  --primary-dark: #047857;
  --secondary-color: #064E3B;
  --accent-color: #34D399;
  --text-color: #1A1A2E;
  --text-light: #555;
  --text-lighter: #888;
  --border-color: #E8E8E8;
  --background: #F7F9FC;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

/* ========================================
   Reset y Base
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background: var(--background);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========================================
   Header con Logo - MÁS GRANDE
   ======================================== */
.main-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  height: auto;
  padding: 4px 0;
  background: transparent;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.85;
}

.logo-image {
  height: 95px;
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
  transition: filter 0.3s ease;
}

.logo:hover .logo-image {
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.2));
}

.main-header nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.main-header nav ul li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 8px 0;
}

.main-header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.main-header nav ul li a:hover::after,
.main-header nav ul li a.active::after {
  width: 100%;
}

/* ========================================
   Banner Hero Section
   ======================================== */
.banner-hero {
  position: relative;
  min-height: 650px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #053321 100%);
  overflow: hidden;
}

.banner-hero-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.banner-hero-content {
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(52, 211, 153, 0.15);
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.hero-badge svg {
  fill: var(--accent-color);
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  text-shadow: 2px 4px 12px rgba(0,0,0,0.3);
  animation: fadeInLeft 0.8s ease;
}

.hero-title .highlight {
  color: var(--accent-color);
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  height: 12px;
  background: var(--primary-color);
  opacity: 0.3;
  z-index: -1;
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.9);
  margin-bottom: 40px;
  max-width: 580px;
  animation: fadeInLeft 1s ease;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.featured-property {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: fadeInUp 1.2s ease;
  position: relative;
  border: 1px solid rgba(255,255,255,0.2);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 28px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.featured-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.featured-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.featured-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color);
}

.featured-meta {
  font-size: 1rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.banner-hero-image {
  position: relative;
  height: 550px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: fadeInRight 1s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    var(--secondary-color) 0%, 
    rgba(6,78,59,0.7) 20%,
    rgba(6,78,59,0.3) 50%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

.banner-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slowZoom 20s ease-in-out infinite;
}

@keyframes slowZoom {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.banner-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
  z-index: 1;
}

/* ========================================
   Properties Section
   ======================================== */
.properties-section {
  max-width: 1400px;
  margin: 64px auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-top: 20px;
}

.properties-container {
  margin-bottom: 48px;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  padding: 0;
}

.property-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  animation: fadeInUp 0.6s ease backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.property-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
}

.property-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .property-image img {
  transform: scale(1.15) rotate(2deg);
}

.property-type {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.property-content {
  padding: 24px;
}

.property-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  min-height: 56px;
  transition: color 0.3s ease;
}

.property-card:hover .property-title {
  color: var(--primary-color);
}

.property-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.property-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.feature svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.property-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.property-btn:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.property-btn svg {
  transition: transform 0.3s ease;
}

.property-btn:hover svg {
  transform: translateX(4px);
}

.view-all-container {
  text-align: center;
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal[aria-hidden="false"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
  z-index: 1;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  z-index: 10;
  color: var(--text-color);
}

.modal-close:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: rotate(90deg);
}

.modal-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 90vh;
}

.modal-left {
  padding: 32px;
  background: var(--background);
}

.modal-left h3 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 16px;
}

.modal-precio {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.modal-detalle {
  font-size: 1.1rem;
  color: var(--text-light);
}

.modal-right {
  padding: 32px;
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ========================================
   Footer con Logo - MÁS GRANDE
   ======================================== */
.main-footer {
  background: var(--secondary-color);
  color: var(--white);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.logo-footer {
  display: flex;
  align-items: center;
  height: auto;
  background: transparent;
  padding: 4px 0;
  border-radius: 0;
  backdrop-filter: none;
  transition: opacity 0.3s ease;
  box-shadow: none;
}

.logo-footer:hover {
  opacity: 0.85;
}

.logo-footer-image {
  height: 85px;
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: brightness(1.15) contrast(1.05) drop-shadow(0 2px 10px rgba(0,0,0,0.25));
  transition: filter 0.3s ease;
}

.logo-footer:hover .logo-footer-image {
  filter: brightness(1.2) contrast(1.05) drop-shadow(0 2px 14px rgba(0,0,0,0.3));
}

.footer-brand p {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  margin: 0;
  padding-left: 2px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a,
.footer-social .social-disabled {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-social .social-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.footer-bottom {
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .banner-hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 24px;
  }

  .banner-hero-image {
    height: 400px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .featured-property {
    max-width: 600px;
  }

  .logo-image {
    height: 85px;
  }

  .logo-footer-image {
    height: 78px;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 10px 20px;
  }

  .logo {
    padding: 3px 0;
  }

  .logo-image {
    height: 75px;
  }

  .main-header nav ul {
    gap: 20px;
  }

  .banner-hero {
    min-height: auto;
  }

  .banner-hero-container {
    padding: 50px 24px;
  }

  .banner-hero-image {
    height: 350px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .featured-name {
    font-size: 1.5rem;
  }

  .featured-price {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .modal-body {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .logo-footer {
    padding: 3px 0;
  }

  .logo-footer-image {
    height: 70px;
  }

  .footer-brand p {
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 8px 16px;
  }

  .logo {
    padding: 2px 0;
  }

  .logo-image {
    height: 65px;
  }

  .banner-hero-container {
    padding: 40px 16px;
  }

  .banner-hero-image {
    height: 300px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .featured-property {
    padding: 24px;
  }

  .featured-name {
    font-size: 1.3rem;
  }

  .featured-price {
    font-size: 1.4rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .modal-content {
    width: 95%;
  }

  .modal-left,
  .modal-right {
    padding: 24px;
  }

  .logo-footer {
    padding: 2px 0;
  }

  .logo-footer-image {
    height: 60px;
  }
}