/* ============================================
   BASE.CSS — Corallo Residence Shared Styles
   Luxury Dark Blue + Gold | Arabic RTL
   ============================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

/* ---- CSS Variables ---- */
:root {
  --navy:       #0a1628;
  --navy-light: #112240;
  --navy-mid:   #0d1f3c;
  --gold:       #c9a84c;
  --gold-light: #e8c96a;
  --gold-dark:  #a07830;
  --white:      #ffffff;
  --off-white:  #f5f0e8;
  --gray-light: #e8e4dc;
  --gray:       #9a9a9a;
  --text-body:  #d0ccc4;
  --overlay:    rgba(10, 22, 40, 0.78);
  --overlay-dark: rgba(10, 22, 40, 0.92);

  --font-main: 'Cairo', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0,0,0,0.35);
  --shadow-gold: 0 4px 24px rgba(201,168,76,0.25);
  --transition: all 0.3s ease;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--navy);
  color: var(--text-body);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover { color: var(--gold-light); }

ul, ol { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-main);
  color: var(--white);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h4 { font-size: clamp(1rem, 2.5vw, 1.3rem); }

p {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--text-body);
  margin-bottom: 1rem;
}

/* ---- Layout Utilities ---- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section-sm {
  padding: 2.5rem 0;
}

.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-white { color: var(--white); }
.text-body { color: var(--text-body); }

/* ---- Section Titles ---- */
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

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

.section-title .gold-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  margin: 0.75rem auto;
  border-radius: 2px;
}

.section-title p {
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Gold Gradient Text ---- */
.text-gradient {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
  color: var(--navy);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201,168,76,0.45);
  color: var(--navy);
}

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

.btn-outline-gold:hover {
  background: var(--gold);
  color: var(--navy);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #128c7e, #25d366);
  color: var(--white);
  font-size: 1.05rem;
  padding: 1rem 2.25rem;
  box-shadow: 0 6px 24px rgba(37,211,102,0.35);
}

.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(37,211,102,0.5);
  color: var(--white);
}

.btn-whatsapp svg,
.btn-whatsapp i {
  font-size: 1.3rem;
}

.btn-lg {
  padding: 1.1rem 2.75rem;
  font-size: 1.15rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ---- Badge / Tag ---- */
.badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge-gold {
  background: rgba(201,168,76,0.15);
  color: var(--gold-light);
  border: 1px solid rgba(201,168,76,0.4);
}

.badge-red {
  background: rgba(220,60,60,0.15);
  color: #ff6b6b;
  border: 1px solid rgba(220,60,60,0.4);
}

.badge-green {
  background: rgba(37,211,102,0.15);
  color: #25d366;
  border: 1px solid rgba(37,211,102,0.4);
}

/* ---- Cards ---- */
.card {
  background: var(--navy-light);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(201,168,76,0.4);
  box-shadow: var(--shadow-gold);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: rgba(201,168,76,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* ---- Grid ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2-mobile { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

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

.form-label {
  display: block;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  color: var(--white);
  font-family: var(--font-main);
  font-size: 1rem;
  direction: rtl;
  transition: var(--transition);
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.form-control::placeholder {
  color: rgba(255,255,255,0.35);
}

.form-control.error {
  border-color: #ff6b6b;
}

.form-error {
  color: #ff6b6b;
  font-size: 0.82rem;
  margin-top: 0.3rem;
  display: none;
}

.form-error.visible { display: block; }

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a84c' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  padding-left: 2.5rem;
}

select.form-control option {
  background: var(--navy-mid);
  color: var(--white);
}

/* ---- Dividers ---- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.3), transparent);
  margin: 2rem 0;
}

/* ---- Scarcity / Urgency ---- */
.scarcity-bar {
  background: rgba(220,60,60,0.1);
  border: 1px solid rgba(220,60,60,0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ff8080;
  font-weight: 600;
  font-size: 0.95rem;
}

.scarcity-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4444;
  animation: pulse-red 1.5s infinite;
  flex-shrink: 0;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* ---- Countdown Timer ---- */
.countdown-wrap {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  direction: ltr;
}

.countdown-item {
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
  min-width: 70px;
}

.countdown-item .num {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
}

.countdown-item .lbl {
  display: block;
  font-size: 0.7rem;
  color: var(--gray);
  margin-top: 0.25rem;
  direction: rtl;
}

/* ---- WhatsApp Floating Button ---- */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 999;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #128c7e, #25d366);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,0.5);
  animation: wa-pulse 2.5s infinite;
  transition: var(--transition);
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(37,211,102,0.65);
}

.wa-float svg {
  width: 30px;
  height: 30px;
  fill: white;
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(37,211,102,0.5); }
  50% { box-shadow: 0 6px 30px rgba(37,211,102,0.75), 0 0 0 8px rgba(37,211,102,0.1); }
}

/* ---- Map Container ---- */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(201,168,76,0.2);
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 350px;
  display: block;
}

/* ---- Payment Table ---- */
.payment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.payment-table th {
  background: rgba(201,168,76,0.15);
  color: var(--gold-light);
  padding: 0.9rem 1rem;
  font-weight: 700;
  border-bottom: 2px solid rgba(201,168,76,0.3);
}

.payment-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--text-body);
}

