/* ==========================================================================
   Morales Group LLC - Premium Design System Stylesheet
   ========================================================================== */

/* --- Custom Properties & Tokens --- */
:root {
  /* Brand Color Palette */
  --color-primary: #0a192f;        /* Deep Navy */
  --color-primary-dark: #06101c;   /* Darker Navy */
  --color-primary-light: #172a45;  /* Lighter Navy for surfaces */
  --color-secondary: #c5a059;      /* Refined Gold */
  --color-secondary-dark: #a9823d; /* Rich Dark Gold */
  --color-secondary-light: #dfbe7e;/* Soft Gold highlight */
  
  /* Backgrounds */
  --bg-cream: #faf9f6;             /* Warm off-white */
  --bg-white: #ffffff;
  --bg-navy-gradient: linear-gradient(135deg, #0a192f 0%, #06101c 100%);
  --bg-gold-gradient: linear-gradient(135deg, #c5a059 0%, #a9823d 100%);
  --bg-glass: rgba(10, 25, 47, 0.85);
  --bg-glass-light: rgba(255, 255, 255, 0.85);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Text Colors */
  --text-dark: #1b2530;            /* Premium charcoal */
  --text-muted: #5e6d7f;           /* Elegant slate gray */
  --text-light: #ffffff;           /* Crisp white */
  --text-gold: #c5a059;            /* Gold link/accents */
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(10, 25, 47, 0.04);
  --shadow-md: 0 8px 24px rgba(10, 25, 47, 0.08);
  --shadow-lg: 0 16px 40px rgba(10, 25, 47, 0.12);
  --shadow-gold: 0 8px 24px rgba(197, 160, 89, 0.2);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  
  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Resets & Global Styles --- */
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

a {
  color: var(--text-gold);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

/* --- Navbar (Glassmorphism & Stickiness) --- */
.navbar {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.1);
  padding-top: 16px;
  padding-bottom: 16px;
  transition: var(--transition-normal);
  z-index: 1050;
}

/* Scrolled Navbar State */
.navbar.navbar-scrolled {
  padding-top: 10px;
  padding-bottom: 10px;
  background: rgba(6, 16, 28, 0.95);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(197, 160, 89, 0.25);
}

.navbar-brand img {
  height: 42px;
  transition: var(--transition-fast);
}

.navbar-brand span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px !important;
  position: relative;
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-secondary-light) !important;
}

/* Nav Link Underline Hover Effect */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background-color: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Buttons --- */
.btn {
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 10px 24px;
  border-radius: 30px;
  transition: var(--transition-normal);
}

.btn-lg {
  padding: 14px 36px;
}

.btn-gold {
  background: var(--bg-gold-gradient);
  color: var(--color-primary-dark) !important;
  border: 1px solid var(--color-secondary);
  box-shadow: var(--shadow-sm);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
  border-color: var(--color-secondary-light);
  background: linear-gradient(135deg, #dfbe7e 0%, #c5a059 100%);
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #ffffff !important;
  background: transparent;
}

.btn-outline-light:hover {
  background: #ffffff;
  color: var(--color-primary-dark) !important;
  border-color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline-gold {
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary) !important;
  background: transparent;
}

.btn-outline-gold:hover {
  background: var(--bg-gold-gradient);
  color: var(--color-primary-dark) !important;
  border-color: var(--color-secondary);
  transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background: var(--color-primary-dark);
  color: var(--text-light);
  padding: 220px 0 160px 0;
  overflow: hidden;
}

/* Parallax/Blur Overlay for Hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/homepage-hero.webp') center center/cover no-repeat;
  opacity: 0.25;
  filter: blur(2px);
  z-index: 1;
}

/* Elegant radial gradient to vignette the image */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(10, 25, 47, 0.2) 0%, rgba(6, 16, 28, 0.95) 100%);
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 24px;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero {
    padding: 160px 0 120px 0;
  }
}

.hero p.lead {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 700px;
  margin: 0 auto 36px auto;
  line-height: 1.8;
}

/* --- Layout Sections --- */
.section {
  padding: 100px 0;
}

.section-alt {
  background-color: var(--bg-cream);
  padding: 100px 0;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 60px;
}

.section-title-wrap h2 {
  font-size: 2.25rem;
  margin-bottom: 12px;
  position: relative;
}

/* Gold line accents */
.gold-bar {
  width: 60px;
  height: 3px;
  background: var(--bg-gold-gradient);
  margin: 16px auto 0 auto;
  border-radius: 2px;
}

.gold-bar-left {
  margin-left: 0;
}

/* --- Feature Cards & Interactive Boxes --- */
.icon-box {
  background: var(--bg-white);
  padding: 40px 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 25, 47, 0.05);
  height: 100%;
  transition: var(--transition-normal);
}

.icon-box:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(197, 160, 89, 0.3);
}

.icon-box i {
  font-size: 2.2rem;
  color: var(--color-secondary);
  margin-bottom: 24px;
  display: inline-block;
  background: rgba(197, 160, 89, 0.1);
  width: 65px;
  height: 65px;
  line-height: 65px;
  text-align: center;
  border-radius: 50%;
  transition: var(--transition-normal);
}

.icon-box:hover i {
  background: var(--bg-gold-gradient);
  color: var(--color-primary-dark);
  transform: rotateY(360deg);
}

