/* ==========================================================================
   Dark Horse Photography - Global Stylesheet
   ========================================================================== */

:root {
    --bg-dark: #121212;
    --card-bg: #1c1d21;
    --accent-blue: #4a5d6e;
    --accent-glow: rgba(74, 93, 110, 0.25);
    --text-light: #f3f4f6;
    --text-subtle: #d1d5db;
    --text-muted: #9ca3af;
    --focus-ring: #ffffff;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Skip Link for Keyboard Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 10px;
    background: var(--accent-blue);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 10px;
    outline: 3px solid var(--focus-ring);
}

/* Visible Focus Rings across Interactive Elements */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--focus-ring) !important;
    outline-offset: 3px !important;
}

.navbar {
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(12px);
}

.navbar-brand .brand-sub {
    color: var(--text-muted) !important;
    opacity: 0.8;
}

.hero-section {
    position: relative;
    min-height: 92vh;
    padding-top: 120px;
    padding-bottom: 60px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 75% 50%, var(--accent-glow) 0%, rgba(18, 18, 18, 0) 55%);
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(18, 18, 18, 0), var(--bg-dark));
    pointer-events: none;
}

.lead-text {
    color: var(--text-subtle) !important;
    font-weight: 400;
    line-height: 1.6;
}

.portrait-carousel-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 30px var(--accent-glow);
    border: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 460px;
    margin: 0 auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.portrait-carousel-frame:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.95), 0 0 40px rgba(74, 93, 110, 0.35);
}

.portrait-carousel .carousel-item img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

@media (max-width: 576px) {
    .portrait-carousel .carousel-item img {
        height: 400px;
    }
}

.carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(18, 18, 18, 0.4) 0%, transparent 30%, transparent 85%, rgba(18, 18, 18, 0.25) 100%);
    pointer-events: none;
}

.btn-brand {
    background-color: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-brand:hover {
    background-color: #5c7285;
    color: #fff;
    box-shadow: 0 8px 20px rgba(74, 93, 110, 0.4);
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--accent-blue);
    color: var(--text-light);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--accent-blue);
    color: #fff;
}

/* Standard CSS Grid layout for gallery masonry */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.4s ease;
    width: 100%;
    height: 440px;
    object-fit: cover;
}

@media (max-width: 576px) {
    .gallery-item img {
        height: 320px;
    }
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-within .gallery-overlay {
    opacity: 1;
}

.feature-box {
    border-left: 3px solid var(--accent-blue);
    padding-left: 20px;
}

.bg-card { background-color: var(--card-bg); }
.bg-accent-blue { background-color: var(--accent-blue); }

/* Lightbox Image Container */
.lightbox-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    overflow: hidden;
}

.lightbox-img-wrapper img {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Hide gallery cards by default until category script runs */
.gallery-card {
    display: none;
}

/* Respect Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}