/* =============================================================
   HCCKSA Corporate Theme – Main Stylesheet
   ============================================================= */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Brand colors */
  --color-primary:      #0a2047;
  --color-primary-dark: #061530;
  --color-primary-mid:  #123474;
  --color-accent:       #f37021;
  --color-accent-dark:  #d45f10;
  --color-accent-light: #ff8c42;

  /* Neutrals */
  --color-white:        #ffffff;
  --color-light:        #f5f7fa;
  --color-light-mid:    #eaeff6;
  --color-border:       #dde3ed;
  --color-text:         #2c3e50;
  --color-text-light:   #5a6a7e;
  --color-text-muted:   #8a9bb0;

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Sizing */
  --container-max:   1280px;
  --container-pad:   clamp(1rem, 4vw, 2rem);
  --section-pad-v:   clamp(4rem, 8vw, 7rem);
  --topbar-h:        40px;
  --header-h:        76px;
  --total-header-h:  calc(var(--topbar-h) + var(--header-h));
  --radius:          10px;
  --radius-sm:       6px;
  --radius-lg:       16px;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(10,32,71,.06);
  --shadow-md:   0 6px 24px rgba(10,32,71,.10);
  --shadow-lg:   0 16px 48px rgba(10,32,71,.14);
  --shadow-card: 0 4px 20px rgba(10,32,71,.08);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* Inherit font in all form elements (browser reset) */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

/* Stroke-based icons default to no fill; fill-based icons
   (WhatsApp, social) override this with fill="currentColor" on the element. */
svg { fill: none; }
svg[fill="currentColor"],
svg[fill="currentColor"] path { fill: currentColor; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p  { margin-bottom: 1rem; }
a  { color: var(--color-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent-dark); }
img { max-width: 100%; height: auto; display: block; }
svg { display: inline-block; vertical-align: middle; }
address { font-style: normal; }
ul, ol { list-style: none; }

/* ── Accessibility ─────────────────────────────────────────── */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed; top: 1rem; left: 1rem;
  background: var(--color-accent);
  color: var(--color-white);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 9999;
  width: auto; height: auto;
  clip: auto;
}
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ── Layout Utilities ──────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  width: 100%;
}

.section-pad { padding-block: var(--section-pad-v); }
.bg-light     { background: var(--color-light); }
.text-center  { text-align: center; }

/* ── Section Headers ───────────────────────────────────────── */
.section-header { margin-bottom: 3.5rem; }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: .75rem;
}

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

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  border-radius: 99px;
  margin: 1rem auto 1.5rem;
}

.section-desc {
  max-width: 640px;
  margin-inline: auto;
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.75rem;
  font-size: .95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  white-space: nowrap;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-lg { padding: .9rem 2.2rem; font-size: 1rem; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-mid);
  border-color: var(--color-primary-mid);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.btn-accent:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(243,112,33,.35);
}

.btn-outline-light {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,.7);
}
.btn-outline-light:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #25d366;
  color: var(--color-white);
  border-color: #25d366;
}
.btn-whatsapp:hover {
  background: #1da851;
  color: var(--color-white);
}

/* ── WhatsApp FAB ──────────────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  z-index: 1000;
  transition: all var(--transition);
  color: var(--color-white);
}
.whatsapp-fab svg { width: 28px; height: 28px; }
.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(37,211,102,.55);
  color: var(--color-white);
}

/* ── Page Hero (inner pages) ───────────────────────────────── */
.page-hero {
  position: relative;
  background: var(--color-primary);
  background-image: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-mid) 100%);
  padding: calc(var(--total-header-h) + 3.5rem) 0 5rem;
  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%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6,21,48,.5);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
}

.page-hero-title {
  color: var(--color-white);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: .5rem 0 1rem;
}

.page-hero-subtitle {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 0;
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb [aria-current="page"] { color: var(--color-accent); }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounceY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

.animate-fade-up {
  opacity: 0;
  animation: fadeUp .7s ease forwards;
}
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .3s; }
.delay-3 { animation-delay: .45s; }
.animate-bounce { animation: bounceY 2s ease-in-out infinite; }

/* Intersection Observer targets */
[data-animate] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-animate].in-view { opacity: 1; transform: none; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --section-pad-v: 3.5rem; }
  .section-header { margin-bottom: 2.5rem; }
}
