﻿/* ===== CSS Variables ===== */

:root {
  /* General Theme */
  --primary-color: #212f54;
  --accent-color: #13b1e7;
  --text-color: #333;
  --navbar-background-color: #223055;
  --tagline-color: #223055;

  --primary-dark: #b35959;
  --light-bg: #f9f7f2;
  --card-bg: #fff;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
  --header-height: 70px;
  --nav-item-height: 40px;

  /* Color Palette */
  --clr-primary-dark: #223055;
  --clr-brand-blue: #13b1e7;
  --clr-brand-blue-light: #36bae6;
  --clr-brand-blue-medium: #3abadf;
  --clr-brand-blue-lighter: #b6e8ff;
  --clr-white: #fff;
  --clr-dark-gray: #333;
  --clr-text-gray: #707070;
  --clr-border: #dedede;
  --clr-bg-light: #e0e5eb;
  --clr-accent-orange: #e06630;
  --clr-accent-gold: #ffc107;
  --clr-accent-gold-darker: #eeb80c;
  --clr-accent-red: #f44336;
  --clr-accent-green: rgb(121 156 75);
  --clr-success: #2ecc71;
  --clr-warning: #f39c12;
  --clr-info: #3498db;
  
  --clr-red: #e74c3c;
  --clr-green: #27ae60;
  --clr-yellow: #f39c12;
  --clr-purple: #9b8bc9;
  --clr-purple-light: #b4a5d9;

  /* Typography */
  --font-primary: 'Lato', sans-serif;
  --font-headings: 'Nunito', sans-serif;

  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;
}


/* ==========================================================================
   ===== RESET & BASE STYLES =====
   ========================================================================== */

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text-color);
  background-color: var(--light-bg);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: 2rem;
}

/* ==========================================================================
   ===== TYPOGRAPHY =====
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-md);
  color: var(--clr-primary-dark);
}

h1 {
  font-size: 2.2rem;
  text-align: center;
  margin: var(--space-xl) 0 var(--space-lg);
}

h2 {
  font-size: 1.8rem;
  border-bottom: 3px solid var(--clr-brand-blue);
  padding-bottom: var(--space-xs);
  margin-top: var(--space-xl);
}

h3 {
  font-size: 1.4rem;
  color: var(--clr-primary-dark);
  margin-top: var(--space-lg);
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--clr-brand-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--clr-accent-orange);
  text-decoration: underline;
}

/* ==========================================================================
   ===== HEADER & NAVIGATION =====
   ========================================================================== */

/* ===============================
   Navbar (CSS Grid)
   =============================== */
.navbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;

  height: var(--header-height);
  width: 100%;
  max-width: 100%;
}

/* Logo */
.logo {
  max-height: 42px;
  width: auto;
  display: block;
  border-radius: 50%;
  margin-left: var(--space-lg);
}

/* ===============================
   Navigation (Desktop)
   =============================== */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-sm);
}

.nav-links a {
  height: var(--nav-item-height);
  padding: 0 var(--space-md);
  display: grid;
  place-items: center;

  color: var(--clr-white);
  border-radius: 6px;
  text-decoration: none;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.15);
}

/* ===============================
   Language Selector
   =============================== */
.nav-lang {
  display: flex;
  align-items: center;
}

.lang-selector {
  height: var(--nav-item-height);
  min-width: 9ch;

  padding: 0 2.5rem 0 1rem;
  border: none;
  border-radius: 8px;

  background: rgba(255,255,255,0.18);
  color: white;

  appearance: none;
  cursor: pointer;

  background-image:
    linear-gradient(45deg, transparent 50%, white 50%),
    linear-gradient(135deg, white 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.lang-selector option {
  color: #333;
}

.lang-wrapper {
  position: relative;
  width: 100%;
}

.lang-selector {
  width: 100%;
  padding-right: 2.5rem; /* space for arrow */
}

/* Custom arrow */
.lang-wrapper::after {
  content: "▼";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;

  font-size: 0.75rem;
  color: white;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .lang-wrapper::after {
    font-size: 0.9rem;
  }
}

/* ===============================
   Hamburger Button - Modern Design
   =============================== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius);
  position: relative;
  z-index: 10001;
  transition: var(--transition);
  margin-right: var(--space-md);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger {
  display: block;
  position: relative;
  width: 24px;
  height: 2px;
  background: var(--clr-white);
  margin: 0 auto;
  transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--clr-white);
  left: 0;
  transition: var(--transition);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

/* Animated hamburger to X */
.menu-toggle[aria-expanded=true] .hamburger {
  background: transparent;
}

.menu-toggle[aria-expanded=true] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
  background: var(--accent-color);
}

.menu-toggle[aria-expanded=true] .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
  background: var(--accent-color);
}


/* ===============================
   Mobile Menu (Floating Card)
   =============================== */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
    justify-self: end; /* push hamburger right */
  }

  .navbar {
    grid-template-columns: auto 1fr auto;
  }

  .main-nav {
    position: fixed;
    top: calc(var(--header-height) + 0.75rem);
    left: 50%;
    transform: translate(-50%, -20px);

    width: calc(100% - 2rem);
    max-width: 420px;

    background: var(--primary-color);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);

    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .main-nav.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
  }

  .nav-links a {
    width: 100%;
    height: auto;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.25rem;
    transition: var(--transition);
    text-align: left;
    justify-content: flex-start;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .nav-links a::before {
    display: none;
  }

  .nav-links a::after {
    content: '→';
    margin-left: auto;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
    color: var(--accent-color);
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
  }

  .nav-links a:hover::after {
    opacity: 1;
    transform: translateX(0);
  }
  

  .nav-lang {
    width: 100%;
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255,255,255,0.15);
  }

  .lang-selector {
    width: 100%;
    background: rgba(255,255,255,0.22);
    font-weight: 500;
  }
}


/* ===============================
   Mobile Backdrop
   =============================== */

.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;

  z-index: 999;
}

body.menu-open .mobile-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* ===============================
   Motion Safety
   =============================== */

@media (prefers-reduced-motion: reduce) {
  .main-nav,
  .menu-toggle i,
  .mobile-backdrop {
    transition: none !important;
  }
}


/* ===============================
   Header
   =============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary-color);
}

.headerInner {
  text-align:center
}

.headerInner h1 {
  color: var(--primary-color);
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .headerInner {
        margin: 1rem auto 0;
        padding: 1rem;
    }
    
    .headerInner h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .headerInner h1 {
        font-size: 1.2rem;
    }
}


/* ==========================================================================
   ===== FOOTER & UTILITIES =====
   ========================================================================== */

.page-footer {
  text-align: center;
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  color: var(--clr-text-gray);
  font-size: 0.9rem;
  border-top: 1px solid var(--clr-border);
}

.text-center { text-align: center; }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }

.highlight {
  background: linear-gradient(120deg, #b6e8ff 0%, #b6e8ff 100%);
  background-repeat: no-repeat;
  background-size: 100% 40%;
  background-position: 0 90%;
}


/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  /* Typography */
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
}