.payment-table tr:hover td {
  background: rgba(255,255,255,0.03);
}

.payment-table tr.highlight td {
  background: rgba(201,168,76,0.07);
  color: var(--gold-light);
  font-weight: 600;
}

/* ---- Unit Cards ---- */
.unit-card {
  background: var(--navy-light);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.unit-card:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: var(--shadow-gold);
}

.unit-card-img {
  height: 200px;
  background: linear-gradient(135deg, var(--navy-mid), #1a3158);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.unit-card-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--navy-light));
}

.unit-card-body {
  padding: 1.5rem;
}

.unit-card-body h3 {
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.unit-price {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--gold);
  direction: ltr;
  display: inline-block;
}

.unit-specs {
  display: flex;
  gap: 1rem;
  margin: 0.75rem 0;
  flex-wrap: wrap;
}

.unit-spec {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--gray);
}

/* ---- Feature Icons Grid ---- */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: var(--transition);
}

.feature-item:hover .feature-icon {
  background: rgba(201,168,76,0.2);
  box-shadow: var(--shadow-gold);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 900;
  padding: 1rem 0;
  background: transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(12px);
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo img {
  height: 48px;
  width: auto;
}

.navbar-cta .btn {
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, #0d1f3c 50%, #162944 100%);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-dark);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 6rem 1.25rem 3rem;
}

.hero-badge {
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-body);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-stat {
  text-align: center;
}

.hero-stat .num {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold-light);
}

.hero-stat .lbl {
  font-size: 0.8rem;
  color: var(--gray);
}

/* ---- CTA Strip ---- */
.cta-strip {
  background: linear-gradient(135deg, var(--navy-mid), #162944);
  border-top: 1px solid rgba(201,168,76,0.2);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  padding: 3rem 0;
  text-align: center;
}

.cta-strip h2 {
  margin-bottom: 0.5rem;
}

.cta-strip p {
  margin-bottom: 1.5rem;
}

/* ---- Footer ---- */
.footer {
  background: #060e1c;
  border-top: 1px solid rgba(201,168,76,0.15);
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.footer-logo {
  height: 56px;
  width: auto;
  margin: 0 auto 1rem;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--gray);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-copy {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.8rem;
  color: var(--gray);
}

/* ---- Scroll Animation ---- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---- Background Decorative ---- */
.bg-dots {
  background-image: radial-gradient(rgba(201,168,76,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

.bg-navy-light { background-color: var(--navy-light); }
.bg-navy-mid   { background-color: var(--navy-mid); }

/* ---- Responsive Utilities ---- */
@media (max-width: 480px) {
  .section { padding: 3rem 0; }
  .hero-stats { gap: 1.25rem; }
  .hero-cta-group { flex-direction: column; align-items: stretch; }
  .btn-lg { padding: 0.9rem 1.75rem; }
}

/* ---- Lead Form Container ---- */
.lead-form-wrap {
  background: var(--navy-light);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 540px;
  margin: 0 auto;
}

.lead-form-wrap h3 {
  text-align: center;
  margin-bottom: 0.4rem;
  color: var(--gold-light);
}

.lead-form-wrap > p {
  text-align: center;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ---- Success / Notification ---- */
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.show { display: block; }
.form-success .check-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.form-success h3 { color: #25d366; margin-bottom: 0.5rem; }

/* ---- Progress Bar ---- */
.progress-bar-wrap {
  background: rgba(255,255,255,0.08);
  border-radius: 50px;
  height: 8px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transition: width 0.8s ease;
}

/* ---- Social Proof Ticker ---- */
.social-proof-bar {
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius);
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--gold-light);
  justify-content: center;
  text-align: center;
}

/* ---- Testimonial Cards ---- */
.testimonial-card {
  background: var(--navy-light);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  right: 1.5rem;
  font-size: 5rem;
  color: rgba(201,168,76,0.15);
  font-family: serif;
  line-height: 1;
}

.testimonial-stars {
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.testimonial-author {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gray);
}

.testimonial-author strong {
  color: var(--gold-light);
  display: block;
}
