/* Puerta Del Sol - Global Styles */
:root {
  --maroon: #7f1d1d;
  --maroon-dark: #450a0a;
  --bg-stone: #f5f2eb;
  --text-main: #1c1917;
  --text-muted: #57534e;
  --border-stone: #e7e5e4;
  --white: #ffffff;
}

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

body {
  background-color: var(--bg-stone);
  color: var(--text-main);
  font-family: 'Georgia', 'Times New Roman', serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.site-wrapper {
  max-width: 1100px;
  margin: 2rem auto;
  background: var(--white);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-stone);
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  width: 100%;
}

.header-banner {
  position: relative;
  height: 165px;
  background-image: url('https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-stone);
}

.header-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.header-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
}

.header-title {
  font-size: 2.25rem;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  line-height: 1.1;
}

.header-contact {
  text-align: right;
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Navigation */
nav {
  background-color: var(--maroon);
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--maroon-dark);
  border-bottom: 1px solid var(--maroon-dark);
}

.nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  color: #e7e5e4;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 8px;
}

/* Main Content Area */
main {
  padding: 2.5rem;
  flex-grow: 1;
}

h1.page-title {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--maroon);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  letter-spacing: -0.025em;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .home-layout { grid-template-columns: 30% 70%; }
}

/* Home Styles */
.amenities-box {
  border: 1px solid var(--border-stone);
  padding: 2rem;
  background-color: #fafaf9;
}

.amenities-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--maroon);
  text-transform: uppercase;
  border-bottom: 1px solid #fecaca;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.amenities-list {
  list-style: none;
}

.amenities-list li {
  display: flex;
  font-size: 0.875rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.bullet {
  color: var(--maroon);
  margin-right: 1rem;
  font-size: 1.25rem;
}

.welcome-box {
  border: 1px solid var(--border-stone);
  padding: 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-headline {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--maroon);
  text-transform: uppercase;
  line-height: 1.4;
  margin-bottom: 2.5rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* Floorplans */
.plan-card {
  border: 1px solid var(--border-stone);
  padding: 1.5rem;
}

.plan-img-container {
  background-color: #fafaf9;
  border: 1px solid var(--border-stone);
  padding: 0.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.plan-img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.plan-title {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  border-bottom: 1px solid #f5f5f4;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #fafaf9;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.price-label {
  color: var(--text-muted);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.price-value {
  font-weight: 900;
  font-size: 1.25rem;
}

.price-value.rent { color: var(--maroon); }

/* Contact Component */
.contact-section {
  margin-top: 2.5rem;
  border: 1px solid var(--border-stone);
  padding: 2.5rem;
  background-color: #fafaf9;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-title {
  color: var(--maroon);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  border-bottom: 1px solid #fee2e2;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 0.95rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

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

@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-item {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f5f5f4;
  border: 1px solid var(--border-stone);
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(127, 29, 29, 0.2);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.view-label {
  background: rgba(255,255,255,0.9);
  color: var(--maroon);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 0.25rem 0.75rem;
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  padding: 2rem;
  justify-content: center;
  align-items: center;
}

#lightbox.active { display: flex; }

.lightbox-content {
  position: relative;
  max-width: 1000px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.7;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 3.5rem;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.5;
  padding: 1rem;
}

.prev-btn { left: 1rem; }
.next-btn { right: 1rem; }
.nav-btn:hover, .close-btn:hover { opacity: 1; }

.lightbox-counter {
  position: absolute;
  bottom: -2.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-stone);
  padding: 2.5rem;
  text-align: center;
}

.footer-text {
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-main);
}

/* Application Form */
.form-container {
  background: white;
  padding: 2rem;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section h2 {
  color: var(--maroon);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-stone);
  padding-bottom: 0.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.btn-primary {
  background: var(--maroon);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}

/* Print CSS */
@media print {
  .nav-links, .header-banner, footer, .btn-primary { display: none !important; }
  .site-wrapper { margin: 0; border: none; box-shadow: none; max-width: 100%; }
}