/*
Theme Name: Norm's Automotive Center
Theme URI: https://normsautomotive.com
Description: Custom block theme for Norm's Automotive Center
Version: 3.0
Author: Norm's Automotive
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
License: GNU General Public License v2 or later
Text Domain: norms-automotive
*/

/* ============================================
   SMOOTH SCROLLING & FONT SMOOTHING
   ============================================ */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   STICKY HEADER
   ============================================ */
.norms-sticky-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

/* Header site logo */
.norms-sticky-header .wp-block-site-logo {
    max-width: 96px;
    flex-shrink: 0;
}

.norms-sticky-header .wp-block-site-logo img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

/* Animated logo (video replacement) */
.wp-block-site-logo .norms-animated-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    display: block;
}

/* Hide static image when animated video is present */
.wp-block-site-logo .norms-animated-logo ~ img {
    display: none !important;
}

/* ============================================
   NAV CTA BUTTON
   ============================================ */
.nav-cta.wp-block-navigation-item .wp-block-navigation-item__content {
    background: #ffffff;
    color: #1a1a1a !important;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
}

.nav-cta.wp-block-navigation-item .wp-block-navigation-item__content:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
    text-decoration: none !important;
}

/* ============================================
   SERVICE CARD HOVER EFFECTS
   ============================================ */
.norms-service-card {
    transition: transform 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.norms-service-card:hover {
    transform: translateY(-4px);
}

.norms-service-card .wp-block-cover__image-background {
    transition: transform 0.4s ease;
}

.norms-service-card:hover .wp-block-cover__image-background {
    transform: scale(1.05);
}

/* ============================================
   SERVICE LIST ITEM HOVER
   ============================================ */
.norms-service-list-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.norms-service-list-item:hover {
    background: #1a1a1a !important;
    color: #ffffff;
    transform: translateY(-2px);
}

.norms-service-list-item:hover h3 {
    color: #ffffff;
}

/* ============================================
   BUTTON HOVER EFFECTS
   ============================================ */
.wp-block-button__link {
    transition: all 0.3s ease;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================
   FOOTER LINK HOVER
   ============================================ */
.has-dark-background-color a:hover {
    color: #ffffff !important;
}

/* ============================================
   HERO VIDEO BACKGROUND
   ============================================ */
.norms-hero-section .wp-block-cover__video-background {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* When a video is present, hide the fallback image (video covers it).
   JS will re-show it if the video fails to load. */
.norms-hero-section .wp-block-cover__video-background ~ .wp-block-cover__image-background {
    display: none;
}

/* If the video is hidden (error), the fallback image takes over. */
.norms-hero-section .wp-block-cover__image-background {
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* ============================================
   SPLASH HERO (Coming Soon / Landing)
   ============================================ */
.norms-splash-hero {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Larger logo in splash context */
.norms-splash-logo .wp-block-site-logo {
    max-width: 180px;
}

.norms-splash-logo .wp-block-site-logo img,
.norms-splash-logo .wp-block-site-logo .norms-animated-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    display: block;
}

/* Hide static image when animated video is present in splash */
.norms-splash-logo .wp-block-site-logo .norms-animated-logo ~ img {
    display: none !important;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 1024px) {
    .norms-about-image img,
    .norms-testimonials-image img {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .norms-sticky-header {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .norms-page-hero {
        padding-top: 120px !important;
        padding-bottom: 60px !important;
    }
}
