/*
Theme Name: Our House Racing
Theme URI: https://ourhouseracing.com
Description: Professional dark motorsports theme for Our House Racing - Kyle Bushouse's drag racing team. Features a modern dark design with lime green and purple accents inspired by the 2000 Pontiac Trans Am "Mistress" and 1970 Chevy Nova.
Author: Our House Racing
Author URI: https://ourhouseracing.com
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ourhouseracing
Tags: dark, motorsports, racing, one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, wide-blocks
*/

/* Our House Racing - Custom Styles */

/* Racing-inspired animations */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px var(--wp--preset--color--accent-1); }
    50% { box-shadow: 0 0 20px var(--wp--preset--color--accent-1), 0 0 30px var(--wp--preset--color--accent-1); }
}

@keyframes speedLine {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* Global dark theme enhancements */
body {
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast);
}

/* Racing stripe accents on headers */
.wp-block-heading::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 0.9em;
    background: linear-gradient(180deg, var(--wp--preset--color--accent-1) 0%, var(--wp--preset--color--accent-2) 100%);
    margin-right: 12px;
    vertical-align: middle;
}

/* Button hover effects with racing glow */
.wp-block-button__link:hover {
    box-shadow: 0 0 15px var(--wp--preset--color--accent-1);
    transition: all 0.3s ease;
}

/* Card/block hover effects */
.wp-block-group:hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image overlay effects for gallery */
.wp-block-image:hover img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.wp-block-image img {
    transition: transform 0.3s ease;
}

/* Navigation enhancements */
.wp-block-navigation a:hover {
    color: var(--wp--preset--color--accent-1) !important;
    text-shadow: 0 0 10px var(--wp--preset--color--accent-1);
}

/* Current/active page indicator in navigation */
.wp-block-navigation-item.current-menu-item > a,
.wp-block-navigation-item.current_page_item > a,
.wp-block-navigation-item.current-menu-ancestor > a,
.wp-block-navigation-link.current-menu-item > a,
.wp-block-navigation-link.current_page_item > a,
li.current-menu-item > a,
li.current_page_item > a,
.wp-block-navigation a[aria-current="page"] {
    color: var(--wp--preset--color--accent-1) !important;
    position: relative;
}

/* Underline indicator for current page */
.wp-block-navigation-item.current-menu-item > a::after,
.wp-block-navigation-item.current_page_item > a::after,
.wp-block-navigation-link.current-menu-item > a::after,
.wp-block-navigation-link.current_page_item > a::after,
li.current-menu-item > a::after,
li.current_page_item > a::after,
.wp-block-navigation a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--wp--preset--color--accent-1), var(--wp--preset--color--accent-2));
    border-radius: 1px;
}

/* Racing-inspired separator */
.wp-block-separator {
    background: linear-gradient(90deg, transparent, var(--wp--preset--color--accent-1), var(--wp--preset--color--accent-2), transparent) !important;
    height: 2px !important;
    border: none !important;
}

/* Sponsor grid styling */
.sponsor-logo {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.sponsor-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Hero section enhancements */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* Stats counter styling */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--wp--preset--color--accent-1);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--wp--preset--color--accent-4);
}

/* Car showcase cards */
.car-card {
    background: linear-gradient(145deg, var(--wp--preset--color--accent-5) 0%, var(--wp--preset--color--base) 100%);
    border: 1px solid var(--wp--preset--color--accent-6);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Car card title spacing - add padding above titles after images */
.wp-block-column > .wp-block-group[style*="border"] h3.wp-block-heading {
    margin-top: var(--wp--preset--spacing--30);
    padding-top: var(--wp--preset--spacing--20);
}

.car-card:hover {
    border-color: var(--wp--preset--color--accent-1);
    box-shadow: 0 10px 40px rgba(127, 255, 0, 0.1);
}

/* Trans Am specific styling */
.transam-accent {
    border-color: var(--wp--preset--color--accent-1) !important;
}

.transam-accent::before {
    background: var(--wp--preset--color--accent-1) !important;
}

/* Nova specific styling */
.nova-accent {
    border-color: var(--wp--preset--color--accent-2) !important;
}

.nova-accent::before {
    background: var(--wp--preset--color--accent-2) !important;
}

/* Video play button overlay */
.video-thumbnail {
    position: relative;
    cursor: pointer;
}

.video-thumbnail::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

.video-thumbnail:hover::after {
    color: var(--wp--preset--color--accent-1);
    transform: translate(-50%, -50%) scale(1.2);
}

/* Footer racing stripe */
footer::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--wp--preset--color--accent-1), var(--wp--preset--color--accent-2), var(--wp--preset--color--accent-1));
}

/* Contact form styling */
.wpforms-form input[type="text"],
.wpforms-form input[type="email"],
.wpforms-form textarea {
    background: var(--wp--preset--color--accent-5) !important;
    border: 1px solid var(--wp--preset--color--accent-6) !important;
    color: var(--wp--preset--color--contrast) !important;
}

.wpforms-form input:focus,
.wpforms-form textarea:focus {
    border-color: var(--wp--preset--color--accent-1) !important;
    box-shadow: 0 0 10px rgba(127, 255, 0, 0.2) !important;
}

