/**
 * UI/UX Enhancements for Macedonia Car Rental
 * Hero Section, Product Grid, Mobile Menu improvements
 */

/* ============================================
   HERO SECTION IMPROVEMENTS
   ============================================ */

/* Hero container styling */
.mcr-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 70vh;
}

.mcr-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 50px 50px;
    opacity: 0.3;
    animation: heroPattern 20s linear infinite;
}

@keyframes heroPattern {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(50px) translateY(50px); }
}

/* Hero title enhancement */
.mcr-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease-out;
}

.mcr-hero-title .accent,
.mcr-hero-title span {
    color: #f39c12;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero subtitle */
.mcr-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Hero CTA buttons */
.mcr-hero .btn-primary,
.mcr-hero-cta {
    background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.mcr-hero .btn-primary:hover,
.mcr-hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5);
}

/* ============================================
   PRODUCT GRID HOVER EFFECTS
   ============================================ */

/* Product card base */
.product-card,
.woocommerce ul.products li.product,
.turbo-listing-item,
.mcr-car-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* Hover lift effect */
.product-card:hover,
.woocommerce ul.products li.product:hover,
.turbo-listing-item:hover,
.mcr-car-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Image zoom on hover */
.product-card img,
.woocommerce ul.products li.product img,
.turbo-listing-item img,
.mcr-car-card img {
    transition: transform 0.5s ease;
}

.product-card:hover img,
.woocommerce ul.products li.product:hover img,
.turbo-listing-item:hover img,
.mcr-car-card:hover img {
    transform: scale(1.08);
}

/* Overlay effect on hover */
.product-card::after,
.mcr-car-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover::after,
.mcr-car-card:hover::after {
    opacity: 1;
}

/* Price badge enhancement */
.product-card .price,
.mcr-car-card .car-price,
.woocommerce ul.products li.product .price {
    font-weight: 700;
    color: #f39c12;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.product-card:hover .price,
.mcr-car-card:hover .car-price,
.woocommerce ul.products li.product:hover .price {
    transform: scale(1.1);
    color: #e74c3c;
}

/* Book Now button enhancement */
.product-card .add-to-cart,
.mcr-car-card .book-btn,
.woocommerce ul.products li.product .button {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card .add-to-cart::before,
.mcr-car-card .book-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.product-card:hover .add-to-cart::before,
.mcr-car-card:hover .book-btn::before {
    left: 100%;
}

.product-card .add-to-cart:hover,
.mcr-car-card .book-btn:hover,
.woocommerce ul.products li.product .button:hover {
    background: #27ae60;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

/* ============================================
   MOBILE MENU IMPROVEMENTS
   ============================================ */

/* Mobile menu toggle button */
.mobile-menu-toggle,
.ast-mobile-menu-trigger-wrap button,
.menu-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span,
.ast-mobile-menu-trigger-wrap button .ast-mobile-svg {
    display: block;
    width: 25px;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Hamburger animation when open */
.mobile-menu-toggle.active span:nth-child(1),
.ast-mobile-menu-trigger-wrap.ast-header-break-point button.toggled .ast-mobile-svg {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile menu slide-in */
.ast-mobile-popup-drawer,
.mobile-menu-panel {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: -5px 0 30px rgba(0,0,0,0.2);
}

.ast-mobile-popup-drawer.active,
.mobile-menu-panel.open {
    transform: translateX(0);
}

/* Mobile menu items */
.ast-mobile-popup-drawer .menu-link,
.mobile-menu-panel a {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ast-mobile-popup-drawer .menu-link::before,
.mobile-menu-panel a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #f39c12;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.ast-mobile-popup-drawer .menu-link:hover,
.mobile-menu-panel a:hover {
    background: rgba(243, 156, 18, 0.1);
    padding-left: 2rem;
}

.ast-mobile-popup-drawer .menu-link:hover::before,
.mobile-menu-panel a:hover::before {
    transform: translateX(0);
}

/* Mobile menu close button */
.ast-mobile-popup-close,
.mobile-menu-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ast-mobile-popup-close:hover,
.mobile-menu-close:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
}

/* ============================================
   GENERAL UI IMPROVEMENTS
   ============================================ */

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

/* Better focus states */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #f39c12;
    outline-offset: 2px;
}

/* Loading animation for images */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Selection color */
::selection {
    background: #f39c12;
    color: white;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .mcr-hero {
        min-height: 60vh;
        padding: 2rem 1rem;
    }

    .mcr-hero-title {
        font-size: 2rem;
    }

    .product-card:hover,
    .mcr-car-card:hover {
        transform: translateY(-5px);
    }

    .mcr-hero .btn-primary,
    .mcr-hero-cta {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .mcr-hero-title {
        font-size: 1.75rem;
    }

    .product-card:hover img,
    .mcr-car-card:hover img {
        transform: scale(1.03);
    }
}
