/*
 * Custom CSS for Tay Astra Child Theme (Light Theme)
 * Optimized header, footer, and responsive layout
 */

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* Plugin styles */
/* Улучшенные стили для сетки транспортных средств */
.ttu-vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
    padding: 0 15px;
}

.ttu-vehicle-card {
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.35s ease;
    position: relative;
    background: #fff;
    height: 100%;
}

.ttu-vehicle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.ttu-vehicle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #f17a06, #e57005);
}

.ttu-vehicle-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 20px;
}

.ttu-vehicle-image img {
    max-width: 100%;
    max-height: 170px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.ttu-vehicle-card:hover .ttu-vehicle-image img {
    transform: scale(1.05);
}

.ttu-vehicle-details {
    padding: 25px;
}

.ttu-vehicle-name {
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: #212529;
    font-weight: 600;
}

.ttu-vehicle-pricing {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.ttu-vehicle-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e0e0e0;
}

.ttu-vehicle-old-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
}

.ttu-vehicle-specs {
    list-style: none;
    margin-bottom: 25px;
}

.ttu-vehicle-specs li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ttu-vehicle-specs li::before {
    content: '';
    color: #06f1f1;
    font-weight: bold;
    font-size: 1.1rem;
}

.ttu-vehicle-capacity {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.ttu-capacity-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.ttu-capacity-icon {
    color: #f17a06;
}

.ttu-vehicle-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.ttu-vehicle-features span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.ttu-vehicle-features span::before {
    content: '•';
    color: #f17a06;
    font-size: 1.2rem;
}

.ttu-vehicle-cta {
    display: block;
    width: 100%;
    padding: 14px;
    background: #f17a06;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-align: center;
}

.ttu-vehicle-cta:hover {
    background: #e57005;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(241, 122, 6, 0.3);
}

/* Улучшенные стили для карточек транспорта с акцентом на "Хит" */
.ttu-vehicle-card.featured {
    border: 1px solid #f17a06;
}

.ttu-vehicle-card.featured::before {
    width: 7px;
}

.ttu-vehicle-card.featured .ttu-vehicle-name {
    position: relative;
}

.ttu-vehicle-card.featured .ttu-vehicle-name::after {
    content: 'POPULAR';
    position: absolute;
    top: -15px;
    right: 0;
    background: #f17a06;
    color: white;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* Адаптивность */
@media (max-width: 768px) {
    .ttu-vehicle-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .ttu-vehicle-pricing {
        flex-direction: column;
        gap: 10px;
    }
    
    .ttu-vehicle-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .ttu-vehicle-grid {
        grid-template-columns: 1fr;
    }
    
    .ttu-vehicle-capacity {
        flex-direction: column;
    }
}
/* Custom Scrollbar (Light) */
* {
    scrollbar-width: thin;
    scrollbar-color: #ddd #fafafa;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #fafafa;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
    border: 1px solid #eee;
}

::-webkit-scrollbar-thumb:hover {
    background: #f17a06;
}

/* Appointment Bar Styles */
.appointment-bar {
    background-color: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.appointment-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.appointment-item {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 10px;
    position: relative;
    min-width: 220px;
}

.appointment-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 1px;
    background-color: #dee2e6;
}

.appointment-icon {
    margin-right: 12px;
    color: #f17a06;
    font-size: 24px;
    min-width: 30px;
    text-align: center;
}

.appointment-text {
    line-height: 1.4;
}

.appointment-text strong {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #212529;
}

.appointment-text span, 
.appointment-text a {
    font-size: 13px;
    color: #6c757d;
}

.call-center .appointment-text a {
    color: #f17a06;
    font-weight: 600;
    text-decoration: none;
}

/* 404 page styles */
.site-404 div {
    text-align: center;
    padding: 100px 20px;
}   
.error-404 h1 {
    font-size: 48px;
    color: #f13d06;
    margin-bottom: 20px;
}
.error-404 p {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 30px;
}
.error-404 a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f17a06;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.error-404 a:hover {
    background-color: #bd5e00;
}

/* Navigation Bar Styles */
.nav-bar {
    background-color: #fff;
    padding: 0 20px;
    border-bottom: 1px solid #dee2e6;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 15px 20px;
    color: #212529;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background-color: #f17a06;
    color: #fff;
}

/* Submenu Styles */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #dee2e6;
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 12px 15px;
    color: #212529;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.sub-menu li a:hover {
    background-color: #f17a06;
    color: #fff;
}

/* ===================== */
/* Mobile Menu Toggle - FIXED */
/* ===================== */
.mobile-toggle {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
    z-index: 1001;
    background-color: #ffffff00;
    border-color: #ffffff00;
}

.mobile-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #212529;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out;
}

.mobile-toggle span:nth-child(1) {
    top: 0;
}

.mobile-toggle span:nth-child(2) {
    top: 11px;
}

.mobile-toggle span:nth-child(3) {
    top: 22px;
}

