/*
Theme Name: Swift Surveillance Pro
Theme URI: https://randalls-place.com
Author: Randall Caudill
Description: One-page surveillance theme with full-height hero, video or image background, sticky header, gallery, smooth scrolling, dark/light mode, and separate logos configurable in the Customizer.
Version: 2.5
Text Domain: swift-surveillance-pro
*/

:root {
    --bg: #0b0f14;
    --bg-alt: #07101a;
    --text: #e6eef6;
    --muted: #b6dff0;
    --accent: #1ac2ff;
    --border-subtle: rgba(26,194,255,0.12);
}

body.light-mode {
    --bg: #f5fbff;
    --bg-alt: #ffffff;
    --text: #0b1720;
    --muted: #445566;
    --accent: #007acc;
    --border-subtle: rgba(0,122,204,0.18);
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header / Nav */
header.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(8,10,14,0.85);
    backdrop-filter: blur(6px);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}
body.light-mode header.site-header {
    background: rgba(245,251,255,0.92);
}

header .logo-wrap {
    display: flex;
    align-items: center;
}

/* dual logos */
.logo {
    width: 250px;
    height: auto;
}
.logo-lightmode { /* used in light mode (dark text logo) */
    display: none;
}
.logo-darkmode { /* used in dark mode (white logo) */
    display: inline-block;
}
body.light-mode .logo-darkmode {
    display: none;
}
body.light-mode .logo-lightmode {
    display: inline-block;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

nav/* Dark/light toggle */
.theme-toggle {
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    background: transparent;
    color: inherit;
}

/* Hero */
.hero {
    position: relative;
    height: 100vh;        /* full viewport height */
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
}
body.light-mode .hero {
    color: #ffffff;
}

.hero video,
.hero .hero-poster {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.45) saturate(0.9);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(26,194,255,0.35), transparent 55%);
    mix-blend-mode: screen;
    z-index: 1;
    pointer-events: none;
}
.hero .hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    padding: 20px;
}
.hero h1 {
    font-size: 3rem;
    margin: 0 0 12px;
    letter-spacing: -0.04em;
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s ease forwards;
}
.hero p.lead {
    font-size: 1.1rem;
    margin: 0 0 18px;
    opacity: 0;
    transform: translateY(10px);
    animation: heroFadeUp 0.8s ease 0.1s forwards;
}

@keyframes heroFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #07101a;
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    filter: brightness(1.05);
    text-decoration: none;
}

/* Layout & sections */
main section {
    padding: 72px 20px;
    max-width: 1100px;
    margin: 0 auto;
}
h2 {
    font-size: 1.4rem;
    margin-bottom: 18px;
    color: #dff6ff;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    display: inline-block;
}
body.light-mode h2 {
    color: #00314f;
}
.section-intro {
    max-width: 700px;
    margin-bottom: 24px;
    font-size: 0.98rem;
    opacity: 0.9;
}

/* Services */
.services {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.card {
    background: var(--bg-alt);
    padding: 18px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    flex: 1 1 calc(33% - 20px);
    min-width: 230px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.card.revealed {
    opacity: 1;
    transform: translateY(0);
}
.card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 14px;
    margin-top: 16px;
}
.gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    border: 1px solid rgba(26,194,255,0.15);
}

/* Contact */
#contact p {
    margin: 6px 0;
}
.contact-form-wrap {
    margin-top: 16px;
}

/* Footer */
footer {
    padding: 36px 20px;
    text-align: center;
    opacity: 0.9;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 40px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
}
.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}
.close-lightbox {
    position: absolute;
    top: 18px;
    right: 24px;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
}

/* Page template basic */
.page-container {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px 40px;
}
.page-container h1 {
    font-size: 2rem;
    margin-bottom: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.1rem; }
    header.site-header { padding: 8px 12px; }
    nav.main-nav a { margin-left: 10px; font-size: 0.85rem; }
    .nav-right { gap: 10px; }
}

/* Mobile logo scaling */
@media (max-width: 600px){.logo{width:150px;height:auto;}}