/* ============================================
   FIX: Hide duplicate page titles above hero sections
   Pages with cover blocks should not show the title twice
   ============================================ */

/* Hide the standalone page title that appears before hero covers */
main > .wp-block-post-title:first-child,
.wp-block-group > .wp-block-post-title:first-child {
    display: none !important;
}

/* Also hide if there's a title directly followed by a cover block */
.wp-block-post-title + .wp-block-cover,
.wp-block-post-title + .wp-block-group > .wp-block-cover:first-child {
    margin-top: 0;
}

/* Hide titles inside the main content area when followed by cover */
.entry-content > h1:first-child,
.wp-block-post-content > h1:first-child {
    display: none;
}

/* ============================================
   FIX: Soften vertical bars on headings
   Make them less prominent and more subtle
   ============================================ */

/* Remove vertical bars from all headings by default */
.wp-block-heading::before {
    display: none;
}

/* Only show subtle bars on section headings (h2) - not h1 or inside covers */
.wp-block-post-content > .wp-block-heading:is(h2)::before,
.wp-block-group:not(.wp-block-cover) > .wp-block-heading:is(h2)::before,
main > .wp-block-group > .wp-block-heading:is(h2)::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 0.8em;
    background: linear-gradient(180deg, var(--wp--preset--color--accent-1) 0%, var(--wp--preset--color--accent-2) 100%);
    margin-right: 10px;
    vertical-align: middle;
    opacity: 0.8;
    border-radius: 2px;
}

/* Never show bars on headings inside cover blocks */
.wp-block-cover .wp-block-heading::before,
.wp-block-cover-image .wp-block-heading::before {
    display: none !important;
}

/* Never show bars on h1 headings */
h1.wp-block-heading::before {
    display: none !important;
}

/* ============================================
   FIX: Button contrast - ensure readable text
   All buttons should have light text on dark/accent backgrounds
   ============================================ */

/* Default button styling - ensure contrast */
.wp-block-button__link {
    color: var(--wp--preset--color--base) !important;
    background-color: var(--wp--preset--color--accent-1) !important;
    font-weight: 600;
    text-shadow: none;
}

/* Outline button variant */
.wp-block-button.is-style-outline .wp-block-button__link {
    color: var(--wp--preset--color--accent-1) !important;
    background-color: transparent !important;
    border: 2px solid var(--wp--preset--color--accent-1) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--accent-1) !important;
    color: var(--wp--preset--color--base) !important;
}

/* Secondary/purple button variant */
.wp-block-button.has-accent-2-background-color .wp-block-button__link,
.wp-block-button__link.has-accent-2-background-color {
    color: var(--wp--preset--color--contrast) !important;
    background-color: var(--wp--preset--color--accent-2) !important;
}

/* Ensure buttons with dark backgrounds have light text */
.wp-block-button__link.has-base-background-color,
.wp-block-button__link.has-accent-5-background-color,
.wp-block-button__link.has-accent-6-background-color {
    color: var(--wp--preset--color--contrast) !important;
    border: 1px solid var(--wp--preset--color--accent-1);
}

/* Buttons inside cover blocks */
.wp-block-cover .wp-block-button__link {
    color: var(--wp--preset--color--base) !important;
    background-color: var(--wp--preset--color--accent-1) !important;
}

/* Button hover states */
.wp-block-button__link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(127, 255, 0, 0.3);
    transition: all 0.3s ease;
}

/* ============================================
   FIX: Consistent card heights
   Use flexbox to ensure equal heights in rows
   ============================================ */

/* Columns with equal height cards */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.wp-block-column {
    display: flex;
    flex-direction: column;
}

/* Cards inside columns should stretch to fill */
.wp-block-column > .wp-block-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Card content should push footer/buttons to bottom */
.wp-block-column > .wp-block-group > *:last-child {
    margin-top: auto;
}

/* Sponsor tier cards - equal heights */
.wp-block-column .wp-block-group[style*="background"] {
    height: 100%;
}

/* ============================================
   FIX: Footer spacing and layout
   ============================================ */

footer .wp-block-columns {
    gap: var(--wp--preset--spacing--40);
}

footer .wp-block-column {
    min-width: 150px;
}

footer h3.wp-block-heading::before {
    display: none;
}

footer .wp-block-social-links {
    justify-content: flex-start;
    gap: 8px;
}

/* ============================================
   FIX: Tables and specifications
   ============================================ */

.wp-block-table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table td,
.wp-block-table th {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--wp--preset--color--accent-6);
}

.wp-block-table tr:hover {
    background-color: rgba(127, 255, 0, 0.05);
}

