/*
Theme Name: tbphotos
Theme URI: https://example.com/tbphotos
Author: tbphotos
Description: A portfolio theme for photographers with built-in galleries, lightbox navigation, and light/dark color modes.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: tbphotos
*/

:root {
    --tb-ink: #17211f;
    --tb-muted: #60706b;
    --tb-paper: #f5f6f1;
    --tb-surface: #ffffff;
    --tb-line: #d7ded8;
    --tb-accent: #d46545;
    --tb-accent-deep: #9e392b;
    --tb-display: "Fraunces", Georgia, serif;
    --tb-body: "DM Sans", Arial, sans-serif;
    --tb-radius: 4px;
}

html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    color: var(--tb-ink);
    background: var(--tb-paper);
    font-family: var(--tb-body);
    line-height: 1.6;
}
body.tb-dark {
    --tb-ink: #f3f1e8;
    --tb-muted: #b4c1ba;
    --tb-paper: #17211f;
    --tb-surface: #22302c;
    --tb-line: #40504a;
    --tb-accent: #f28b62;
    --tb-accent-deep: #ffc0a2;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

a {
    color: var(--tb-accent-deep);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.tb-container {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

.tb-skip-link {
    position: absolute;
    left: -9999px;
}

.tb-skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 100;
    padding: 10px 14px;
    color: #fff;
    background: var(--tb-accent-deep);
}

.tb-header {
    border-bottom: 1px solid var(--tb-line);
    background: var(--tb-paper);
}

.tb-header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 84px;
    gap: 24px;
}

.tb-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    margin: 0;
    color: var(--tb-ink);
    text-decoration: none;
    font-family: var(--tb-display);
    font-size: 1.35rem;
    font-weight: 700;
}

.tb-brand .custom-logo-link {
    display: block;
    margin: 0;
}

.tb-brand .custom-logo {
    width: auto;
    height: auto;
    max-width: min(220px, 30vw);
    max-height: 72px;
    object-fit: contain;
    border-radius: 0;
}

.tb-brand .tb-site-icon {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
}

.tb-header-inner nav {
    margin-left: auto;
}

.tb-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tb-menu a {
    color: var(--tb-ink);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tb-menu a:hover,
.tb-menu .current-menu-item a {
    color: var(--tb-accent-deep);
}

.tb-mode-toggle {
    border: 1px solid var(--tb-line);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--tb-ink);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: .8rem;
}

.tb-mode-toggle:hover {
    border-color: var(--tb-accent);
}

.tb-hero {
    position: relative;
    min-height: min(690px, calc(100vh - 84px));
    overflow: hidden;
    color: #fff;
    background: #283b35;
}

.tb-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .7s ease;
}

.tb-hero-slide.is-active {
    opacity: 1;
}

.tb-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tb-hero-slide::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 22, 19, .7), rgba(12, 22, 19, .08));
    content: "";
}

.tb-hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    min-height: min(690px, calc(100vh - 84px));
    padding-block: 90px;
}

.tb-kicker {
    margin: 0 0 14px;
    color: var(--tb-accent);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    font-family: var(--tb-display);
    line-height: 1.05;
}

.tb-hero h1 {
    max-width: 680px;
    margin: 0;
    font-size: clamp(3.8rem, 9vw, 8rem);
    letter-spacing: 0;
}

.tb-hero p {
    max-width: 480px;
    margin: 24px 0 0;
    font-size: 1.1rem;
}

.tb-slider-controls {
    position: absolute;
    z-index: 2;
    right: 28px;
    bottom: 28px;
    display: flex;
    gap: 8px;
}

.tb-icon-button {
    width: 44px;
    height: 44px;
    border: 1px solid currentColor;
    border-radius: 50%;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
}

.tb-section {
    padding-block: 100px;
}

.tb-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 38px;
}

.tb-section-heading h2 {
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.tb-section-heading p {
    max-width: 360px;
    margin: 0;
    color: var(--tb-muted);
}

.tb-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.tb-category-card {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    color: #fff;
    background: #344842;
    cursor: pointer;
}

.tb-category-card img {
    width: 100%;
    height: 100%;
    min-height: 390px;
    object-fit: cover;
    transition: transform .6s ease;
}

.tb-category-card::after {
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(transparent, rgba(8, 18, 15, .85));
    content: "";
}

.tb-category-card:hover img {
    transform: scale(1.05);
}

.tb-category-card h3 {
    position: absolute;
    z-index: 1;
    right: 22px;
    bottom: 18px;
    left: 22px;
    margin: 0;
    font-size: 2rem;
}

.tb-content {
    padding-block: 76px;
}

.tb-content h1 {
    font-size: clamp(3rem, 6vw, 6rem);
}

.tb-content-inner {
    max-width: 780px;
}

.tb-footer {
    padding-block: 44px;
    border-top: 1px solid var(--tb-line);
}

.tb-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--tb-muted);
    font-size: .9rem;
}

.tb-lightbox {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 42px;
    background: rgba(9, 15, 13, .94);
}

.tb-lightbox.is-open {
    display: flex;
}

.tb-lightbox figure {
    max-width: min(1100px, 90vw);
    max-height: 90vh;
    margin: 0;
}

.tb-lightbox img {
    max-height: 78vh;
    width: auto;
    margin: auto;
    object-fit: contain;
}

.tb-lightbox figcaption {
    padding-top: 12px;
    color: #fff;
    text-align: center;
}

.tb-lightbox .tb-icon-button {
    position: absolute;
    color: #fff;
}

.tb-lightbox-close {
    top: 18px;
    right: 22px;
}

.tb-lightbox-prev {
    left: 22px;
}

.tb-lightbox-next {
    right: 22px;
}

.tb-page-builder-content:empty {
    display: none;
}

.widget-area {
    padding-block: 24px;
}
@media (max-width: 800px) {
    .tb-container {
            width: min(100% - 32px, 600px);
        }
    
        .tb-header-inner,
        .tb-footer-inner {
            align-items: flex-start;
            flex-direction: column;
            padding-block: 18px;
        }
    
        .tb-header-inner nav {
            margin-left: 0;
        }
    
        .tb-menu {
            flex-wrap: wrap;
            gap: 12px 18px;
        }
    
        .tb-category-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    
        .tb-category-card,
        .tb-category-card img {
            min-height: 280px;
        }
    
        .tb-section {
            padding-block: 66px;
        }
    
        .tb-section-heading {
            align-items: flex-start;
            flex-direction: column;
        }
    }
    
    @media (max-width: 460px) {
        .tb-category-grid {
            grid-template-columns: 1fr;
        }
    
        .tb-category-card,
        .tb-category-card img {
            min-height: 360px;
        }
}