/* Pacific Sands - Modern Real Estate Website Styles */

/* CSS Custom Properties */
:root {
  --ocean: #0F4C81;
  --teal: #1DB9C3;
  --sand: #F5E9DA;
  --charcoal: #1F2937;
  --white: #FFFFFF;
  --light-gray: #F8FAFC;
  --medium-gray: #64748B;
  --dark-gray: #334155;
  
  --font-heading: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--charcoal);
  background-color: var(--white);
  font-display: swap;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.875rem);
}

p {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Full-bleed utility (escapes container to span the full viewport width) */
.full-bleed {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
}

/* PDF viewer full-bleed adjustments */
.pdf-viewer object {
  width: 100vw;
  height: 80vh;
  border-radius: 0;
  box-shadow: none;
}

/* Optional full-bleed section wrapper */
.section-fullbleed {
  padding: 0;
}

@media (max-width: 768px) {
  .pdf-viewer object {
    height: 60vh; /* better fit on mobile */
  }
}

/* Masterplan image full-bleed */
.masterplan-image {
  position: relative;
}
.masterplan-image img {
  display: block;
  width: 100vw;
  height: auto;
}

/* Pan/Zoom controls */
.zoom-controls {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}
.zoom-controls .btn-zoom {
  background: rgba(31, 41, 55, 0.8);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.zoom-controls .btn-zoom:hover {
  background: rgba(31, 41, 55, 0.95);
}

.zoom-container {
  overflow: hidden;
  width: 100vw;
  touch-action: none; /* enable custom pinch/pan */
  background: #f3f4f6;
}
.zoom-target {
  transform-origin: 0 0;
  cursor: grab;
}
.zooming .zoom-target {
  cursor: grabbing;
}

/* Construction Banner */
.construction-banner {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  padding: 0.75rem 0;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.construction-banner p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Header */
.header {
  position: sticky;
  top: 2.5rem; /* Adjusted for construction banner */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 76, 129, 0.1);
  z-index: 1000;
  transition: var(--transition);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ocean);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: "🏖️";
  font-size: 1.25rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.nav-links a {
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--ocean);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.language-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.language-toggle a {
  color: var(--medium-gray);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.language-toggle a.active,
.language-toggle a:hover {
  color: var(--ocean);
  background: var(--sand);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ocean);
  cursor: pointer;
  padding: 0.5rem;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav {
    gap: 1rem;
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--ocean) 0%, var(--teal) 100%);
  color: var(--white);
  overflow: hidden;
  padding-top: 2.5rem; /* Account for construction banner */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><rect width="100%" height="100%" fill="url(%23a)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.hero h1 {
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  min-width: 160px;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.btn-primary:hover {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--ocean);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--light-gray);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  color: var(--ocean);
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--medium-gray);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid rgba(15, 76, 129, 0.1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  background: var(--sand);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--ocean);
}

.card h3 {
  color: var(--ocean);
  margin-bottom: 1rem;
}

.card p {
  color: var(--medium-gray);
  margin-bottom: 0;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(15, 76, 129, 0.8), rgba(29, 185, 195, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

.gallery-overlay span {
  color: var(--white);
  font-weight: 600;
  font-size: 1.125rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29, 185, 195, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #E2E8F0;
}

.table th {
  background: var(--light-gray);
  font-weight: 600;
  color: var(--ocean);
  position: sticky;
  top: 0;
}

.table tbody tr:hover {
  background: var(--light-gray);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-available {
  background: #DCFCE7;
  color: #166534;
}

.status-reserved {
  background: #FEF3C7;
  color: #92400E;
}

.status-sold {
  background: #FEE2E2;
  color: #991B1B;
}

.status-coming-soon {
  background: #E0E7FF;
  color: #3730A3;
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--charcoal);
}

.filter-group input,
.filter-group select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

/* Accordion */
.accordion {
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1rem 0;
}

.accordion-item {
  border-bottom: 1px solid #E2E8F0;
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  background: var(--light-gray);
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.accordion-header:hover {
  background: #E2E8F0;
}

.accordion-header h4 {
  margin: 0;
  color: var(--ocean);
}

.accordion-icon {
  transition: var(--transition);
  font-size: 1.25rem;
  color: var(--teal);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: var(--transition);
}

.accordion-item.active .accordion-content {
  padding: 1.5rem;
  max-height: 1000px;
}

/* Footer */
.footer {
  background: var(--charcoal);
  color: var(--white);
  padding: 3rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

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

.footer-section p,
.footer-section a {
  color: #94A3B8;
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--teal);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  color: #94A3B8;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .hero-content {
    padding: 1.5rem;
  }
  
  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    min-height: 80vh;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
  
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title h2 {
    font-size: 1.75rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .table th,
  .table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .cta-buttons,
  .filters {
    display: none;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
