/* ==========================================================================
   Corozal Bayside Realty Reviews — stylesheet
   Design tokens: navy/white "harbor ledger" theme, Trustpilot-inspired
   ========================================================================== */

:root{
  /* ---- Color tokens ---- */
  --navy-deep:   #0A1F3C;
  --navy-mid:    #123262;
  --navy-mid-2:  #17417f;
  --teal:        #2DB7B0;
  --teal-dark:   #1F8E88;
  --gold:        #F6A821;
  --mist:        #F3F6FA;
  --white:       #FFFFFF;
  --ink:         #1B2B44;
  --ink-soft:    #4C5E7A;
  --danger:      #E4572E;
  --border-soft: rgba(10,31,60,0.08);

  /* ---- Type tokens ---- */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* ---- Layout tokens ---- */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-soft: 0 20px 45px -20px rgba(10,31,60,0.35);
  --shadow-card: 0 10px 30px -12px rgba(10,31,60,0.18);
}

/* ==================== Base / reset ==================== */
*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; scroll-padding-top: 84px; }

@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; scroll-behavior: auto !important; }
}

body{
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4{
  font-family: var(--font-display);
  color: var(--navy-deep);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a{ color: var(--teal-dark); text-decoration: none; }
a:hover{ color: var(--teal); text-decoration: underline; }

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

/* Visible focus ring for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.accordion-button:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--navy-deep);
  padding: 0.75rem 1.25rem;
  z-index: 2000;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

.demo-chip{
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(246,168,33,0.15);
  color: #8a5b0d;
  border: 1px solid rgba(246,168,33,0.4);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.demo-chip.small{ font-size: 0.58rem; padding: 0.1rem 0.4rem; }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.glass-card{
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* ==================== Navbar ==================== */
.site-navbar{
  background: rgba(10,31,60,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.navbar-brand{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white) !important;
}
.navbar-brand i{ color: var(--teal); }
.navbar-brand em{ font-style: normal; color: var(--teal); font-weight: 500; }
.site-navbar .nav-link{
  color: rgba(255,255,255,0.82);
  font-weight: 500;
  padding: 0.5rem 1rem;
}
.site-navbar .nav-link:hover{ color: var(--white); }

/* ==================== Hero ==================== */
.hero{
  position: relative;
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-mid-2) 0%, var(--navy-deep) 55%, #071630 100%);
  padding: 9rem 0 6rem;
  overflow: hidden;
}
.hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 20%, rgba(45,183,176,0.25) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(246,168,33,0.12) 0%, transparent 40%);
  pointer-events: none;
}
.hero-inner{ position: relative; z-index: 1; }

.hero-title{
  color: var(--white);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 1.2rem;
  animation: fadeUp 0.8s ease both;
}
.hero-title span{ color: var(--teal); }

.hero-sub{
  color: rgba(255,255,255,0.78);
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s ease 0.1s both;
}

.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  animation: fadeUp 0.8s ease 0.2s both;
}

.btn-search, .btn-write, .btn-submit{
  border-radius: 999px;
  font-weight: 600;
  padding: 0.8rem 1.7rem;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-search{ background: var(--teal); color: var(--navy-deep); }
.btn-search:hover{ background: #35c9c1; transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(45,183,176,0.6); color: var(--navy-deep); text-decoration: none; }
.btn-write{ background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.55); }
.btn-write:hover{ background: rgba(255,255,255,0.1); transform: translateY(-2px); color: var(--white); text-decoration: none; }
.btn-submit{ background: var(--teal); color: var(--navy-deep); }
.btn-submit:hover{ background: #35c9c1; color: var(--navy-deep); }
.btn-submit:disabled{ opacity: 0.6; cursor: not-allowed; }

.hero-card{
  padding: 2rem;
  animation: fadeUp 0.9s ease 0.25s both;
}
.hero-card-label{
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.hero-card-score{
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin: 0.4rem 0 0.5rem;
}
.score-num{ font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--navy-deep); }
.score-of{ font-family: var(--font-mono); color: var(--ink-soft); }
.stars{ color: var(--gold); font-size: 1.1rem; margin-bottom: 0.5rem; }
.hero-card-count{ font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); margin: 0; }

@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(18px); }
  to{ opacity: 1; transform: translateY(0); }
}

.wave-divider{
  display: block;
  width: 100%;
  height: 70px;
  position: relative;
  z-index: 1;
  margin-top: -2px;
}
.wave-divider path{ fill: var(--white); }
.wave-top path{ fill: var(--navy-deep); }

