/* Custom Styles for Clarendon Car & Classic - Luxury Theme */

/* Custom animations and enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 5px;
    border: 2px solid #0a0a0a;
}

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

/* Enhanced hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 15px 25px -5px rgba(0, 0, 0, 0.2);
}

/* Custom button styles */
.btn-gradient {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.3);
}

/* Card enhancements */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-12px);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.5), 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Image hover effects */
.image-hover {
    transition: transform 0.3s ease;
}

.image-hover:hover {
    transform: scale(1.05);
}

/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom focus styles */
.focus-ring:focus {
    outline: none;
    ring: 2px;
    ring-color: #f59e0b;
    ring-offset: 2px;
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism effect */
.glass {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Custom shadows */
.shadow-soft {
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

.shadow-medium {
    box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-strong {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Responsive typography */
.text-responsive {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.text-responsive-lg {
    font-size: clamp(1.5rem, 4vw, 3rem);
}

/* Custom grid layouts */
.grid-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Enhanced form styles */
.form-input-enhanced {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-input-enhanced:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Custom badge styles */
.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Smooth transitions for all interactive elements */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Custom utility classes */
.text-balance {
    text-wrap: balance;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Image gallery enhancements */
.car-image-thumbnail {
    transition: all 0.3s ease;
}

.car-image-thumbnail:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.car-image-thumbnail.opacity-50 {
    filter: grayscale(50%);
}

#main-car-image {
    transition: opacity 0.3s ease;
}

/* Slideshow navigation buttons */
#prev-btn, #next-btn {
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

#prev-btn:hover, #next-btn:hover {
    background-color: rgba(245, 158, 11, 0.9) !important;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* Image counter */
#image-counter {
    backdrop-filter: blur(8px);
    font-weight: 600;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background-color: #ffffff;
        border: 1px solid #000000;
    }
    
    .text-gray-600 {
        color: #000000;
    }
}

/* Logo transparency - force transparent background in Chrome */
nav a[href*="home"] {
    background-color: transparent !important;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

/* Force transparent background on logo images - prevent Chrome white background */
nav img[alt="Clarendon Car and Classic"],
nav a img[src*="logo"],
footer img[alt="Clarendon Car and Classic"],
footer a img[src*="logo"] {
    background-color: transparent !important;
    background: transparent !important;
    display: block;
    /* Force transparency in Chrome - override any browser defaults */
    -webkit-background-clip: padding-box !important;
    background-clip: padding-box !important;
    /* Ensure proper rendering */
    image-rendering: auto;
    /* Remove any default browser styling */
    border: none !important;
    outline: none;
    /* Chrome-specific fix for transparent PNGs */
    -webkit-appearance: none;
    appearance: none;
    /* Prevent any color overlay */
    mix-blend-mode: normal;
}

/* Mobile Responsiveness Improvements */

/* Ensure touch targets are at least 44x44px for accessibility */
a, button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Nav: one background for bar, dropdown and interactive elements so nothing looks a different white */
:root {
    --nav-bg: #f5f5f5;
}
.site-nav,
.site-nav-dropdown {
    background-color: var(--nav-bg) !important;
}
/* Hamburger button: match nav so it never shows a brighter patch (e.g. when menu is open/focus) */
.site-nav .site-nav-btn {
    background-color: transparent !important;
}
.site-nav .site-nav-btn:hover {
    background-color: var(--nav-bg) !important;
}
/* Dropdown link hover: subtle darkening instead of a brighter white */
.site-nav-dropdown a:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

/* Mobile navigation improvements */
@media (max-width: 767px) {
    /* Navigation bar adjustments */
    nav {
        height: auto;
        min-height: 64px;
    }
    
    nav .flex.justify-between {
        flex-wrap: wrap;
    }
    
    /* Logo sizing on mobile */
    nav img {
        max-width: 200px !important;
        height: auto !important;
    }
    
    /* Mobile menu - same solid background as nav so they blend */
    #mobile-menu.site-nav-dropdown,
    .site-nav-dropdown {
        width: 100%;
        background-color: #f5f5f5 !important;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        margin-top: 0;
    }
    
    #mobile-menu a {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    /* Main content padding adjustment */
    main {
        padding-top: 64px !important;
    }
    
    /* Home page hero adjustments */
    body.home-page .hero-section {
        height: 50vh !important;
        min-height: 300px !important;
        margin-top: -64px !important;
    }
    
    /* Section padding adjustments */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    /* Button improvements */
    .btn-gradient,
    a[class*="bg-accent"],
    a[class*="bg-luxury"] {
        padding: 14px 24px !important;
        font-size: 16px !important;
        width: 100%;
        max-width: 100%;
    }
    
    /* Card improvements */
    .card-hover {
        margin-bottom: 1.5rem;
    }
    
    /* Grid adjustments */
    .grid {
        gap: 1.5rem !important;
    }
    
    /* Image gallery on car detail page */
    .car-image-thumbnail {
        height: 60px !important;
    }
    
    .car-image-thumbnail img {
        height: 60px !important;
    }
    
    /* Car detail page layout */
    .lg\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    .lg\\:col-span-2 {
        grid-column: span 1 !important;
    }
    
    /* Sticky positioning on mobile */
    .sticky {
        position: relative !important;
        top: 0 !important;
    }
    
    /* Footer improvements - less top space on mobile */
    footer.footer-main .footer-content {
        padding-top: 1.5rem !important;
    }
    
    footer {
        padding-top: 0 !important;
        padding-bottom: 3rem !important;
    }
    
    footer .grid {
        gap: 2rem !important;
    }
    
    /* Pagination improvements */
    nav[aria-label*="pagination"] ul {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    nav[aria-label*="pagination"] a,
    nav[aria-label*="pagination"] span {
        padding: 10px 14px !important;
        font-size: 14px !important;
    }
    
    /* Breadcrumb improvements */
    .flex.items-center.space-x-2 {
        flex-wrap: wrap;
        font-size: 14px;
    }
    
    /* Text sizing */
    .text-4xl {
        font-size: 1.875rem !important;
    }
    
    .text-5xl {
        font-size: 2.25rem !important;
    }
    
    .text-6xl {
        font-size: 2.5rem !important;
    }
    
    /* Spacing adjustments */
    .py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .mb-20 {
        margin-bottom: 2rem !important;
    }
    
    .mb-16 {
        margin-bottom: 1.5rem !important;
    }
    
    /* About page image adjustments */
    .aspect-\\[4\\/3\\] {
        aspect-ratio: 4/3;
        margin-bottom: 1.5rem;
    }
    
    /* Contact info improvements */
    .text-sm {
        font-size: 14px !important;
    }
    
    /* Sold banner adjustments */
    .text-4xl.md\\:text-6xl {
        font-size: 2rem !important;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Medium screen adjustments */
    .grid {
        gap: 2rem !important;
    }
    
    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    /* Car detail page - 2 column layout on tablet */
    .lg\\:grid-cols-3 {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .lg\\:col-span-2 {
        grid-column: span 1 !important;
    }
}

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Improve image loading on mobile */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    a, button {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .hover\\:scale-105:hover,
    .hover\\:scale-110:hover {
        transform: none;
    }
    
    /* Show navigation buttons on touch */
    #prev-btn,
    #next-btn {
        opacity: 1 !important;
        background-color: rgba(0, 0, 0, 0.7) !important;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 767px) and (orientation: landscape) {
    body.home-page .hero-section {
        height: 70vh !important;
        min-height: 400px !important;
    }
    
    nav {
        height: 56px;
    }
    
    main {
        padding-top: 56px !important;
    }
}

/* Footer: mobile layout */
@media (max-width: 767px) {
    footer.footer-main {
        padding-top: 0;
    }
    footer.footer-main .footer-content {
        padding-top: 1.5rem !important;
        padding-bottom: 1rem;
    }
    footer {
        padding-bottom: 2rem;
    }
    footer .max-w-7xl,
    footer .footer-content {
        max-width: 100%;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    footer .grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        text-align: center;
    }
    footer .grid > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }
    footer .grid > div:last-of-type {
        border-bottom: none;
    }
    footer .grid > div .mb-6 {
        margin-bottom: 0.75rem;
    }
    footer .grid > div img {
        max-height: 4rem;
        width: auto;
    }
    footer .grid > div p.text-luxury-400 {
        font-size: 0.9375rem;
        line-height: 1.5;
        max-width: 20rem;
        margin: 0;
    }
    footer .grid > div h6 {
        font-size: 0.8125rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 0.75rem;
    }
    footer nav ul.footer-nav-list,
    footer nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0 1.25rem;
        margin: 0 !important;
        padding: 0 !important;
    }
    footer nav ul.footer-nav-list li,
    footer nav ul li {
        margin: 0 !important;
        padding: 0 !important;
        list-style: none;
        display: flex;
        align-items: center;
    }
    footer nav ul.footer-nav-list li a,
    footer nav ul li a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        line-height: 1;
        padding: 0.375rem 0;
        min-height: 1.5rem;
    }
    footer .space-y-3 {
        gap: 0.5rem;
    }
    footer .space-y-3 p {
        font-size: 0.9375rem;
        margin: 0;
    }
    footer .border-t.border-luxury-800 {
        margin-top: 0.5rem;
        padding-top: 1.25rem;
        padding-bottom: 0;
    }
    footer .border-t.border-luxury-800 p {
        font-size: 0.8125rem;
        color: rgba(255, 255, 255, 0.5);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 