/* Active state (hamburger to X) */
.mobile-toggle.active span:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    top: 11px;
    transform: rotate(-45deg);
}

/* ===================== */
/* optimized header and footer styles */
/* ===================== */
.footer-divider-small {
    width: 50%;
    position: relative;
    height: 1px;
    background-color: #6c757d;
    margin: 20px 0;
}
.footer-divider {
    width: 100%;
    height: 2px;
    background-color: #dee2e6;
    margin: 20px 0;
}
.footer-column.contact-info img,
.payment-info img {
    width: 250px;
    height: 27px;
    aspect-ratio: 250/27;
    object-fit: contain;
}
.quick-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    left: 0;
    text-align: center;
}
.quick-links h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #212529;
    position: relative;
    left: 0;
    text-align: center;
}

/* For all images */
img {
    aspect-ratio: attr(width) / attr(height);
    max-width: 100%;
    height: auto;
}

/* ===================== */
/* HEADER: SITE BRANDING */
/* ===================== */
.site-branding {
    background-color: #fff;
    padding: 10px 30px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-sizing: border-box;
    width: 100%;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-title {
    word-break: break-word;
    font-size: 1em;
    color: #212529;
    margin: 0;
    padding: 10px;
    flex: 1 1 auto;
    min-width: 200px;
}

.site-title:hover {
    color: #212529;
}

.lang-switcher-container {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.payment-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 0 0 auto;
}

.payment-info img {
    width: 200px;
    max-width: 100%;
    height: auto;
}

/* ===================== */
/* LANG SWITCHER STYLES */
/* ===================== */
.lang-switcher {
    position: relative;
    display: inline-block;
}
#current-lang-btn {
  background: none;
  border: 1px solid #ccc;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #212529;
  background-color: #f8f9fa;
}

.lang-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 5px);
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    z-index: 1001;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(-50%);
    left: 50%;
}

.lang-dropdown li {
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  color: #212529;
}
.lang-dropdown.visible {
  display: block;
}

.lang-dropdown li:hover {
  background-color: #f8f9fa;
}

/* ===================== */
/* FOOTER: BASE LAYOUT   */
/* ===================== */
#custom-footer {
    background-color: #f8f9fa;
    color: #212529;
    padding: 20px;
    font-size: 14px;
    border-top: 1px solid #dee2e6;
}

.footer-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #dee2e6;
}

/* ===================== */
/* FOOTER: TOP SECTION - IMPROVED */
/* ===================== */
.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.footer-column {
    flex: 1 1 auto;
    min-width: 250px;
}
.footer-column.contact-info h4{
    color: #212529;
}
.tweets-feed {
    color: #da8524;
}

