/* Updated streamlined Whitemod & Gendarmerie Mode */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Montserrat:wght@300;400;600;700&family=Open+Sans:wght@400;600&display=swap');

/* Palette & Theme Variables */
:root{
  /* WHITEMOD (Light Mode) - Default */
  --bg-main: #f8fafc;
  --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  --card-bg: #ffffff;
  --card-border: #cbd5e1;
  --text-main: #1e293b; /* Slate 800 */
  --text-heading: #0f172a; /* Slate 900 */
  --text-muted: #64748b; /* Slate 500 */
  
  --accent-color: #0284c7; /* Sky 600 */
  
  /* Map Gold classes to Blue in light mode for professional look */
  --gold-1: #0ea5e9;
  --gold-2: #0284c7;
  --gold-3: #0369a1;
  
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-text: #0f172a;
  
  --shadow-color: rgba(0,0,0,0.08);
  --icon-color: #0284c7;
  
  --hero-overlay: linear-gradient(180deg, rgba(15,23,42,0.4), rgba(15,23,42,0.1));
  --hero-text: #ffffff;
  
  --btn-text: #ffffff;
  
  --footer-bg: linear-gradient(120deg,#0f172a 0%, #1e293b 100%);
  --footer-text: #cbd5e1;
}

[data-theme="dark"] {
  /* GENDARMERIE MODE (Dark Mode) */
  --bg-main: #030405;
  --bg-gradient: linear-gradient(180deg, #030405 0%, #07101a 60%);
  --card-bg: linear-gradient(180deg, #0b0f12, #091018);
  --card-border: rgba(245,158,11,0.12);
  --text-main: #f3f3f5;
  --text-heading: #fbbf24;
  --text-muted: #9aa6b2;
  
  --accent-color: #f59e0b;
  
  /* Authentic Gold */
  --gold-1: #b45309;
  --gold-2: #f59e0b;
  --gold-3: #fbbf24;
  
  --nav-bg: rgba(2, 3, 10, 0.95);
  --nav-text: #f3f3f5;
  
  --shadow-color: rgba(0,0,0,0.6);
  --icon-color: #f59e0b;
  
  --hero-overlay: linear-gradient(180deg, rgba(2,6,11,0.7), rgba(4,8,12,0.85));
  --hero-text: #f3f3f5;
  
  --btn-text: #041018;
  
  --footer-bg: linear-gradient(120deg,#03040a 0%, #0e0a06 40%, #2b1806 100%);
  --footer-text: #9aa6b2;
}

/* Course pages — ensure internal course text is dark in Whitemod (light theme) */
:root {
  --course-text: #000000; /* Whitemod default (light mode) */
}
[data-theme="dark"] {
  --course-text: #ffffff; /* Gendarmerie Mode (dark) */
}

/* NEW: define course text variable per theme (Whitemod = black, Gendarmerie = white) */
:root {
  --course-text: #000000; /* Whitemod default (light mode) */
}
[data-theme="dark"] {
  --course-text: #ffffff; /* Gendarmerie Mode (dark) */
}

/* In Gendarmerie Mode make 'What You'll Learn' boxes black on course pages */
[data-theme="dark"] course-template .bg-sky-50,
[data-theme="dark"] course-template .bg-sky-50.rounded-xl,
[data-theme="dark"] course-template .bg-sky-50.rounded-xl.p-8 {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.06) !important;
  box-shadow: none !important;
}

/* Ensure headings and paragraph text inside those boxes remain readable in dark mode */
[data-theme="dark"] course-template .bg-sky-50 h3,
[data-theme="dark"] course-template .bg-sky-50 h4,
[data-theme="dark"] course-template .bg-sky-50 p,
[data-theme="dark"] course-template .bg-sky-50 .text-slate-700 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Target course page internal text and course-card elements (custom elements included)
   Force readable dark text for Whitemod while preserving dark-theme behavior */
course-template,
course-template *,
course-card,
course-card *,
.course-card,
.course-card * {
  color: var(--course-text) !important;
}

/* Whitemod-specific welcome card styling */
:root:not([data-theme="dark"]) .welcome-card {
  /* lighter, airy sky-blue card for Whitemod */
  background: linear-gradient(90deg, rgba(96,165,250,0.08) 0%, rgba(191,219,254,0.06) 40%, rgba(255,255,255,0.85) 100%) !important;
  border: 1px solid rgba(96,165,250,0.08) !important;
  box-shadow: 0 8px 24px rgba(14,165,233,0.06) !important;
}

/* Make the heading a professional dark-blue/gold accent in Whitemod */
:root:not([data-theme="dark"]) .welcome-card h2 {
  /* softer light-blue heading for Whitemod */
  color: #ffffff !important; /* Force white for the welcome heading in Whitemod */
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 6px 22px rgba(0,0,0,0.45);
}

/* Slightly darker paragraph for contrast on the subtle gradient */
:root:not([data-theme="dark"]) .welcome-card p {
  /* lighter, warm-slate body text for Whitemod card */
  color: #000000 !important;
  opacity: 0.95;
  -webkit-text-fill-color: #000000 !important;
}

/* Whitemod (light theme) styles for the Popular PADI Courses section:
   use a soft, light background and darker slate headings for improved contrast
   while keeping the site's light, professional palette. */
:root:not([data-theme="dark"]) .popular-padi {
  background: linear-gradient(90deg, rgba(239,246,255,0.95) 0%, rgba(255,250,240,0.9) 45%, rgba(248,250,252,0.95) 100%) !important;
  border: 1px solid rgba(148,163,184,0.06) !important;
  box-shadow: 0 8px 30px rgba(2,6,11,0.03) !important;
  color: var(--text-heading) !important;
}

/* Heading inside Popular PADI Courses: warm gold accent but lighter for Whitemod */
:root:not([data-theme="dark"]) .popular-padi h3,
:root:not([data-theme="dark"]) .popular-padi .text-2xl,
:root:not([data-theme="dark"]) .popular-padi .text-3xl {
  color: #92400e !important; /* muted warm gold/burnt orange for headings */
  -webkit-text-fill-color: #92400e !important;
  text-shadow: 0 6px 14px rgba(15,23,42,0.04);
}

/* Accent link/button in this section: soft cyan/teal */
:root:not([data-theme="dark"]) .popular-padi a.inline-flex,
:root:not([data-theme="dark"]) .popular-padi .inline-flex {
  background: linear-gradient(90deg, rgba(96,165,250,0.95), rgba(6,182,172,0.9)) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
}

/* Paragraphs and smaller descriptive text should remain dark slate for legibility */
:root:not([data-theme="dark"]) .popular-padi p,
:root:not([data-theme="dark"]) .popular-padi .text-slate-300,
:root:not([data-theme="dark"]) .popular-padi .text-slate-500 {
  color: #0f172a !important;
  opacity: 0.92;
}

/* Whitemod: lighter palette for the "Discover the Red Sea Reefs" section */
:root:not([data-theme="dark"]) .discover-section {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.75) 0%, rgba(255, 250, 240, 0.6) 50%, rgba(245, 249, 255, 0.5) 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.08) !important;
  color: #0f172a !important;
}

/* Force Core Adventure Dives block text to black in Whitemod (light theme) */
:root:not([data-theme="dark"]) #core-adventure,
:root:not([data-theme="dark"]) #core-adventure h3,
:root:not([data-theme="dark"]) #core-adventure h4,
:root:not([data-theme="dark"]) #core-adventure p,
:root:not([data-theme="dark"]) #core-adventure .text-sm,
:root:not([data-theme="dark"]) #core-adventure .text-slate-300 {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

:root:not([data-theme="dark"]) .discover-section h2 {
  color: #b45309 !important; /* dark orange heading */
  -webkit-text-fill-color: #b45309 !important;
  text-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

:root:not([data-theme="dark"]) .discover-section .text-sky-400,
:root:not([data-theme="dark"]) .discover-section .text-sky-400 * {
  color: #60a5fa !important; /* lighter sky blue for the SEE TRIPS accent */
  -webkit-text-fill-color: #60a5fa !important;
}

:root:not([data-theme="dark"]) .discover-section p {
  color: #0f172a !important;
  opacity: 0.9;
}

:root:not([data-theme="dark"]) .discover-section .inline-flex {
  background: linear-gradient(90deg, rgba(96,165,250,0.95), rgba(34,197,94,0.9)) !important;
  color: #fff !important;
  box-shadow: 0 8px 30px rgba(2,6,11,0.04) !important;
}

/* Base */
html,body{height:100%}
body{
  margin:0;
  font-family:"Open Sans",system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial;
  background: var(--bg-gradient) !important;
  color: var(--text-main) !important;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  -webkit-text-size-adjust:100%;
}

/* Headings use Cinzel for an artisan feel */
h1,h2,h3,h4,h5,h6{
    font-family:"Cinzel",serif;
    letter-spacing:0.02em;
    color:var(--text-heading) !important;
}

a{color:var(--accent-color);text-decoration:none;transition:all .18s ease}

/* Card backgrounds unified */
.bg-white, .bg-slate-50, .bg-slate-100, .bg-gray-50 {
  background: var(--card-bg) !important;
  border:1px solid var(--card-border) !important;
  box-shadow: 0 8px 30px var(--shadow-color) !important;
  color:var(--text-main) !important;
}

/* Nav backgrounds */
.bg-slate-900, .bg-neutral-900, .bg-slate-900\/95, nav.fixed {
  background: var(--nav-bg) !important;
  border-bottom:1px solid var(--card-border) !important;
  color: var(--nav-text) !important;
}

/* Nav Links Color Override */
nav a, nav .text-slate-300 {
    color: var(--nav-text) !important;
}
nav a:hover {
    color: var(--accent-color) !important;
    background: rgba(125,211,252,0.1) !important;
}

/* Buttons — distinct treatment mapping to variables */
.btn-gold, a[class*="bg-sky-600"], button[class*="bg-sky-600"], .bg-emerald-500, .bg-gradient-to-r.from-amber-600 {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding:.65rem 1.05rem;
  border-radius:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.04em;
  color: var(--btn-text) !important;
  background: linear-gradient(90deg,var(--gold-1),var(--gold-2)) !important;
  box-shadow:0 8px 30px var(--shadow-color) !important;
  border:1px solid rgba(255,239,140,0.08) !important;
  transition:transform .18s ease, box-shadow .18s ease;
}
.btn-gold:hover, a[class*="bg-sky-600"]:hover, button[class*="bg-sky-600"]:hover {
  transform:translateY(-3px);
  box-shadow:0 14px 40px rgba(0,0,0,0.15) !important;
}

/* Outline / secondary buttons */
.border-slate-200, .btn-outline {
  border:1px solid var(--card-border) !important;
  color:var(--accent-color) !important;
  background: transparent !important;
}

/* Text color adjustments */
.text-slate-900, .text-gray-900, .text-black, .text-slate-800 {
  color:var(--text-heading) !important;
  background: none !important;
  -webkit-text-fill-color: var(--text-heading) !important;
}
.text-slate-600, .text-slate-700, .text-gray-600, .text-gray-700 { color:var(--text-muted) !important; }
.text-slate-500, .text-gray-500 { color:var(--text-muted) !important; opacity: 0.8; }

/* Icon stroke color */
svg { stroke: var(--icon-color) !important; color:var(--icon-color) !important; }
svg[fill="currentColor"]{ fill: var(--icon-color) !important; }

/* Card image treatment */
.course-card img, .reveal img, figure img {
  border:1px solid var(--card-border);
  filter:contrast(1.02) saturate(0.98);
  transition: transform .6s cubic-bezier(.2,.9,.2,1);
}
.course-card img:hover, .reveal img:hover, figure img:hover { transform: scale(1.03) }

/* Hero overlays */
.relative .absolute[inset-0], .absolute.inset-0.bg-gradient-to-b { background: var(--hero-overlay) !important; }
/* Hero Text always white/light */
.relative.z-10 h1, .hero-text-shadow {
    color: #ffffff !important;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    -webkit-text-fill-color: #ffffff !important;
}

/* Footer visual */
.footer-animated-bg, footer {
  background: var(--footer-bg) !important;
  color: var(--footer-text) !important;
  border-top:1px solid var(--card-border);
}
footer h1, footer h2, footer h3, footer a, footer p, footer li {
    color: #cbd5e1 !important; /* Always light text in footer */
}
footer h3 {
    border-color: var(--accent-color) !important;
    color: #fff !important;
}

/* Floating particles blend mode */
#bg-canvas { mix-blend-mode:normal; opacity:.6 !important }
[data-theme="dark"] #bg-canvas { mix-blend-mode:screen; opacity:.28 !important }

/* Top Bar Specifics */
.bg-sky-600\/90 {
    background: linear-gradient(90deg,var(--gold-1),var(--gold-2)) !important;
    color: var(--btn-text) !important;
}

/* Accessibility & small touch targets */
button, a, .btn-gold { min-height:44px; min-width:44px; }

.container-tight { max-width:1200px; margin:0 auto; padding:0 1rem }

img { -webkit-filter: none !important; filter: none !important; }

nav.fixed { position: relative !important; top: 0 !important; left: 0 !important; width: 100% !important; }

/* Shape and visual tweak for Email Booking (mailto) buttons: pill shape, clearer border and hover */
a[href^="mailto:info@divegoredsea.com"] {
  border-radius: 9999px !important;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  background: linear-gradient(90deg,var(--gold-1),var(--gold-2)) !important;
  color: var(--btn-text) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 8px 30px var(--shadow-color) !important;
  font-weight: 700 !important;
  min-height: 44px !important;
}

/* Slight hover lift for the pill email button */
a[href^="mailto:info@divegoredsea.com"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.12) !important;
}

header, .relative.h-80, .relative.h-96, .relative.h-screen {
  z-index: 10;
}

@media (max-width:640px) {
  h1 { font-size:1.6rem }
  .btn-gold { padding:.6rem .9rem; font-size:.85rem }
}