/* ===== Safe Port Gaming — Shared Styles =====
   Common CSS used across all pages.
   Page-specific styles remain inline in each HTML file.
*/

/* ===== CSS Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary:       #1a1a1a;
    --secondary:     #2c3e50;
    --accent:        #b8860b;
    --accent-light:  #d4a017;
    --accent-glow:   rgba(184,134,11,0.25);
    --accent-text:   #4a3500;
    --text:          #2a2a2a;
    --text-light:    #555;
    --bg:            #f4f1eb;
    --bg-card:       #faf8f3;
    --bg-section:    #f0ece0;
    --border:        #d4c9a8;
    --border-strong: #b8a87a;
    --shadow:        0 4px 20px rgba(0,0,0,0.12);
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
    --radius:        10px;
    --transition:    all 0.25s ease;
    --font-display:  'Cinzel', Georgia, serif;
    --font-body:     'Lato', 'Segoe UI', sans-serif;
}

html.dark-mode, body.dark-mode {
    --primary:       #c9b97a;
    --secondary:     #a88bc7;
    --accent:        #d4a017;
    --accent-light:  #e8b820;
    --accent-glow:   rgba(212,160,23,0.2);
    --accent-text:   #f5dfa0;
    --text:          #e8e0d0;
    --text-light:    #b5a890;
    --bg:            #1a1714;
    --bg-card:       #221f1a;
    --bg-section:    #2a2520;
    --border:        #3d3628;
    --border-strong: #5a4e35;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed; top: 0; width: 100%;
    background-color: var(--bg-card);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    z-index: 1000; transition: var(--transition);
    border-bottom: 1px solid var(--border);
}
.navbar .nav-container {
    max-width: 1600px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.85rem 20px;
}
.nav-left { display: flex; align-items: center; gap: 15px; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-container { display: flex; align-items: center; gap: 10px; }
.spg-logo { width: 80px; height: 45px; }
body.dark-mode .spg-logo { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
.brand-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; letter-spacing: 0.5px; }

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-section); border: 2px solid var(--border);
    border-radius: 20px; width: 50px; height: 28px;
    cursor: pointer; display: flex; align-items: center;
    transition: var(--transition); padding: 3px; position: relative; margin: 0;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle::after {
    content: ''; width: 18px; height: 18px;
    background: var(--accent); border-radius: 50%;
    transition: var(--transition); position: absolute; left: 4px;
}
body.dark-mode .theme-toggle::after { left: 26px; }
.theme-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Nav Menu */
.nav-menu { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-link {
    text-decoration: none; color: var(--text); font-weight: 500;
    transition: var(--transition); position: relative;
    font-family: var(--font-body); font-size: 0.95rem;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0; height: 2px; background-color: var(--accent); transition: var(--transition);
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--accent); }
.nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Dropdown Menu */
.nav-dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: 100%; left: 0;
    background-color: var(--bg-card);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    border: 1px solid var(--border);
    border-radius: 8px; list-style: none; padding: 8px 0;
    min-width: 180px; opacity: 0; visibility: hidden;
    transform: translateY(-8px); transition: var(--transition); z-index: 1001;
}
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-link {
    display: block; padding: 10px 20px; color: var(--text);
    text-decoration: none; transition: var(--transition); font-size: 0.9rem;
}
.dropdown-link:hover { background-color: var(--bg-section); color: var(--accent); padding-left: 25px; }
.dropdown-link.active { color: var(--accent); font-weight: 600; }

/* Mobile Nav Toggle */
.nav-toggle {
    display: none; flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: 5px;
}
.nav-toggle span {
    width: 25px; height: 3px; background-color: var(--text); transition: var(--transition);
}

/* ===== Hero Header ===== */
.hero-header {
    background: linear-gradient(135deg, #1a2a3a 0%, #0d1f2d 50%, #1a1a0a 100%);
    color: white; text-align: center;
    padding: 110px 20px 80px; position: relative; overflow: hidden;
}
.hero-header::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        radial-gradient(ellipse at 30% 60%, rgba(184,134,11,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(56,100,160,0.12) 0%, transparent 50%),
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255,255,255,0.01) 40px, rgba(255,255,255,0.01) 41px);
}
.hero-content { position: relative; z-index: 1; }
.hero-header h1 {
    font-family: var(--font-display);
    font-size: 3.2rem; font-weight: 700;
    letter-spacing: 3px; text-transform: uppercase;
    text-shadow: 0 0 40px rgba(184,134,11,0.5), 2px 2px 4px rgba(0,0,0,0.5);
    color: #f0d080; margin-bottom: 0.75rem;
}
.subtitle {
    font-size: 1.1rem; opacity: 0.8; letter-spacing: 1px;
    font-weight: 300; color: #c8d8e8;
}
.hero-ornament {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin: 16px 0;
}
.hero-ornament span { color: var(--accent-light); font-size: 1.4rem; }
.hero-ornament::before, .hero-ornament::after {
    content: ''; flex: 1; max-width: 120px; height: 1px;
    background: linear-gradient(to right, transparent, rgba(212,160,23,0.6), transparent);
}

/* Wave Divider */
.wave-divider { position: absolute; bottom: 0; left: 0; width: 100%; overflow: hidden; line-height: 0; }
.wave-divider svg { display: block; width: calc(200% + 1.3px); height: 70px; }
@keyframes wave { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.wave-divider svg path { animation: wave 10s cubic-bezier(0.36,0.45,0.63,0.53) infinite; }

/* ===== Footer ===== */
.footer {
    background: var(--bg-card);
    border-top: 2px solid var(--border);
    margin-top: 60px;
    padding: 40px 20px 20px;
}
.footer-content {
    max-width: 1600px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 40px; margin-bottom: 30px;
}
.footer-section h3 {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    font-weight: 700;
}
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.spg-logo-footer { width: 60px; height: 35px; }
body.dark-mode .spg-logo-footer { filter: invert(1) hue-rotate(180deg) brightness(1.1); }
.footer-brand { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--text); }
.footer-tagline { color: var(--text-light); font-size: 0.9rem; line-height: 1.6; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-light); text-decoration: none; transition: var(--transition); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .wave-divider svg path { animation: none; }
}

/* ===== Responsive: Mobile Nav ===== */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed; left: -100%; top: 70px;
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%; text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        border-bottom: 1px solid var(--border);
    }
    .nav-menu.active { left: 0; }
    .footer-content { grid-template-columns: 1fr; gap: 30px; }
}
