/**
 * FUNDAAHE - Utilities & Theme Variables
 * Dual theme system: Dark (default) + Light (branding)
 * Branding colors: #03888A, #1D4E89, #FFFFFF, #F2385A, #D9B1A3
 */

/* ===== BRAND PALETTE (constant) ===== */
:root {
  --teal: #03888A;
  --teal-light: #0aacae;
  --teal-dark: #026d6e;
  --teal-glow: rgba(3, 136, 138, 0.6);
  --navy: #1D4E89;
  --navy-light: #2a6ab5;
  --navy-dark: #153a66;
  --hot-pink: #F2385A;
  --hot-pink-light: #ff6b8a;
  --salmon: #D9B1A3;
  --salmon-light: #e8cec4;
  --gold: #FFE68F;
  --gold-bright: #FFD54F;

  /* legacy aliases */
  --neon-teal: #03888A;
  --neon-teal-glow: rgba(3, 136, 138, 0.6);
  --deep-navy: #0a0e1a;
}

/* ===== DARK THEME (default) ===== */
:root {
  --bg-body: #0a0e1a;
  --bg-section: #0a0e1a;
  --bg-section-alt: #0d1525;
  --bg-card: rgba(10, 14, 26, 0.95);
  --bg-card-subtle: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(29, 78, 137, 0.15);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(3, 136, 138, 0.15);
  --border-hover: rgba(3, 136, 138, 0.4);
  --text-heading: #ffffff;
  --text-body: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --text-faint: rgba(255, 255, 255, 0.3);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 20px rgba(3, 136, 138, 0.1);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.2);
  --gradient-section: linear-gradient(180deg, #0a0e1a, #0d1525);
  --gradient-section-alt: linear-gradient(180deg, #0d1525, #0a0e1a);
  --overlay-card: linear-gradient(135deg, rgba(10,14,26,0.95), rgba(29,78,137,0.15));
  --nav-bg: rgba(10, 14, 26, 0.92);
  --nav-blur: blur(20px) saturate(180%);
}

/* ===== LIGHT THEME (branding) ===== */
html.light {
  --bg-body: #F0F4F7;
  --bg-section: #F0F4F7;
  --bg-section-alt: #E8EEF4;
  --bg-card: #E8EEF4;
  --bg-card-subtle: rgba(29, 78, 137, 0.04);
  --bg-card-hover: rgba(3, 136, 138, 0.06);
  --border-color: rgba(29, 78, 137, 0.12);
  --border-subtle: rgba(29, 78, 137, 0.1);
  --border-hover: rgba(3, 136, 138, 0.3);
  --text-heading: #1D4E89;
  --text-body: #374151;
  --text-muted: #4b5563;
  --text-faint: #6b7280;
  --shadow-card: 0 4px 12px rgba(29, 78, 137, 0.08);
  --shadow-card-hover: 0 16px 40px rgba(29, 78, 137, 0.12);
  --shadow-soft: 0 2px 8px rgba(29, 78, 137, 0.06);
  --gradient-section: linear-gradient(180deg, #F0F4F7, #E8EEF4);
  --gradient-section-alt: linear-gradient(180deg, #E8EEF4, #F0F4F7);
  --overlay-card: none;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-blur: blur(20px) saturate(180%);
}

/* ===== BODY ===== */
body {
  background: var(--bg-body) !important;
  color: var(--text-body);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== THEMED HEADING COLORS ===== */
html.light h1:not([class*="text-"]),
html.light h2:not([class*="text-"]),
html.light h3:not([class*="text-"]),
html.light h4:not([class*="text-"]),
html.light h5:not([class*="text-"]),
html.light h6:not([class*="text-"]) {
  color: var(--text-heading);
}

/* ===== THEMED TEXT OVERRIDES FOR LIGHT MODE ===== */
html.light .text-white {
  color: var(--text-heading) !important;
}

html.light .text-white\/30,
html.light .text-white\/35,
html.light .text-white\/40,
html.light .text-white\/45,
html.light .text-white\/50 {
  color: var(--text-muted) !important;
}

html.light .text-white\/60,
html.light .text-white\/70 {
  color: var(--text-body) !important;
}

/* ===== THEMED BORDER OVERRIDES FOR LIGHT MODE ===== */
html.light .border-white\/5,
html.light .border-white\/6,
html.light .border-white\/10 {
  border-color: var(--border-color) !important;
}

html.light .border-white\/15,
html.light .border-white\/20,
html.light .border-white\/30 {
  border-color: var(--border-subtle) !important;
}

/* ===== THEMED BG OVERRIDES FOR LIGHT MODE ===== */
html.light .bg-white\/3,
html.light .bg-white\/5,
html.light .bg-white\/8,
html.light .bg-white\/10 {
  background-color: var(--bg-card-subtle) !important;
}

/* ===== .keep-dark: preserve dark colors in light mode (MUST come after generic overrides) ===== */
html.light .keep-dark .text-white {
  color: #FFFFFF !important;
}

html.light .keep-dark .text-white\/30,
html.light .keep-dark .text-white\/35 {
  color: rgba(255,255,255,0.35) !important;
}

html.light .keep-dark .text-white\/40,
html.light .keep-dark .text-white\/45,
html.light .keep-dark .text-white\/50 {
  color: rgba(255,255,255,0.5) !important;
}

html.light .keep-dark .text-white\/60,
html.light .keep-dark .text-white\/70 {
  color: rgba(255,255,255,0.7) !important;
}

html.light .keep-dark .border-white\/5,
html.light .keep-dark .border-white\/6,
html.light .keep-dark .border-white\/10 {
  border-color: rgba(255,255,255,0.1) !important;
}

html.light .keep-dark .border-white\/15,
html.light .keep-dark .border-white\/20,
html.light .keep-dark .border-white\/30 {
  border-color: rgba(255,255,255,0.2) !important;
}

html.light .keep-dark .bg-white\/3,
html.light .keep-dark .bg-white\/5,
html.light .keep-dark .bg-white\/8,
html.light .keep-dark .bg-white\/10 {
  background-color: rgba(255,255,255,0.05) !important;
}

/* ===== GRADIENT TEXT UTILITIES ===== */
.text-gradient {
  background: linear-gradient(135deg, #03888A, #4dc9cb, #FFE68F);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html.light .text-gradient {
  background: linear-gradient(135deg, var(--teal), var(--navy));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #FFE68F, #FFD54F, #FFC107);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-warm {
  background: linear-gradient(135deg, var(--hot-pink), var(--salmon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(3,136,138,0.3) 20%, rgba(3,136,138,0.5) 50%, rgba(3,136,138,0.3) 80%, transparent 100%);
}

html.light .section-divider {
  background: linear-gradient(90deg, transparent 0%, rgba(29,78,137,0.1) 20%, rgba(29,78,137,0.2) 50%, rgba(29,78,137,0.1) 80%, transparent 100%);
}

/* ===== PATTERN BACKGROUNDS ===== */
.hex-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='52' viewBox='0 0 60 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15z' fill='none' stroke='%2303888A' stroke-width='0.3' opacity='0.08'/%3E%3C/svg%3E");
}

html.light .hex-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='52' viewBox='0 0 60 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15z' fill='none' stroke='%231D4E89' stroke-width='0.3' opacity='0.05'/%3E%3C/svg%3E");
}

.grid-bg {
  background-image:
    linear-gradient(rgba(3,136,138,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3,136,138,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ===== DARK PAGE HERO ===== */
.dark-page-hero {
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1525 50%, #0a0e1a 100%);
  position: relative;
  overflow: hidden;
}

.dark-page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #03888A, #4dc9cb, #03888A, transparent);
  box-shadow: 0 0 20px rgba(3,136,138,0.5), 0 0 60px rgba(3,136,138,0.2);
}

html.light .dark-page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 50%, var(--navy) 100%);
}

html.light .bg-gradient-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 50%, var(--navy) 100%);
}

/* ===== DARK CARD ===== */
.dark-card {
  background: var(--overlay-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* ===== GLOW EFFECTS ===== */
.glow-teal {
  box-shadow: 0 0 30px rgba(3,136,138,0.3);
}

html.light .glow-teal {
  box-shadow: 0 4px 20px rgba(3,136,138,0.12);
}

.glow-teal-lg {
  box-shadow: 0 0 50px rgba(3,136,138,0.5);
}

html.light .glow-teal-lg {
  box-shadow: 0 8px 30px rgba(3,136,138,0.15);
}

.glow-gold {
  box-shadow: 0 0 30px rgba(255,213,79,0.3);
}

html.light .glow-gold {
  box-shadow: 0 4px 20px rgba(255,213,79,0.15);
}

.glow-red {
  box-shadow: 0 0 30px rgba(242,56,90,0.3);
}

html.light .glow-red {
  box-shadow: 0 4px 20px rgba(242,56,90,0.1);
}

/* ===== TEXT SHADOW UTILITIES ===== */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== BACKGROUND GRADIENTS ===== */
.bg-gradient-dark {
  background: var(--gradient-section);
}

.bg-gradient-dark-reverse {
  background: var(--gradient-section-alt);
}

.bg-gradient-hero {
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1525 50%, #0a0e1a 100%);
}

.bg-gradient-teal {
  background: linear-gradient(135deg, rgba(3,136,138,0.1), #071020);
}

html.light .bg-gradient-teal {
  background: linear-gradient(135deg, rgba(3,136,138,0.03), rgba(3,136,138,0.06));
}

.bg-gradient-navy {
  background: linear-gradient(135deg, #071020 0%, rgba(3,136,138,0.3) 50%, #071020 100%);
}

html.light .bg-gradient-navy {
  background: linear-gradient(135deg, rgba(29,78,137,0.03), rgba(29,78,137,0.06));
}

/* ===== CANVA EMBED ===== */
.canva-embed-container {
  width: 100%;
  max-width: 100%;
}

.canva-embed-container > div {
  width: 100% !important;
}

/* ===== LINE CLAMP UTILITIES ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