/* --- Service Cards --- */
.service-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border-top: 4px solid var(--color-secondary);
  padding: 45px 35px;
  box-shadow: var(--shadow-sm);
  border-left: 1px solid rgba(10, 25, 47, 0.03);
  border-right: 1px solid rgba(10, 25, 47, 0.03);
  border-bottom: 1px solid rgba(10, 25, 47, 0.03);
  height: 100%;
  transition: var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--color-secondary-dark);
  background: linear-gradient(to bottom, #ffffff, #faf9f6);
}

.service-card i {
  font-size: 2.6rem;
  color: var(--color-secondary);
  margin-bottom: 20px;
  display: inline-block;
  transition: var(--transition-fast);
}

.service-card:hover i {
  transform: scale(1.1);
  color: var(--color-secondary-dark);
}

.service-card h4 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 0;
}

/* --- Property Cards --- */
.property-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 25, 47, 0.06);
  padding: 24px;
  height: 100%;
  transition: var(--transition-normal);
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(197, 160, 89, 0.25);
}

.property-img-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  height: 240px;
}

.property-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.property-card:hover .property-img-wrap img {
  transform: scale(1.08);
}

/* Badges for Properties */
.badge-status {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
  z-index: 5;
}

.badge-rented {
  background-color: var(--color-primary);
  color: #ffffff;
}

.badge-sold {
  background-color: #f7deda;
  color: #c93b2b;
}

.badge-available {
  background-color: #d1f2e5;
  color: #1b8555;
}

.property-card h5 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.property-details {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.property-details span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.property-price {
  font-weight: 700;
  color: var(--color-secondary-dark);
  font-size: 1.15rem;
}

/* --- Custom Page Headers --- */
.page-header {
  background: var(--color-primary-dark);
  padding: 160px 0 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(10, 25, 47, 0.3) 0%, rgba(6, 16, 28, 0.95) 100%);
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 3rem;
  color: #ffffff;
  margin-bottom: 12px;
}

.page-header p.lead {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Biography Cards (Leadership) --- */
.bio-card {
  background: var(--bg-white);
  border-top: 5px solid var(--color-secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 50px 45px;
  position: relative;
}

.bio-card h3 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.bio-title {
  color: var(--color-secondary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 24px;
}

.bio-card p {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 16px;
}

.bio-card p:last-child {
  margin-bottom: 0;
}

/* --- Value Items (About Section Grid) --- */
.value-item {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 20px;
  height: 100%;
  transition: var(--transition-normal);
}

.value-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.value-item i {
  font-size: 1.8rem;
  color: var(--color-secondary);
  margin-top: 4px;
}

.value-item h5 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.value-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0;
}

/* --- Call To Action (CTA) Section --- */
.cta-section {
  background: var(--color-primary);
  color: #ffffff;
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(10, 25, 47, 0.4) 0%, rgba(6, 16, 28, 0.95) 100%);
  z-index: 1;
}

.cta-section .container {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  color: #ffffff;
  font-size: 2.25rem;
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 36px auto;
}

/* --- Contact & Forms --- */
.contact-form-container {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 50px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(10, 25, 47, 0.05);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  margin-bottom: 8px;
  display: block;
}

.form-control, .form-select {
  border: 1px solid rgba(10, 25, 47, 0.1) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-size: 0.95rem !important;
  color: var(--text-dark) !important;
  background-color: var(--bg-cream) !important;
  transition: var(--transition-fast) !important;
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-secondary) !important;
  background-color: var(--bg-white) !important;
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15) !important;
  outline: none !important;
}

.form-control::placeholder {
  color: #a0aec0;
}

.form-status {
  margin-top: 20px;
  display: none;
  font-size: 0.95rem;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
}

.form-status.success {
  display: block;
  background-color: #d1f2e5;
  color: #1b8555;
  border: 1px solid #a3e6cb;
}

.form-status.error {
  display: block;
  background-color: #f7deda;
  color: #c93b2b;
  border: 1px solid #f0beba;
}

/* --- Legal / Privacy Pages --- */
.content-section {
  padding: 80px 0;
  background-color: var(--bg-white);
}

.content-section h2 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.content-section p, 
.content-section li {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.8;
}

.content-section ul {
  margin-bottom: 24px;
}

.content-section li {
  margin-bottom: 8px;
}

/* --- Footer --- */
footer {
  background-color: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 0 0;
  border-top: 3px solid var(--color-secondary);
}

footer h5, footer h6 {
  color: #ffffff;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

footer .text-muted,
footer p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65) !important;
}

footer a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

footer a:hover {
  color: var(--color-secondary-light);
  padding-left: 4px;
}

footer ul.list-unstyled li {
  margin-bottom: 12px;
}

.footer-bottom {
  background-color: rgba(6, 16, 28, 0.5);
  padding: 24px 0;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

/* Mobile Footer Optimization */
@media (max-width: 768px) {
  footer {
    padding-top: 45px !important;
  }
  footer h5, footer h6 {
    margin-bottom: 12px !important;
    margin-top: 16px !important;
  }
  .footer-bottom {
    margin-top: 35px !important;
    padding: 16px 0 !important;
  }
  /* Tighten grid spacing when columns stack on mobile */
  footer .row.g-5 {
    --bs-gutter-y: 1.5rem !important;
  }
}

/* --- Scroll-Reveal Effects (Intersection Observer animations) --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.15s;
}

.reveal-delay-2 {
  transition-delay: 0.3s;
}

.reveal-delay-3 {
  transition-delay: 0.45s;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--bg-gold-gradient);
  color: var(--color-primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-gold);
  color: var(--color-primary-dark);
}