/* Large screens: 3 columns */
@media (min-width: 1540px) {
    .footer-top {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Medium screens: 769-1539px - Quick links + Contacts side by side */
@media (min-width: 769px) and (max-width: 1539px) {
    .footer-top {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .tweets-feed {
        display: none;
    }
    
    .quick-links {
        grid-column: 1;
        display: flex;
        flex-direction: column;
    }
    
    .contact-info {
        grid-column: 2;
        display: flex;
        flex-direction: column;
    }
    
    /* Align both boxes at the top */
    .quick-links, 
    .contact-info {
        align-self: start;
    }
    
    /* Make boxes the same height */
    .footer-column {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    /* Visual improvements */
    .quick-links h4,
    .contact-info h4 {
        margin-top: 0;
        padding-top: 0;
    }
    
    .footer-divider-small {
        margin: 12px 0;
        width: 90%;
    }
    .mobile-toggle {
        display: none; /* Hide mobile toggle on desktop */
    }
    
    .nav-menu {
        display: flex !important; /* Force show on desktop */
    }
}

/* Mobile layout */
@media (max-width: 768px) {    
    .nav-container{
        height: 70px;
    }
    .footer-top {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        flex: 1 1 auto;
        text-align: center;
        width: 100%;
        max-width: 350px;
    }
    
    .footer-divider-small {
        display: none;
    }
}

/* Improved Quick Links */
.quick-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.quick-links li {
    margin: 8px 0;
}

.quick-links a {
    display: block;
    padding: 6px 0;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.quick-links a:hover {
    color: #212529;
}

/* Improved Contact Info */
.contact-info p {
    margin: 8px 0;
    line-height: 1.5;
}

.contact-info img {
    margin: 15px 0 10px;
}

/* Unified Divider Styles */
.footer-divider-small {
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, #6c757d, transparent);
    margin: 15px auto;
    display: block;
    border: none;
}

/* ===================== */
/* FOOTER: SOCIAL ICONS  */
/* ===================== */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.footer-social i {
    font-size: 16px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.footer-social i:hover {
    color: #212529;
}
.footer-description {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #6c757d;
}

/* ===================== */
/* RESPONSIVE LAYOUT ENHANCEMENTS */
/* ===================== */
@media (max-width: 1200px) {
    .appointment-item {
        min-width: 180px;
    }
    
    .nav-menu > li > a {
        padding: 15px 15px;
        font-size: 14px;
    }
}

/* Medium devices (tablets, 992px and down) */
@media (max-width: 992px) {
    .appointment-container {
        padding: 0 15px;
    }
    
    .appointment-item {
        flex: 1 1 48%;
        margin: 0 1% 15px;
        padding: 0 10px;
    }
    
    .appointment-item:not(:last-child)::after {
        height: 30px;
    }
    
    /* Remove separators for last in row */
    .appointment-item:nth-child(2n)::after {
        display: none;
    }
    
    .appointment-text strong {
        font-size: 13px;
    }
    
    .appointment-text span, 
    .appointment-text a {
        font-size: 12px;
    }
    
    .nav-menu > li > a {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Tablets and small desktops (769px-992px) */
@media (min-width: 769px) and (max-width: 992px) {
    .appointment-item {
        flex: 1 1 48%;
    }
    
    .nav-menu > li > a {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .site-title {
        font-size: 0.9em;
    }
}

/* Mobile devices (768px and down) */
@media (max-width: 768px) {
    .appointment-item {
        flex: 1 1 100%;
        margin-bottom: 15px;
    }
    
    .appointment-item::after {
        display: none !important;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        flex-direction: column;
        z-index: 9999;
        overflow-y: auto;
        padding: 80px 20px 20px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        border: 1px solid #dee2e6;
    }
    .nav-menu.active {
        transform: translateX(0);
        display: flex;
    }
    
    .nav-menu > li > a {
        padding: 12px 20px;
        border-bottom: 1px solid #dee2e6;
        color: #212529;
    }
    
    .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: 1px solid #dee2e6;
    }
    
    .menu-item-has-children:hover .sub-menu,
    .menu-item-has-children.active .sub-menu {
        display: block;
    }
    
    .sub-menu li a {
        padding-left: 30px;
        background: #f8f9fa;
        color: #212529;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    /* HEADER FIXES */
    .site-branding {
        padding: 15px;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .header-left,
    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    
    .site-title {
        text-align: center;
        margin-bottom: 0;
        padding: 10px 0;
        order: 1;
    }
    
    .lang-switcher-container {
        width: 100%;
        display: flex;
        justify-content: center;
        order: 2;
        margin: 10px 0;
    }
    
    .lang-switcher {
        text-align: center;
        margin: 0 auto;
    }
    
    .lang-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .payment-info {
        justify-content: center;
        margin-top: 0;
        order: 3;
    }
    
    /* FOOTER FIXES */
    .footer-top {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .footer-column {
        flex: 1 1 auto;
        text-align: center;
        width: 100%;
        max-width: 350px;
    }

    .footer-social {
        flex-direction: row;
        gap: 10px;
    }

    #custom-footer {
        text-align: center;
    }
}

/* Small mobile devices (480px and down) */
@media (max-width: 480px) {
    .site-branding {
        padding: 10px;
    }
    
    .payment-info img {
        width: 180px;
    }
    
    .site-title {
        font-size: 0.9em;
    }
    
    .lang-switcher-container {
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 10px 0;
    }
    
    .lang-dropdown {
        top: 100%;
        transform: translateX(-50%);
        left: 50%;
    }
    
    .lang-switcher {
        text-align: center;
    }
    
    .footer-divider-small {
        width: 70%;
        margin: 20px auto;
    }
}

/* ===================== */
/* ENHANCED MOBILE MENU */
/* ===================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .mobile-toggle {
        position: relative;
        z-index: 10001;
        transition: transform 0.3s ease;
    }
    
    .mobile-toggle.active {
        position: fixed;
        top: 25px;
        right: 20px;
        transform: rotate(180deg);
    }
    
    /* Close icon */
    .mobile-toggle.active span:nth-child(1) {
        top: 11px;
        left: 5px;
        transform: rotate(45deg) scaleX(1.2);
    }
    
    .mobile-toggle.active span:nth-child(3) {
        top: 11px;
        left: 5px;
        transform: rotate(-45deg) scaleX(1.2);
    }
    
    /* Menu items animation */
    .nav-menu > li {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    
    .nav-menu.active > li {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Animation delay for items */
    .nav-menu.active > li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active > li:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active > li:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active > li:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active > li:nth-child(5) { transition-delay: 0.3s; }
    .nav-menu.active > li:nth-child(6) { transition-delay: 0.35s; }
}

/* Force mobile toggle to remain transparent and keep bars black
   This overrides parent/theme rules that may set background-color or border-color
   (e.g. var(--ast-global-color-1)). Using !important to ensure consistent display. */
.mobile-toggle,
.mobile-toggle:focus,
.mobile-toggle.active {
    background-color: transparent !important;
    border-color: transparent !important;
}

.mobile-toggle span {
    background: #212529 !important; /* keep the three bars black */
}

/* Keep hover/active states from changing background unexpectedly */
.mobile-toggle:hover,
.mobile-toggle:active {
    background-color: transparent !important;
}