/* ==================== Disclaimer banner ==================== */
.disclaimer-banner{
  background: #FFF6E9;
  border-top: 1px solid #F3D9A8;
  border-bottom: 1px solid #F3D9A8;
  padding: 0.9rem 0;
}
.disclaimer-inner{
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.disclaimer-inner i{ color: var(--gold); font-size: 1.2rem; flex-shrink: 0; }
.disclaimer-inner p{ margin: 0; font-size: 0.92rem; color: #6b4a10; }

/* ==================== Section shared ==================== */
section{ padding: 5.5rem 0; }
.section-head{ max-width: 62ch; margin-bottom: 3rem; }
.section-head h2{ font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.6rem; }
.section-sub{ color: var(--ink-soft); }
.section-head.text-center{ margin-left: auto; margin-right: auto; }

/* ==================== Ratings section ==================== */
.ratings-section{ background: var(--mist); }

.rating-summary-card{
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2.2rem;
  text-align: center;
}
.big-score{ font-family: var(--font-display); font-size: 3.6rem; font-weight: 700; color: var(--navy-deep); line-height: 1; }
.stars-lg{ color: var(--gold); font-size: 1.4rem; margin: 0.6rem 0; }
.total-reviews{ font-family: var(--font-mono); color: var(--ink-soft); margin: 0; }

.rating-breakdown{ display: flex; flex-direction: column; gap: 0.9rem; }
.bar-row{ display: grid; grid-template-columns: 60px 1fr 48px; align-items: center; gap: 0.9rem; }
.bar-label{ font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink); white-space: nowrap; }
.bar-label i{ color: var(--gold); font-size: 0.75rem; }
.bar-pct{ font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); text-align: right; }

/* "Depth gauge" bars — signature motif referencing a harbor depth marker */
.depth-gauge{
  position: relative;
  height: 12px;
  background: rgba(10,31,60,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.depth-fill{
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--teal-dark), var(--teal));
  border-radius: 999px;
  transition: width 1.1s cubic-bezier(0.22,1,0.36,1);
}
.depth-fill.filled{ width: var(--val); }

/* ==================== Reviews section ==================== */
.filters-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-card);
}
.search-box{
  position: relative;
  flex: 1 1 260px;
}
.search-box i{
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
}
.search-box input{
  width: 100%;
  padding: 0.6rem 0.9rem 0.6rem 2.4rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-family: var(--font-body);
  background: var(--mist);
}
.search-box input:focus{ outline: none; box-shadow: 0 0 0 3px rgba(45,183,176,0.25); background: var(--white); }
.filter-group{ display: flex; gap: 0.6rem; flex-wrap: wrap; }
.filter-group .form-select{
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.5rem 2rem 0.5rem 1rem;
  background-color: var(--mist);
}

/* Review card — "ticket stub" signature: dashed perforation edge */
.review-card{
  position: relative;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 1.6rem 1.6rem 1.6rem 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 3px dashed rgba(45,183,176,0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.review-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -16px rgba(10,31,60,0.28);
}
.review-card-top{ display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; }
.avatar{
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-mid-2), var(--teal-dark));
  color: var(--white);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.reviewer-name{ font-size: 1rem; margin: 0; color: var(--navy-deep); }
.reviewer-country{ margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
.reviewer-country i{ color: var(--teal-dark); font-size: 0.75rem; }
.review-date{ font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); display: block; margin-bottom: 0.7rem; }
.review-text{ color: var(--ink); font-size: 0.95rem; flex-grow: 1; }
.helpful-btn{
  align-self: flex-start;
  background: var(--mist);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.8rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.helpful-btn:hover, .helpful-btn.active{
  background: rgba(45,183,176,0.15);
  color: var(--teal-dark);
}
.helpful-btn.active i{ color: var(--teal-dark); }

.no-results{
  text-align: center;
  color: var(--ink-soft);
  padding: 2rem 0;
  font-style: italic;
}

/* ==================== Write review section ==================== */
.write-review-section{
  background: var(--navy-deep);
  position: relative;
  padding-top: 0;
}
.write-review-section .section-head h2,
.write-review-section .eyebrow{ color: var(--white); }
.write-review-section .eyebrow{ color: var(--teal); justify-content: center; }
.write-review-section .section-sub{ color: rgba(255,255,255,0.7); }
.write-review-section .section-sub a{ color: var(--teal); }

.review-form{
  padding: 2.2rem;
  margin: 1rem 0 4rem;
}
.review-form .form-label{ font-weight: 600; color: var(--navy-deep); font-size: 0.9rem; }
.review-form .form-control, .review-form .form-select{
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  padding: 0.65rem 0.9rem;
}
.review-form .form-control:focus{
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45,183,176,0.2);
}
.review-form .form-control.is-invalid, .review-form .form-control:invalid[data-touched="true"]{
  border-color: var(--danger);
}
.invalid-feedback{ display: none; font-size: 0.82rem; }
.was-validated-field.is-invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback{ display: block; }