/* Ensure hero is truly full-width and edge-to-edge */
.hero {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

/* Remove the global max-width constraint ONLY for hero */
main > .hero {
    max-width: none;
}


/* Fixed-height hero (Option 2) */
.hero {
    height: 550px !important;
    min-height: 550px !important;
    max-height: 550px !important;
}


/* Refined Services & Gallery layout (inspired by screenshot) */

/* Section titles centered */
#services, #gallery {
    text-align: center;
}
#services .section-intro,
#gallery .section-intro {
    margin-left: auto;
    margin-right: auto;
}

/* Services row: icons + text */
.services {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 32px;
}
.service-item {
    background: var(--bg-alt);
    padding: 24px 18px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    flex: 0 1 260px;
    text-align: center;
    box-shadow: 0 14px 35px rgba(0,0,0,0.22);
}
body.light-mode .service-item {
    background: #ffffff;
}
.service-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 10px;
}
.service-item h3 {
    margin-top: 6px;
    margin-bottom: 8px;
    font-size: 1.05rem;
}
.service-item p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Gallery grid similar to screenshot */
.gallery-wrapper {
    margin-top: 30px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 12px;
}
.gallery-grid img {
    width: 100%;
    border-radius: 10px;
    height: 170px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid rgba(26,194,255,0.1);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

/* On small screens stack services nicely */
@media (max-width: 768px) {
    .services {
        gap: 18px;
    }
    .service-item {
        flex: 1 1 100%;
    }
}


/* About section layouts */
.about-section {
    max-width: 1100px;
    margin: 0 auto;
}

.about-two-col .about-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    gap: 32px;
    align-items: center;
}

.about-two-col .about-media img {
    width: 100%;
    border-radius: 16px;
    display: block;
    object-fit: cover;
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.about-two-col .about-content h2 {
    margin-top: 0;
}

@media (max-width: 768px) {
    .about-two-col .about-inner {
        grid-template-columns: 1fr;
    }
}


/* === Primary navigation (WP menu) === */
.main-nav .primary-menu {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .primary-menu > li {
    display: flex;
    align-items: center;
}

/* Keep link styling consistent for both fallback and WP menu links */
.main-nav .primary-menu > li > a,
.main-nav a {
    margin-left: 4px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}
body.light-mode nav.main-nav .primary-menu > li > a,
body.light-mode nav.main-nav a {
    color: #0b1720;
}

/* Hamburger toggle button */
.menu-toggle {
    display: none;
    margin-left: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 6px 10px;
    background: transparent;
    cursor: pointer;
}
.menu-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    +margin-bottom: 3px;
}
.menu-toggle-bar + .menu-toggle-bar {
    margin-top: 3px;
}

/* Mobile layout */
@media (max-width: 768px) {
    .menu-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        right: 16px;
        background: rgba(8,10,14,0.96);
        padding: 12px 16px;
        border-radius: 16px;
        box-shadow: 0 16px 40px rgba(0,0,0,0.45);
        display: none;
        flex-direction: column;
        min-width: 200px;
    }
    body.light-mode .main-nav {
        background: rgba(245,251,255,0.98);
    }

    .main-nav .primary-menu {
        flex-direction: column;
        gap: 0.75rem;
    }

    body.nav-open .main-nav {
        display: flex;
    }
}

/* Desktop keeps existing header layout */
@media (min-width: 769px) {
    .main-nav {
        margin-left: 24px;
    }
}


/* Hamburger icon color respects dark/light mode */
.site-header .menu-toggle {
    color: #ffffff;
}

body.light-mode .site-header .menu-toggle {
    color: #0b1720;
}


/* Lightbox navigation buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lightbox-prev {
    left: 30px;
}
.lightbox-next {
    right: 30px;
}
.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.85);
}
.lightbox-nav:focus-visible,
.close-lightbox:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Lightbox caption + counter */
.lightbox-inner {
    position: relative;
    max-width: min(90vw, 1100px);
    width: 100%;
}

.lightbox-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    padding: 6px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.lightbox-caption {
    max-width: 70%;
    text-align: left;
    pointer-events: auto;
}

.lightbox-counter {
    font-weight: 600;
    opacity: 0.85;
    text-align: right;
}
