@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700;800&display=swap');

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

:root {
  --primary-color: #1a5490;
  --secondary-color: #d4af37;
  --dark-color: #2c3e50;
  --light-color: #f8f9fa;
  --text-color: #333;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  transition: direction 0.3s ease;
}

body[dir="rtl"] {
  direction: rtl;
}

body[dir="rtl"] .header-content,
body[dir="rtl"] .features-wrapper,
body[dir="rtl"] .property-info-grid {
  direction: rtl;
}

body[dir="rtl"] nav ul {
  flex-direction: row-reverse;
}

body[dir="rtl"] .property-features,
body[dir="rtl"] .footer-content {
  direction: rtl;
}

body[dir="rtl"] .feature-item,
body[dir="rtl"] .property-details,
body[dir="rtl"] .form-group {
  text-align: right;
}

body[dir="rtl"] .property-location::before {
  content: ' 📍';
}

header {
  background: rgba(0, 0, 0, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

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

.logo img {
  height: 60px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--secondary-color);
}

.language-selector select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--secondary-color);
  border-radius: 25px;
  background: transparent;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.language-selector select option {
  background: var(--dark-color);
}

.hero {
  height: 100vh;
  background: url('https://i.ibb.co/FkD3wCm4/pexels-asadphoto-1268871.jpg') center/cover fixed;
  display: flex;
  align-items: flex-start;
  color: white;
  margin-top: 80px;
}

.hero-content {
  max-width: 600px;
  padding: 4rem;
  margin-top: 3rem;
}

.hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  font-weight: 300;
}

.features {
  padding: 5rem 2rem;
  background: var(--light-color);
}

.features-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title-left {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 3rem;
  font-weight: 300;
}

.feature-item {
  margin-bottom: 2.5rem;
}

.feature-item h3 {
  color: var(--primary-color);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.feature-item p {
  color: #666;
}

.features-image {
  height: 600px;
  overflow: hidden;
  border-radius: 10px;
}

.features-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.properties {
  padding: 5rem 2rem;
}

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

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.property-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
}

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

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.property-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.property-card:hover {
  transform: translateY(-10px);
}

.property-image {
  height: 250px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.property-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: bold;
}

.property-details {
  padding: 2rem;
}

.property-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.property-location::before {
  content: '📍 ';
}

.property-features {
  display: flex;
  gap: 1.5rem;
  margin: 1.5rem 0;
  color: #666;
}

.property-price {
  font-size: 2rem;
  color: var(--secondary-color);
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.btn {
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: var(--secondary-color);
  color: white;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.cta-section {
  background: linear-gradient(135deg, var(--primary-color), #2980b9);
  color: white;
  padding: 5rem 2rem;
  text-align: center;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-form {
  background: white;
  padding: 3rem;
  border-radius: 15px;
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
}

footer {
  background: rgba(20, 20, 30, 0.95);
  color: #999;
  padding: 3rem 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
  text-align: center;
}

.footer-section h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  text-decoration: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background: white;
  margin: 2% auto;
  width: 90%;
  max-width: 1200px;
  border-radius: 15px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  right: 25px;
  top: 25px;
  font-size: 35px;
  color: white;
  cursor: pointer;
  z-index: 10;
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.property-hero {
  height: 500px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.property-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 3rem;
  color: white;
}

.property-hero h1 {
  font-size: 3rem;
  color: var(--secondary-color);
}

.property-info-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 3rem;
}

.property-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

.gallery-image:first-child {
  grid-column: span 2;
  grid-row: span 2;
  height: 100%;
}

.property-description h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.property-features-detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.feature-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--light-color);
  border-radius: 10px;
}

.price-box {
  background: var(--primary-color);
  color: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  margin-bottom: 2rem;
}

.price-box .price {
  font-size: 2.5rem;
  font-weight: bold;
}

.contact-agent {
  background: var(--light-color);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
}

.agent-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.agent-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

@media (max-width: 768px) {

  .features-wrapper,
  .property-info-grid {
    grid-template-columns: 1fr;
  }

  .properties-grid {
    grid-template-columns: 1fr;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Arreglar imagen hero en móvil */
  .hero {
    background-attachment: scroll;
    background-size: cover;
    height: 80vh;
  }

  .hero-content {
    padding: 2rem 1.5rem;
    margin-top: 1rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .logo img {
    height: 50px;
  }
}