.char-counter{ font-family: var(--font-mono); color: var(--ink-soft); }

/* Star rating input */
.star-input{
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.3rem;
  font-size: 1.8rem;
}
.star-input input{
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.star-input label{
  color: #d8dee8;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label{
  color: var(--gold);
}
.star-input input:focus-visible + label{
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.form-success{
  margin-top: 1rem;
  background: rgba(45,183,176,0.12);
  border: 1px solid rgba(45,183,176,0.4);
  color: var(--teal-dark);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* ==================== Guidelines ==================== */
.guidelines-section{ background: var(--white); }
.guideline-card{
  background: var(--mist);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  height: 100%;
  transition: transform 0.2s ease;
}
.guideline-card:hover{ transform: translateY(-3px); }
.guideline-card i{ font-size: 1.6rem; color: var(--teal-dark); margin-bottom: 0.8rem; }
.guideline-card h3{ font-size: 1.1rem; margin-bottom: 0.5rem; }
.guideline-card p{ color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* ==================== FAQ ==================== */
.faq-section{ background: var(--mist); }
.accordion-item{
  border: none;
  margin-bottom: 0.8rem;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.accordion-button{
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-deep);
  background: var(--white);
}
.accordion-button:not(.collapsed){
  background: var(--navy-deep);
  color: var(--white);
  box-shadow: none;
}
.accordion-button:not(.collapsed)::after{
  filter: invert(1);
}
.accordion-button:focus{ box-shadow: none; }

/* ==================== Footer ==================== */
.site-footer{
  background: var(--navy-deep);
  color: rgba(255,255,255,0.75);
  padding: 4rem 0 2rem;
}
.footer-brand{
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.footer-brand i{ color: var(--teal); }
.footer-brand em{ font-style: normal; color: var(--teal); }
.footer-disclaimer{ font-size: 0.88rem; max-width: 42ch; }
.site-footer h4{
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.footer-links{ list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links a{ color: rgba(255,255,255,0.72); font-size: 0.92rem; }
.footer-links a:hover{ color: var(--teal); }
.site-footer hr{ border-color: rgba(255,255,255,0.12); margin: 2.5rem 0 1.5rem; }
.footer-bottom p{ font-size: 0.82rem; margin: 0; text-align: center; color: rgba(255,255,255,0.55); }

/* ==================== Modals ==================== */
.modal-content{ border-radius: var(--radius-md); border: none; }
.modal-title{ font-family: var(--font-display); color: var(--navy-deep); }

/* ==================== Back to top ==================== */
.back-to-top{
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy-deep);
  color: var(--white);
  border: none;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  z-index: 900;
}
.back-to-top.visible{ opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover{ background: var(--teal-dark); }

/* ==================== Responsive tweaks ==================== */
@media (max-width: 991.98px){
  .hero{ padding: 8rem 0 5rem; }
  section{ padding: 4rem 0; }
}

@media (max-width: 575.98px){
  .hero-actions{ flex-direction: column; }
  .hero-actions .btn{ width: 100%; text-align: center; }
  .bar-row{ grid-template-columns: 50px 1fr 40px; gap: 0.5rem; }
  .filters-toolbar{ flex-direction: column; align-items: stretch; }
  .search-box{ flex: 0 1 auto; }
  .filter-group{ justify-content: stretch; }
  .filter-group .form-select{ flex: 1; }
}

/* Navbar: keep brand + toggler on one row on narrow phones */
@media (max-width: 480px){
  .navbar-brand{
    font-size: 0.82rem;
    gap: 0.35rem;
    max-width: calc(100% - 3.2rem);
  }
  .navbar-brand span{
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .navbar-brand i{ font-size: 0.9rem; }
  .navbar-toggler{ padding: 0.3rem 0.5rem; flex-shrink: 0; }
}
