/*
Theme Name: StavTon Theme
Theme URI: https://stavton.ru
Author: Antigravity
Description: Custom WordPress theme for StavTon Detailing Studio.
Version: 1.0
Text Domain: stavton
*/

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #ff0000;
    --secondary-bg: #111111;
    --font-family: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/* Ensure no white backgrounds anywhere */
div, section, main, article, aside, header, footer, nav, ul, li, h1, h2, h3, h4, h5, h6, p, span, a, input, textarea, button, select {
    background-color: transparent;
}

main, section, .container {
    background-color: var(--bg-color) !important;
}

/* Fix default WP blocks */
.wp-block-group, .wp-block-columns, .wp-block-column, .wp-block-post-content {
    background-color: var(--bg-color) !important;
}

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

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

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

/* Header */
header {
    padding: 20px 0;
    border-bottom: 1px solid #333;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('assets/images/main-heading.png');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--accent-color);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #cc0000;
    color: #fff;
}

/* Footer */
footer {
    padding: 80px 0;
    background-color: var(--secondary-bg);
    border-top: 1px solid #333;
    margin-top: 0;
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

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

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: #111;
    border: 1px solid #222;
    padding: 40px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.service-card .more-link {
    display: inline-block;
    margin-top: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-color);
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item h2 {
    font-size: 4rem;
    color: var(--accent-color);
    line-height: 1;
}

.stat-item p {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.7;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    height: 300px;
    background: #111 !important;
    border: 1px solid #222;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

/* Dark theme - targeted overrides */
html, body {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

.content, .wrapper, footer.footer {
    color: var(--text-color);
}

.wp-block-group, .wp-block-columns, .wp-block-column, .wp-block-post-content, .entry-content {
    background-color: transparent !important;
}

input, textarea, select, button:not(.btn):not(.btn-primary) {
    background-color: #111 !important;
    color: #fff !important;
    border: 1px solid #333 !important;
}

/* Fix for any white background blocks */
.has-white-background-color { background-color: #000 !important; }
.has-light-gray-background-color { background-color: #111 !important; }
.has-very-light-gray-background-color { background-color: #050505 !important; }

/* Hero video background */
.main-block {
    position: relative;
    overflow: hidden;
}

.main-block > .video {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0 !important;
    overflow: hidden;
    background: #000;
}

.main-block > .video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-block > .image {
    display: none;
}

.main-block > .main-block-contains {
    position: relative;
    z-index: 2;
}

/* Responsive */
@media (max-width: 1024px) {
    .container { padding: 0 30px; }
    .grid, .contacts-grid { gap: 40px; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .section-title { font-size: 2.2rem; }
    
    .grid, .contacts-grid, .footer-grid { 
        grid-template-columns: 1fr !important; 
    }
    
    header .container {
        flex-direction: row; /* Keep logo and burger on one line */
        justify-content: space-between;
        padding: 0 20px;
    }
    
    .burger-menu {
        display: flex !important;
        z-index: 2000;
    }
    
    #main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: #000;
        z-index: 1500;
        padding-top: 100px;
        transition: right 0.3s ease;
        border-left: 1px solid #222;
    }
    
    #main-nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    nav ul li {
        margin: 0;
    }
    
    nav ul li a {
        font-size: 1.2rem;
    }
    
    .header-contact {
        display: none;
    }
    
    .about-image {
        height: 300px;
        margin-bottom: 30px;
    }
    
    .service-card {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .btn { padding: 12px 25px; font-size: 0.9rem; }
}

/* Swiper Reviews Carousel */
.reviews-swiper {
    padding: 20px 5px 50px !important;
}

.reviews-swiper .swiper-slide {
    height: auto;
}

.reviews-swiper .review {
    height: 100%;
}

.reviews-swiper .review-holder {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.reviews-swiper .review-holder:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.reviews-swiper .author {
    margin-bottom: 15px;
}

.reviews-swiper .author .name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.reviews-swiper .author .date {
    font-size: 0.8rem;
    opacity: 0.5;
}

.reviews-swiper .author .stars {
    font-size: 1rem;
    margin-top: 5px;
}

.reviews-swiper .review-text {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.85;
    flex-grow: 1;
}

.swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.4;
}

.swiper-pagination-bullet-active {
    background: var(--accent-color) !important;
    opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff !important;
    background: rgba(0,0,0,0.6);
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px !important;
}

/* StavTon Layout Fixes (Homepage and Contacts Page) */
.home .content,
.page-template-page-contacts-php .content,
.page-template-page-kontakty-php .content {
    padding-bottom: 0 !important;
}

.home .footer,
.contacts-details-section + .footer,
.page-template-page-contacts-php .footer,
.page-template-page-kontakty-php .footer {
    margin-top: 0 !important;
}

/* Fix globally invisible text on outline buttons containing a .text child */
.btn-primary.btn-outline .text,
.btn-primary.btn-outline div,
.btn-primary.btn-outline span {
    color: #E61717 !important; /* StavTon detailing red */
}

.btn-primary.btn-outline:hover .text,
.btn-primary.btn-outline:hover div,
.btn-primary.btn-outline:hover span {
    color: #ffffff !important;
}

/* Fix for all solid buttons with a .text child */
.btn-primary .text,
.btn-primary div,
.btn-primary span {
    color: #ffffff !important;
}

.btn-primary:hover .text,
.btn-primary:hover div,
.btn-primary:hover span {
    color: #ffffff !important;
}

/* Ensure the arrows and icons inside buttons also scale color cleanly */
.btn:hover svg,
.btn:hover .icon svg,
.btn:hover .arrow svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* =====================================================
   CARBON PREMIUM BACKGROUNDS
   Replaces missing about-company-bkg.png and
   work-examples-bkg.png (404 errors) with pure CSS
   carbon fibre weave pattern.
   ===================================================== */

/* Carbon weave SVG data URI */
:root {
    --carbon-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Crect width='8' height='8' fill='%230d0d0d'/%3E%3Crect width='4' height='4' fill='%23141414'/%3E%3Crect x='4' y='4' width='4' height='4' fill='%23141414'/%3E%3Crect x='1' y='0' width='2' height='4' fill='%231a1a1a' opacity='0.9'/%3E%3Crect x='5' y='4' width='2' height='4' fill='%231a1a1a' opacity='0.9'/%3E%3C/svg%3E");
}

/* About Company — carbon background */
.about-company,
.about-company-points {
    background-color: #0d0d0d !important;
    background-image: var(--carbon-tile) !important;
    background-size: 8px 8px !important;
    background-repeat: repeat !important;
    position: relative;
}

.about-company::before,
.about-company-points::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(230, 23, 23, 0.05) 0%,
        transparent 40%,
        transparent 60%,
        rgba(230, 23, 23, 0.04) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.about-company .about-company-holder,
.about-company-points .about-company-points-holder {
    position: relative;
    z-index: 1;
}

/* Work Examples — darker carbon with red top accent line */
.work-examples.squished,
.work-examples {
    background-color: #080808 !important;
    background-image: var(--carbon-tile) !important;
    background-size: 8px 8px !important;
    background-repeat: repeat !important;
    position: relative;
}

.work-examples::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #E61717 25%, #E61717 75%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.work-examples .work-examples-holder {
    position: relative;
    z-index: 1;
}

/* =====================================================
   MOBILE MENU OVERLAY (injected by main.js)
   ===================================================== */

body.menu-opened {
    overflow: hidden;
}

#mobile-overlay {
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* Ensure .mobile-menu (#mobile-menu-main) slides in */
.mobile-menu {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mobile-menu:not(.opened) {
    transform: translateX(-100%) !important;
    visibility: hidden;
}

.mobile-menu.opened {
    transform: translateX(0) !important;
    visibility: visible;
}

/* =====================================================
   SLICK SLIDER — fallback arrows (missing .woff/.ttf)
   ===================================================== */
.slick-prev:before { content: '\2190' !important; font-family: Arial, sans-serif !important; }
.slick-next:before { content: '\2192' !important; font-family: Arial, sans-serif !important; }

/* =====================================================
   SERVICES BLOCK — image-only cards (no .desc labels)
   ===================================================== */

/* Hide any leftover desc text just in case - commented out to show titles */
/*
.services .service .service-holder .desc,
.services-slider .service .desc {
    display: none !important;
}
*/

/* Service card: image fills the full card, no extra padding */
.services .service .service-holder,
.services-slider .service-holder {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.services .service .service-holder a,
.services-slider .service-holder a {
    display: block;
    width: 100%;
    overflow: hidden;
}

/* Image fills 100% width, fixed aspect ratio */
.services .service .service-holder .image,
.services-slider .service-holder .image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111;
}

.services .service .service-holder .image img,
.services-slider .service-holder .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Zoom on hover */
.services .service .service-holder a:hover .image img,
.services-slider .service-holder a:hover .image img {
    transform: scale(1.07);
}

/* Red bottom border accent on hover */
.services .service .service-holder a::after,
.services-slider .service-holder a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #E61717;
    transform: scaleX(0);
    transition: transform 0.35s ease;
    transform-origin: left;
    z-index: 2;
}

.services .service .service-holder a:hover::after,
.services-slider .service-holder a:hover::after {
    transform: scaleX(1);
}

/* Static service cards styling (not links) */
.services .service .service-holder .service-card-static,
.services-slider .service-holder .service-card-static {
    display: block;
    width: 100%;
    overflow: hidden;
}

.services .service .service-holder .service-card-static .image,
.services-slider .service-holder .service-card-static .image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #111;
    border-radius: 4px;
}

.services .service .service-holder .service-card-static .image img,
.services-slider .service-holder .service-card-static .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.services .service .service-holder .service-card-static .desc,
.services-slider .service-holder .service-card-static .desc {
    padding: 15px 5px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== CODIMIST BADGE ===== */
.codimist-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    text-decoration: none;
    color: #e0e0e0;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    margin-top: 5px;
}

.codimist-badge:hover {
    background: rgba(0, 210, 255, 0.06);
    border-color: rgba(0, 210, 255, 0.45);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 210, 255, 0.25), 0 0 15px rgba(0, 210, 255, 0.1);
}

.codimist-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.codimist-badge:hover .codimist-icon {
    transform: rotate(15deg) scale(1.15);
}

.codimist-text {
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.codimist-badge:hover .codimist-text {
    opacity: 1;
}

.codimist-text span {
    font-weight: 700;
    color: #00d2ff;
    text-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
}

/* Анимация пульсирующей точки */
@keyframes codimist-pulse {
    0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 2px rgba(0, 210, 255, 0.5)); }
    50% { transform: scale(1.4); opacity: 0.5; filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.8)); }
}

.codimist-dot-glow {
    transform-origin: center;
    animation: codimist-pulse 2s infinite ease-in-out;
}
