/* ============================================================
   Lazza Theme – main.css
   ============================================================ */

/* ------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------ */
:root {
    --primary:       #235787;
    --primary-dark:  #1a3f63;
    --accent:        #dd9933;
    --accent-dark:   #c4881e;
    --dark:          #111827;
    --dark-2:        #1e2a3a;
    --dark-3:        #2d3f52;
    --bg:            #f4f6f9;
    --bg-white:      #ffffff;
    --text:          #1f2937;
    --text-light:    #4b5563;
    --text-muted:    #9ca3af;
    --border:        #e5e7eb;
    --shadow-sm:     0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow:        0 2px 10px rgba(0, 0, 0, 0.10);
    --shadow-md:     0 4px 20px rgba(0, 0, 0, 0.14);
    --shadow-lg:     0 8px 36px rgba(0, 0, 0, 0.18);
    --radius-sm:     4px;
    --radius:        8px;
    --radius-lg:     14px;
}

/* ------------------------------------------------------------
   Reset & Base
   ------------------------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover { color: var(--accent); }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    color: var(--dark);
}

ul { list-style: none; }

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-main {
    flex: 1;
    padding: 2.5rem 0 4rem;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.site-header {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Branding */
.site-branding {
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 3px;
}

a.site-title {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

a.site-title:hover { color: #ffffff; }

a.site-title span {
    color: var(--accent);
}

.site-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-project {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #fff;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(221, 153, 51, 0.4);
}

.btn-project:hover {
    background: var(--accent-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(221, 153, 51, 0.5);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 7px 8px;
    transition: border-color 0.2s;
}

.menu-toggle:hover { border-color: rgba(255, 255, 255, 0.5); }

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------
   Navigation
   ------------------------------------------------------------ */
.nav-bar {
    background: var(--dark-2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-bar .container {
    display: flex;
}

/* primary-nav IS the <ul> (menu_class targets the ul directly) */
.primary-nav {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
}

.primary-nav > li {
    position: relative;
}

.primary-nav > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.8rem 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.83rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

.primary-nav > li > a:hover,
.primary-nav > li.current-menu-item > a,
.primary-nav > li.current-menu-ancestor > a,
.primary-nav > li.current-menu-parent > a {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* Dropdown arrow indicator */
.primary-nav > li.menu-item-has-children > a::after {
    content: '▾';
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 2px;
}

/* All dropdown levels – hide by default */
.primary-nav li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark-3);
    min-width: 210px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    padding: 0.4rem 0;
    border-top: 2px solid var(--accent);
}

.primary-nav li:hover > ul,
.primary-nav li:focus-within > ul {
    display: block;
}

.primary-nav li ul li a {
    display: block;
    padding: 0.45rem 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.825rem;
    transition: color 0.15s, background 0.15s, padding-left 0.15s;
}

.primary-nav li ul li a:hover,
.primary-nav li ul li.current-menu-item a {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    padding-left: 1.4rem;
}

/* Third level */
.primary-nav li ul li ul {
    top: 0;
    left: 100%;
    border-radius: var(--radius);
    border-top: none;
    border-left: 2px solid var(--accent);
}

/* ------------------------------------------------------------
   Hero Slider (homepage)
   ------------------------------------------------------------ */
.hero-slider {
    background: var(--dark);
    overflow: hidden;
    line-height: 0;
}

/* MetaSlider / Flexslider overrides */
.hero-slider .metaslider { margin: 0 !important; }
.hero-slider .metaslider .flexslider {
    margin: 0;
    border: none;
    border-radius: 0;
    background: var(--dark);
}

.hero-slider .metaslider img {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
    object-position: center;
}

.hero-slider .flex-control-nav { bottom: 12px; }
.hero-slider .flex-direction-nav a { opacity: 0.7; }
.hero-slider .flex-direction-nav a:hover { opacity: 1; }

/* ------------------------------------------------------------
   Homepage
   ------------------------------------------------------------ */
.home-intro {
    text-align: center;
    padding: 3rem 0 1rem;
}

.home-intro h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.home-intro p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 620px;
    margin: 0 auto;
}

/* Project cards */
.project-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem 0 1rem;
}

a.project-card {
    display: block;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    color: var(--text);
}

a.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.project-card-image {
    height: 240px;
    overflow: hidden;
    background: var(--dark-2);
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

a.project-card:hover .project-card-image img {
    transform: scale(1.06);
}

.project-card-placeholder {
    width: 100%;
    height: 100%;
}

.hovercraft-bg {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--dark-3) 100%);
}

.trike-bg {
    background: linear-gradient(135deg, #3a1f00 0%, #6b3d10 50%, var(--dark-3) 100%);
}

.project-card-body {
    padding: 1.5rem 1.75rem;
}

.project-card-body h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.project-card-body p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: #fff;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.55rem 1.3rem;
    border-radius: var(--radius);
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.02em;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

/* ------------------------------------------------------------
   Hovercraft Specs Section
   ------------------------------------------------------------ */
.specs-section {
    margin: 3rem 0 2rem;
    padding: 2rem 2.5rem;
    background: var(--dark);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.specs-heading {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(221, 153, 51, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.spec-item {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.spec-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.spec-label {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 110px;
}

.spec-value {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

/* ------------------------------------------------------------
   Video Cards
   ------------------------------------------------------------ */
.video-card {
    display: flex;
    align-items: flex-start;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

.video-embed {
    position: relative;
    flex: 0 0 50%;
    padding-bottom: 28.125%; /* 56.25% of 50% width = 16:9 */
    height: 0;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-desc {
    flex: 1;
    padding: 1.25rem 1.5rem;
    align-self: center;
}

.video-desc p { margin-bottom: 0.6rem; }
.video-desc p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
    .video-card { flex-direction: column; }
    .video-embed { flex: none; width: 100%; padding-bottom: 56.25%; }
}

/* ------------------------------------------------------------
   Build Page (single post)
   ------------------------------------------------------------ */
.build-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--border);
}

.post-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.post-meta span {
    display: inline-block;
    margin-right: 1rem;
}

.post-meta a {
    color: var(--text-muted);
}

.post-meta a:hover {
    color: var(--accent);
}

/* Entry Content */
.entry-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

.entry-content p {
    margin-bottom: 1.2rem;
}

.entry-content h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
.entry-content h3 { font-size: 1.2rem; margin: 1.75rem 0 0.75rem; }

.entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content a:hover { color: var(--accent); }

/* Suppress Elementor wrappers inside content */
.entry-content .elementor-section,
.entry-content .elementor-container,
.entry-content .elementor-row,
.entry-content .elementor-column,
.entry-content .elementor-widget-wrap,
.entry-content .elementor-widget-container {
    display: contents;
}

/* Photo grid – injected by JS */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1.75rem 0;
}

figure.photo-card {
    margin: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.25s;
}

figure.photo-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

figure.photo-card a {
    display: block;
    overflow: hidden;
    line-height: 0;
    flex-shrink: 0;
}

figure.photo-card a img,
figure.photo-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

figure.photo-card:hover a img,
figure.photo-card:hover img {
    transform: scale(1.07);
}

/* Hover hint */
.hover-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--accent);
    color: #1a1a1a;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.55rem 1.25rem;
    border-radius: 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 3px 12px rgba(221, 153, 51, 0.4);
    user-select: none;
}

.hover-hint::before {
    content: '☝';
    font-size: 1.1rem;
}

/* Caption expands below photo on hover — no cap so all text always shows */
figure.photo-card figcaption {
    max-height: 0;
    overflow: hidden;
    background: var(--dark-2);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    line-height: 1.65;
    border-top: 3px solid var(--accent);
    padding: 0 1.1rem;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                padding   0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

figure.photo-card:hover figcaption {
    max-height: 1000px;
    padding: 1rem 1.1rem;
}

/* FileBird gallery */
.filebird-block-filebird-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.75rem 0;
    padding: 0;
}

.filebird-block-filebird-gallery li {
    margin: 0;
}

.filebird-block-filebird-gallery figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.filebird-block-filebird-gallery figure img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.filebird-block-filebird-gallery figcaption {
    padding: 0.9rem 1.1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    background: var(--dark-2);
    border-top: 3px solid var(--accent);
}

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.post-navigation a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-white);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    max-width: 47%;
    transition: box-shadow 0.2s, transform 0.15s, color 0.2s;
    border: 1px solid var(--border);
}

.post-navigation a:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--primary);
    border-color: var(--primary);
}

.post-navigation .nav-next { margin-left: auto; }

.nav-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 2px;
}

.nav-arrow {
    font-size: 1.2rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* ------------------------------------------------------------
   Standard Page
   ------------------------------------------------------------ */
.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--border);
}

.page-header h1 {
    font-size: 2rem;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
    background: var(--dark);
    padding: 1.75rem 1.5rem;
    text-align: center;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-footer p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.65);
}

.site-footer a:hover {
    color: var(--accent);
}

.footer-credit {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.3) !important;
}

/* ------------------------------------------------------------
   Lightbox
   ------------------------------------------------------------ */
#lazza-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#lazza-lightbox.open {
    display: flex;
}

.lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

.lb-content {
    position: relative;
    z-index: 1;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    border-radius: var(--radius);
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.8);
}

.lb-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
    transition: color 0.2s;
}

.lb-close:hover {
    color: var(--accent);
}

/* ------------------------------------------------------------
   Accessibility
   ------------------------------------------------------------ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ------------------------------------------------------------
   Responsive – Tablet (max 900px)
   ------------------------------------------------------------ */
@media (max-width: 900px) {
    .home-intro h1 { font-size: 1.9rem; }
    .project-cards { gap: 1.25rem; }
    .photo-grid { gap: 1rem; }
    .specs-grid { grid-template-columns: 1fr; }
    .spec-item:nth-last-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,0.07); }
    .spec-item:last-child { border-bottom: none; }
}

/* ------------------------------------------------------------
   Responsive – Mobile (max 768px)
   ------------------------------------------------------------ */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .nav-bar {
        display: none;
        border-top: none;
    }

    .nav-bar.open {
        display: block;
    }

    .nav-bar .container { padding: 0; }

    /* Stack nav items vertically */
    .primary-nav {
        flex-direction: column;
    }

    .primary-nav > li > a {
        padding: 0.85rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        justify-content: space-between;
    }

    /* Mobile dropdown: static, shown by .open class */
    .primary-nav li ul {
        position: static;
        display: none;
        border-radius: 0;
        box-shadow: none;
        border-top: none;
        border-left: 3px solid var(--accent);
        background: rgba(0, 0, 0, 0.25);
    }

    .primary-nav li.open > ul { display: block; }

    .primary-nav li ul li a {
        padding-left: 2rem;
    }

    .primary-nav li ul li a:hover {
        padding-left: 2.3rem;
    }

    /* Layout */
    .project-cards { grid-template-columns: 1fr; }
    .filebird-block-filebird-gallery { grid-template-columns: repeat(2, 1fr); }


    .post-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }

    .post-navigation a { max-width: 100%; }

    .home-intro h1 { font-size: 1.6rem; }
    .post-header h1 { font-size: 1.5rem; }

    .header-bar { padding: 0.75rem 1rem; }
    a.site-title { font-size: 1.1rem; }
}

/* ------------------------------------------------------------
   Responsive – Small mobile (max 480px)
   ------------------------------------------------------------ */
@media (max-width: 480px) {
    .btn-project { display: none; }
    .site-tagline { display: none; }
    a.site-title { font-size: 1rem; }

    .filebird-block-filebird-gallery { grid-template-columns: 1fr; }

    figure.photo-card a img {
        height: 200px;
    }
}
