/**
 * Custom CSS for Long Term Car Rental Theme
 * Additional styles and enhancements
 */

/* ===================================
   Enhanced Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

/* ===================================
   Enhanced Hero Section
   =================================== */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10 L90 10 L90 90 L10 90 Z" fill="none" stroke="rgba(204,255,0,0.1)" stroke-width="1"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

/* ===================================
   Posts Grid (for blog/index)
   =================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
    height: 220px;
    overflow: hidden;
    background: var(--gray-light);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-content {
    padding: 25px;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--dark-text);
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--primary-green);
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin-bottom: 15px;
}

.post-excerpt {
    margin-bottom: 20px;
    color: var(--gray-dark);
}

/* ===================================
   Pagination
   =================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: white;
    color: var(--dark-text);
    border: 2px solid var(--gray-medium);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--dark-text);
}

/* ===================================
   Loading States
   =================================== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--gray-medium);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===================================
   Alert/Notice Boxes
   =================================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===================================
   Smooth Scrollbar
   =================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-dark);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

/* ===================================
   Enhanced Form Elements
   =================================== */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    transform: translateY(-2px);
}

input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-green);
}

/* ===================================
   Image Hover Effects
   =================================== */
.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.5s ease;
}

.hover-zoom:hover img {
    transform: scale(1.15);
}

/* ===================================
   Breadcrumbs
   =================================== */
.breadcrumbs {
    padding: 20px 0;
    background: var(--gray-light);
}

.breadcrumbs ul {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumbs li::after {
    content: '›';
    color: var(--gray-dark);
}

.breadcrumbs li:last-child::after {
    display: none;
}

.breadcrumbs a {
    color: var(--gray-dark);
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-green);
}

/* ===================================
   Back to Top Button
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-green);
    color: var(--dark-text);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-lime);
    transform: translateY(-5px);
}

/* ===================================
   Logo Styling
   =================================== */
.site-logo img {
    transition: transform 0.3s ease;
}

.site-logo:hover img {
    transform: scale(1.05);
}

/* ===================================
   Vehicle Unavailable State
   =================================== */
.vehicle-unavailable {
    opacity: 0.7;
    position: relative;
}

.vehicle-unavailable::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

/* ===================================
   Mobile Menu Enhancements
   =================================== */
.mobile-menu-toggle {
    color: var(--dark-text);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    color: var(--primary-green);
    transform: scale(1.1);
}

.nav-menu.active {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .site-header,
    .site-footer,
    .btn,
    .booking-form,
    .back-to-top {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: underline;
    }
}

/* ===================================
   Accessibility Enhancements
   =================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-green);
    color: var(--dark-text);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

*:focus-visible {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

/* ===================================
   Additional Responsive Adjustments
   =================================== */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ===================================
   Dark Mode Support (Optional)
   =================================== */
@media (prefers-color-scheme: dark) {
    /* Users can implement dark mode styles here if needed */
}

/* ===================================
   Custom WordPress Block Editor Styles
   =================================== */
.wp-block-quote {
    border-left: 4px solid var(--primary-green);
    padding-left: 20px;
    font-style: italic;
    color: var(--gray-dark);
}

.wp-block-button__link {
    background-color: var(--primary-green) !important;
    color: var(--dark-text) !important;
    border-radius: 50px !important;
    padding: 14px 32px !important;
    font-weight: 600 !important;
}

/* ===================================
   Cookie Notice (if needed)
   =================================== */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-text);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.cookie-notice.hidden {
    display: none;
}

@media (max-width: 768px) {
    .cookie-notice {
        flex-direction: column;
        text-align: center;
    }
}