/* ============================================
   RESPONSIVE: Comprehensive mobile styles
   ============================================ */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .wp-block-columns {
        gap: var(--wp--preset--spacing--30);
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    /* Stack columns on tablets */
    .wp-block-columns:not(.is-not-stacked-on-mobile) {
        flex-direction: column;
    }

    .wp-block-column {
        width: 100% !important;
        flex-basis: 100% !important;
        margin-bottom: var(--wp--preset--spacing--30);
    }

    /* Reduce heading sizes */
    h1, .wp-block-heading.has-xx-large-font-size {
        font-size: 2.5rem !important;
    }

    h2, .wp-block-heading.has-x-large-font-size {
        font-size: 1.75rem !important;
    }

    h3, .wp-block-heading.has-large-font-size {
        font-size: 1.25rem !important;
    }

    /* Stats adjustments */
    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Cover block text */
    .wp-block-cover .wp-block-heading {
        font-size: 2rem !important;
    }

    .wp-block-cover p {
        font-size: 1rem !important;
    }

    /* Navigation - hamburger menu styling */
    .wp-block-navigation__responsive-container.is-menu-open {
        background-color: var(--wp--preset--color--base);
        padding: var(--wp--preset--spacing--40);
    }

    /* Footer columns stack and center */
    footer .wp-block-columns {
        flex-direction: column;
        text-align: center;
    }

    footer .wp-block-column {
        text-align: center;
        align-items: center;
    }

    /* Footer navigation links - center them */
    footer .wp-block-navigation {
        justify-content: center !important;
        width: 100%;
    }

    footer .wp-block-navigation__container {
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
    }

    footer .wp-block-navigation-item {
        justify-content: center !important;
        text-align: center !important;
    }

    footer .wp-block-navigation-item a {
        text-align: center !important;
    }

    /* Footer paragraphs */
    footer p,
    footer .wp-block-paragraph {
        text-align: center !important;
    }

    footer .wp-block-group {
        text-align: center;
    }

    /* Footer bottom row - override space-between */
    footer .wp-block-group[class*="flex"] {
        justify-content: center !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: var(--wp--preset--spacing--20);
    }

    footer .wp-block-social-links {
        justify-content: center !important;
    }

    /* Site logo in footer - center */
    footer .wp-block-site-logo {
        margin-left: auto;
        margin-right: auto;
    }

    /* Social icons outside footer - fix for mobile */
    main .wp-block-social-links,
    .wp-block-post-content .wp-block-social-links {
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 12px;
    }

    main .wp-block-social-links .wp-block-social-link,
    .wp-block-post-content .wp-block-social-links .wp-block-social-link {
        margin: 0 !important;
    }
}

/* ============================================
   Social icons outside footer - match footer size exactly
   Footer: a is 36x36, 6px padding, svg is 24x24
   ============================================ */
main .wp-block-social-links .wp-block-social-link {
    width: 36px !important;
    height: 36px !important;
}

main .wp-block-social-links .wp-block-social-link a {
    width: 36px !important;
    height: 36px !important;
    padding: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

main .wp-block-social-links .wp-block-social-link svg {
    width: 24px !important;
    height: 24px !important;
}

/* Mobile phones */
@media (max-width: 480px) {
    /* Gallery grid adjustments */
    .wp-block-gallery.has-nested-images figure {
        width: 50% !important;
        flex-basis: 50% !important;
    }

    /* Buttons full width on mobile */
    .wp-block-buttons {
        flex-direction: column;
        width: 100%;
    }

    .wp-block-button {
        width: 100%;
    }

    .wp-block-button__link {
        width: 100%;
        text-align: center;
        padding: 16px 24px !important;
    }

    /* Spacing adjustments */
    .wp-block-group[style*="padding"] {
        padding-left: var(--wp--preset--spacing--30) !important;
        padding-right: var(--wp--preset--spacing--30) !important;
    }

    /* Table responsiveness */
    .wp-block-table {
        display: block;
        overflow-x: auto;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    /* Smaller headings */
    h1, .wp-block-heading.has-xx-large-font-size {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }

    h2, .wp-block-heading.has-x-large-font-size {
        font-size: 1.5rem !important;
    }

    h3, .wp-block-heading.has-large-font-size {
        font-size: 1.125rem !important;
    }

    /* Cover block adjustments */
    .wp-block-cover {
        min-height: 300px !important;
    }

    .wp-block-cover .wp-block-heading {
        font-size: 1.5rem !important;
    }

    /* Stats even smaller */
    .stat-number {
        font-size: 1.75rem;
    }

    /* Gallery single column */
    .wp-block-gallery.has-nested-images figure {
        width: 100% !important;
        flex-basis: 100% !important;
    }

    /* Remove vertical bars on mobile */
    .wp-block-heading::before {
        display: none !important;
    }

    /* Reduce padding on mobile */
    .wp-block-group[style*="padding"] {
        padding-left: var(--wp--preset--spacing--20) !important;
        padding-right: var(--wp--preset--spacing--20) !important;
    }

    /* Logo size */
    .wp-block-site-logo img {
        max-height: 50px !important;
    }

    /* Social icons - keep footer icons at default size on mobile */
    /* Non-footer icons are handled by the specific rules above */

    /* Card padding */
    .wp-block-column > .wp-block-group {
        padding: var(--wp--preset--spacing--30) !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }

    .wp-block-navigation,
    .wp-block-button,
    footer {
        display: none;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--wp--preset--color--accent-1);
    color: var(--wp--preset--color--base);
}
