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

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

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

/* ── Page offset for fixed navbar ── */
main { padding-top: calc(var(--navbar-height) + var(--topbar-height)); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.22;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--color-crimson); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--color-crimson-dark); }

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

/* ── Section Layout ── */
.section {
  padding: var(--space-12) 0;
}
.section-sm { padding: var(--space-8) 0; }
.section-lg { padding: 120px 0; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-3); }

/* ── Section Header ── */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,16,46,.08);
  color: var(--color-crimson);
  font-family: var(--font-heading);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 40px;
  margin-bottom: var(--space-2);
}
.section-badge.badge-light {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--color-heading);
  margin-bottom: var(--space-2);
}
.section-title.text-white { color: #fff; }

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 640px;
  line-height: 1.7;
}
.section-subtitle.text-white { color: rgba(255,255,255,.75); }

.section-header { margin-bottom: var(--space-6); }
.section-header.centered { text-align: center; }
.section-header.centered .section-subtitle { margin: 0 auto; }

/* ── Buttons ── */
.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--color-crimson), var(--color-crimson-dark));
  color: #fff !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 6px 20px rgba(200,16,46,.35);
  letter-spacing: .02em;
  white-space: nowrap;
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(200,16,46,.45);
  color: #fff !important;
}

.btn-secondary-custom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--color-navy) !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  padding: 13px 30px;
  border-radius: 50px;
  border: 2px solid var(--color-navy);
  cursor: pointer;
  transition: var(--transition-base);
  letter-spacing: .02em;
  white-space: nowrap;
}
.btn-secondary-custom:hover {
  background: var(--color-navy);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-light-custom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #fff !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
  padding: 13px 30px;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,.6);
  cursor: pointer;
  transition: var(--transition-base);
  letter-spacing: .02em;
}
.btn-outline-light-custom:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-sm-custom {
  padding: 9px 22px;
  font-size: .85rem;
}

/* ── Cards ── */
.card-custom {
  background: #fff;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.card-custom:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ── Divider ── */
.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-crimson), var(--color-gold));
  border-radius: 4px;
  margin-bottom: var(--space-3);
}
.divider.centered { margin: 0 auto var(--space-3); }

/* ── Loader ── */
#page-loader {
  position: fixed; inset: 0;
  background: var(--color-navy-dark);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity .5s ease, visibility .5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo { width: 80px; animation: loaderPulse 1.2s ease-in-out infinite; }
.loader-ring {
  width: 48px; height: 48px;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: var(--color-crimson);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.loader-text {
  color: rgba(255,255,255,.5);
  font-family: var(--font-heading);
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loaderPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.7;transform:scale(.96)} }

/* ── Scroll-to-top ── */
#scroll-top {
  position: fixed;
  right: 24px; bottom: 90px;
  width: 44px; height: 44px;
  background: var(--color-navy);
  color: #fff;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: var(--transition-base);
  z-index: 999;
  box-shadow: var(--shadow-md);
  font-size: 1.1rem;
}
#scroll-top.visible { opacity: 1; visibility: visible; }
#scroll-top:hover { background: var(--color-crimson); transform: translateY(-3px); }

/* ── WhatsApp Float ── */
#whatsapp-float {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 52px; height: 52px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: var(--transition-base);
  animation: whatsappPop .3s ease;
}
#whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 8px 24px rgba(37,211,102,.5); }
#whatsapp-float img { width: 28px; height: 28px; }
@keyframes whatsappPop { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }

/* ── Page Hero ── */
.page-hero {
  background: linear-gradient(135deg, var(--color-navy-dark) 0%, var(--color-navy) 60%, #1a3060 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}
.page-hero-sub {
  color: rgba(255,255,255,.7);
  font-size: 1.05rem;
  position: relative;
}
.breadcrumb-custom {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: rgba(255,255,255,.55);
  position: relative; margin-top: 12px;
}
.breadcrumb-custom a { color: rgba(255,255,255,.7); }
.breadcrumb-custom a:hover { color: var(--color-gold); }
.breadcrumb-custom .sep { color: rgba(255,255,255,.3); }

/* ── Form Styles ── */
.form-custom .form-group { margin-bottom: var(--space-3); }
.form-custom label {
  display: block;
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 6px;
}
.form-custom .required { color: var(--color-crimson); }
.form-custom input,
.form-custom select,
.form-custom textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--color-body);
  background: var(--color-off-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  outline: none;
}
.form-custom input:focus,
.form-custom select:focus,
.form-custom textarea:focus {
  border-color: var(--color-navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10,31,68,.08);
}
.form-custom textarea { resize: vertical; min-height: 130px; }
.form-custom .field-error {
  font-size: .8rem;
  color: var(--color-error);
  margin-top: 4px;
  display: none;
}
.form-custom .field-error.show { display: block; }
.form-alert {
  padding: 14px 18px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-heading);
  font-size: .9rem;
  font-weight: 600;
  margin-top: var(--space-2);
  display: none;
}
.form-alert.success { background:#d1f4df; color:#0a5c2e; border:1px solid #a6e4bb; }
.form-alert.error   { background:#fde8ec; color:#8c0c1c; border:1px solid #f5b8c1; }
.form-alert.show    { display: block; }

/* ── Utility ── */
.text-crimson  { color: var(--color-crimson) !important; }
.text-navy     { color: var(--color-navy) !important; }
.text-gold     { color: var(--color-gold) !important; }
.text-muted-custom { color: var(--color-muted) !important; }
.bg-navy       { background: var(--color-navy) !important; }
.bg-crimson    { background: var(--color-crimson) !important; }
.bg-light-custom { background: var(--color-off-white) !important; }
.fw-800 { font-weight: 800 !important; }
.rounded-custom { border-radius: var(--border-radius-md) !important; }

/* ── AOS overrides ── */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }
