/*
Theme Name: Electric Visual
Theme URI: https://zonaeinsider.com
Author: Antigravity Agent
Author URI: https://zonaeinsider.com
Description: A high-impact, light-mode visual theme for ZONA E INSIDER.
Version: 1.6.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: electric-visual
*/

:root {
    --fe-primary: #47A947;
    /* Zona Green */

    --fe-accent: #ebfe86;
    /* Neon Yellow */
    --fe-dark: #0f172a;
    /* Dark Slate (Contrast) */
    --fe-bg: #ffffff;
    /* White Background */
    --fe-card-bg: #ffffff;
    /* White Card */
    --fe-text: #1e293b;
    /* Slate 900 Text */
    --fe-heading: #0f172a;
    /* Slate 900 Heading */
    --fe-border: #e2e8f0;
    /* Slate 200 Border */
    --font-main: 'Outfit',
        sans-serif;
    --font-serif: 'Merriweather',
        serif;
    --fe-radius: 0px;
    /* Squared UI */
}

body {
    background-color: var(--fe-bg);
    color: var(--fe-text);
    font-family: var(--font-serif);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-image: none;
}

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

a:hover {
    color: var(--fe-dark);
}

/* Header */
.site-header {
    font-family: var(--font-main);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--fe-heading);
    padding: 15px 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    box-shadow: none;
}

/* Homepage Transparent Header (The Race Style) */
.home .site-header,
.front-page .site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    box-sizing: border-box;
}

.home .site-branding a,
.home .site-branding .site-slogan,
.front-page .site-branding a,
.front-page .site-branding .site-slogan {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.home .main-navigation a,
.front-page .main-navigation a {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.home .main-navigation a:hover,
.front-page .main-navigation a:hover {
    color: var(--fe-accent);
}

.home .menu-toggle .icon-bar,
.front-page .menu-toggle .icon-bar {
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.site-branding {
    display: flex;
    flex-direction: row;
    /* Logo LEFT, text block RIGHT */
    align-items: center;
    gap: 14px;
    line-height: 1;
}

/* Logo + Site Name row */
.site-logo-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

/* Logo stretches to match the full height of the text block (name + slogan) */
.site-logo {
    height: 60px;
    /* ~= name line-height + slogan line-height */
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

/* Text block: name on top, slogan below */
.site-branding-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-name {
    color: var(--fe-heading);
    font-family: var(--font-main);
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1;
    display: block;
}

.site-name-accent {
    color: var(--fe-primary);
}

/* On the home page, logo and name are white */
.home .site-logo-link .site-name,
.front-page .site-logo-link .site-name {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .site-logo {
        height: 44px;
    }

    .site-name {
        font-size: 1.8rem;
    }
}

.site-slogan {
    font-size: 1rem;
    color: var(--fe-heading);
    opacity: 0.8;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-top: 3px;
    text-transform: uppercase;
}

/* Home page: slogan also white */
.home .site-logo-link .site-slogan,
.front-page .site-logo-link .site-slogan {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.site-branding a {
    color: var(--fe-heading);
    text-decoration: none;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: #64748b;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.main-navigation a:hover,
.main-navigation .current-menu-item>a {
    color: var(--fe-primary);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--fe-heading);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        border-bottom: 1px solid var(--fe-border);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .main-navigation.toggled ul {
        display: flex;
    }

    .main-navigation.toggled .menu-toggle .icon-bar:nth-child(2) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .main-navigation.toggled .menu-toggle .icon-bar:nth-child(3) {
        opacity: 0;
    }

    .main-navigation.toggled .menu-toggle .icon-bar:nth-child(4) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

/* Footer */
.site-footer {
    background: #fff;
    padding: 40px;
    text-align: center;
    border-top: 1px solid var(--fe-border);
    margin-top: 60px;
    font-size: 0.9rem;
    color: #64748b;
}

/* Front Page Layout */
.front-page-container {
    width: 100%;
}



/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    /* FULL SCREEN HERO */
    display: flex;
    align-items: flex-end;
    /* Text at bottom */
    background: #0f172a;
    overflow: hidden;
    border-bottom: none;
    /* Remove border for seamless look */
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.8;
    /* Slight dim for text readability */
}

/* Gradient overlay for text readability */
.hero-background::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    z-index: 2;
}

.hero-content {
    position: relative;
    width: 100%;
    /* NO MAX-WIDTH FOR FULL SCREEN */
    margin: 0;
    z-index: 3;
    padding: 60px 40px;
    background: transparent;
    border: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-title {
    font-family: var(--font-main);
    font-size: 5rem;
    /* MASSIVE TITLE */
    font-weight: 800;
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: -2px;
    color: #ffffff;
    /* White text on dark bg */
    text-transform: uppercase !important;
    /* NO MAX-WIDTH */
}

.hero-title .highlight {
    color: var(--fe-primary);
    /* Green highlight */
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--fe-accent);
    /* Neon Yellow for pop */
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 10px;
    font-weight: 800;
    display: block;
}

.hero-description {
    font-size: 1.5rem;
    color: #e2e8f0;
    margin-bottom: 40px;
    /* NO MAX-WIDTH */
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: var(--fe-radius);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--fe-heading);
    color: #fff;
    border: 2px solid var(--fe-heading);
    box-shadow: 4px 4px 0px 0px var(--fe-primary);
}

.btn-primary:hover {
    background-color: var(--fe-primary);
    border-color: var(--fe-primary);
    color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px 0px var(--fe-heading);
}

.btn-outline {
    background-color: transparent;
    color: var(--fe-heading);
    border: 2px solid var(--fe-heading);
}

.btn-outline:hover {
    background-color: var(--fe-heading);
    color: #fff;
}

/* Big Grid Layouts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    /* WIDER CARDS */
    gap: 40px;
}

.post-image {
    aspect-ratio: 16/9;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: #fff;
    border-bottom: 1px solid var(--fe-border);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--fe-card-bg);
    padding: 40px;
    border-radius: var(--fe-radius);
    border: 1px solid var(--fe-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--fe-primary);
}

.feature-card h3 {
    color: var(--fe-heading);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--fe-text);
    font-size: 1rem;
    line-height: 1.6;
}

/* Latest Updates Section */
.latest-section {
    padding: 5px 0 30px 0;
    background-color: var(--fe-bg);
}

.section-title {
    font-family: var(--font-main);
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--fe-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background: var(--fe-card-bg);
    border-radius: var(--fe-radius);
    overflow: hidden;
    border: 1px solid var(--fe-border);
    /* Subtle border for structure */
    transition: all 0.3s ease;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    border-color: var(--fe-heading);
    transform: translateY(-5px);
    box-shadow: 10px 10px 0px 0px rgba(15, 23, 42, 0.05);
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-image {
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-date {
    font-size: 0.85rem;
    color: var(--fe-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
}

.post-title {
    font-family: var(--font-main);
    font-size: 1.6rem;
    margin-bottom: 15px;
    line-height: 1.2;
    color: var(--fe-heading);
    font-weight: 700;
    text-transform: uppercase !important;
}

.post-title a {
    color: var(--fe-heading);
    text-decoration: none;
    text-transform: uppercase !important;
}

.post-title a:hover {
    color: var(--fe-primary);
}

.post-excerpt {
    color: var(--fe-text);
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.read-more {
    font-family: var(--font-main);
    color: var(--fe-heading);
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: auto;
    display: inline-block;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.read-more:hover {
    border-bottom-color: var(--fe-primary);
}

/* General Page Content */
.site-main {
    padding: 60px 0;
    max-width: 95%;
    /* WIDE CONTENT for inner pages */
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}



.site-content-full {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: block;
}

/* NUCLEAR FULL WIDTH OVERRIDE - Force everything to be full width on front page */
.home,
.front-page {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.home *,
.front-page * {
    box-sizing: border-box !important;
}

.home .site-content-full,
.front-page .site-content-full,
.home .front-page-container,
.front-page .front-page-container,
.home .hero-section,
.front-page .hero-section,
.home section,
.front-page section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.home .hero-content,
.front-page .hero-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
}


/* Table Styles - Visual */
.wp-block-table {
    margin-bottom: 2rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--fe-card-bg);
    border: 2px solid var(--fe-heading);
    box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 0.05);
    border-radius: var(--fe-radius);
    overflow: hidden;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--fe-border);
}

th {
    font-family: var(--font-main);
    background-color: var(--fe-heading);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

td {
    color: var(--fe-text);
    font-size: 1rem;
    font-weight: 500;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: rgba(0, 210, 190, 0.05);
}

/* Striped Tables */
.is-style-stripes tbody tr:nth-child(odd) {
    background-color: #f8fafc;
}

/* Responsive: Tablet & Mobile */
@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-content {
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 2px solid var(--fe-heading);
        padding: 30px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .hero-section {
        height: 60vh;
    }

    .hero-background {
        width: 100%;
        height: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .site-branding {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Race Grid (2-Column Horizontal) */
.race-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.race-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--fe-border);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 120px;
}

.race-card:hover {
    border-color: var(--fe-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.race-card .post-image {
    width: 35%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.race-card .post-image img {
    height: 100% !important;
    width: 100%;
    object-fit: cover;
    display: block;
}

.race-card .post-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 65%;
}

.race-card .post-title {
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 700;
    margin: 0;
}

.race-card .post-date {
    font-size: 0.75rem;
    margin-bottom: 5px;
    color: var(--fe-primary);
    font-weight: 600;
    text-transform: uppercase;
}

.race-card .post-excerpt {
    display: none;
}

@media (max-width: 600px) {
    .race-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   Contact Page Styles
   ========================================= */

.contact-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    min-height: 70vh;
}

.contact-header {
    text-align: center;
    margin-bottom: 50px;
}

.contact-header h1 {
    font-size: 3.5rem;
    color: var(--fe-heading);
    margin-bottom: 15px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.contact-header .subtitle {
    color: var(--fe-primary);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 1.1rem;
    font-weight: 800;
}

.contact-intro {
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.2rem;
    color: var(--fe-text);
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form-card {
    background: #fff;
    border: 2px solid var(--fe-heading);
    padding: 50px;
    border-radius: 0;
    /* Squared */
    box-shadow: 8px 8px 0px 0px rgba(0, 0, 0, 0.05);
    /* Hard shadow */
}

.fe-contact-form .form-group {
    margin-bottom: 30px;
}

.fe-contact-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    /* Bolder */
    color: var(--fe-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fe-contact-form label .required {
    color: var(--fe-primary);
}

.fe-contact-form input[type="text"],
.fe-contact-form input[type="email"],
.fe-contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--fe-border);
    border-radius: 0;
    /* Squared */
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--fe-heading);
    transition: all 0.2s ease;
    background: #f8fafc;
    font-weight: 500;
}

.fe-contact-form input:focus,
.fe-contact-form textarea:focus {
    outline: none;
    border-color: var(--fe-primary);
    background: #fff;
    box-shadow: 4px 4px 0px 0px rgba(0, 210, 190, 0.1);
}

.fe-contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.form-actions {
    margin-top: 40px;
    text-align: center;
}

.submit-btn {
    background: var(--fe-heading);
    color: #fff;
    border: 2px solid var(--fe-heading);
    padding: 18px 50px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0;
    /* Squared */
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 6px 6px 0px 0px var(--fe-primary);
    display: inline-block;
}

.submit-btn:hover {
    background: var(--fe-primary);
    border-color: var(--fe-primary);
    color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px 0px var(--fe-heading);
}

/* Alerts */
.contact-alert {
    padding: 20px;
    border-radius: 0;
    margin-bottom: 40px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #166534;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #991b1b;
}

/* Responsive */
@media (max-width: 600px) {
    .contact-form-card {
        padding: 30px 20px;
    }

    .contact-header h1 {
        font-size: 2.5rem;
    }

    .submit-btn {
        width: 100%;
    }
}

/* Security */
.fe-honey {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* =====================================================
   GALLERY FIX — Gutenberg Nested Gallery (columns-default)
   The post uses wp:gallery with has-nested-images which
   WordPress renders as a CSS grid. Override to single column.
   ===================================================== */

/* 1. Force the outer gallery wrapper to single-column flex */
.wp-block-gallery.has-nested-images {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 40px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 2. Each nested figure takes full width, no cropping */
.wp-block-gallery.has-nested-images figure.wp-block-image {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 3. Images fill their container, no forced aspect ratio */
.wp-block-gallery.has-nested-images figure.wp-block-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: unset !important;
    object-fit: unset !important;
    display: block !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* 4. Captions sit below the image, no overlay */
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption,
.wp-block-gallery.has-nested-images figure.wp-block-image .wp-element-caption {
    position: static !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    padding: 12px 10px !important;
    color: var(--fe-text) !important;
    background: transparent !important;
    background-image: none !important;
    text-shadow: none !important;
    border-bottom: 2px solid var(--fe-primary) !important;
    box-sizing: border-box !important;
    transform: none !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
}

/* 5. Force Full Width for Single Post layout */
.single .site-main {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single .container {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.single .entry-content {
    width: 100% !important;
    max-width: 100% !important;
}