/* GTM Car Rental - Custom Styles */

/* Color Variables */
:root {
    --primary-gold: #C9A24D;
    --primary-white: #FFFFFF;
    --primary-dark: #0F172A;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--primary-dark);
    background-color: var(--primary-white);
    line-height: 1.6;
}

/* Header Styles - Old styles removed, now defined in index.php inline styles */
/* See index.php for updated header styling with glass morphism */

/* Hero Section */
.hero {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--primary-white);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, #B8912D 100%);
    color: var(--primary-dark);
    padding: 0.8rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(201, 162, 77, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 211, 102, 0.4);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Fleet Section */
.fleet-section {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.fleet-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: var(--primary-dark);
    text-align: center;
}

@media (min-width: 1024px) {
    .fleet-section {
        margin: 4rem auto;
    }
    
    .fleet-title {
        font-size: 3rem;
    }
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
}

@media (min-width: 1024px) {
    .filters {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1400px) {
    .cars-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) and (max-width: 1399px) {
    .cars-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Responsive */
@media (min-width: 768px) and (max-width: 1023px) {
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem;
    }
}

/* Premium Card Hover Effect */
.car-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 15px 20px -8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-gold);
}

@media (min-width: 1024px) {
    .car-card:hover .car-image {
        transform: scale(1.05);
    }
}

/* Car Image Container - Overflow Hidden & Responsive */
.car-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 250px;
    background: #f0f0f0;
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.car-card:hover .car-image {
    transform: scale(1.05);
}

/* Responsive Image Adjustments */
@media (max-width: 768px) {
    .car-image-container {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .car-image-container {
        height: 180px;
    }
}

.car-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.car-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.car-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #666;
    flex: 1;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--primary-dark);
    font-weight: 500;
}

.spec-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-gold);
    flex-shrink: 0;
}

.car-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-gold);
    margin: 1rem 0;
}

.car-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.car-actions button,
.car-actions a {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1rem;
}

/* Footer Styles */
footer {
    background: var(--primary-dark);
    color: var(--primary-white);
    margin-top: 3rem;
    padding: 2rem 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-gold);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--primary-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-gold);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .header-container {
    flex-direction: row-reverse;
}

html[dir="rtl"] nav ul {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 1.2rem;
        z-index: 1001;
        position: relative;
    }

    /* Hamburger Menu Container */
    .header-container {
        position: relative;
    }

    /* Mobile Nav Drawer */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--primary-white);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
    }

    nav.nav-active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        font-size: 1.2rem;
    }

    /* Hamburger Icon */
    .hamburger {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
        background-color: var(--primary-dark);
    }

    /* Hamburger Animation */
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hero-content {
        margin-bottom: 180px !important;
    }

    /* Responsive Cars Grid */
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
}

/* Tablet & Mobile - Hide Desktop Booking, Show Mobile Booking */
@media (max-width: 768px) {
    /* Override inline styles on desktop booking - FORCE IT AWAY */
    div.hero-booking-desktop {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        position: fixed !important;
        top: -99999px !important;
        bottom: auto !important;
        left: -99999px !important;
        right: auto !important;
        transform: none !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        z-index: -99999 !important;
        overflow: hidden !important;
    }

    /* Hide section.hero's internal positioning that causes absolute children to show */
    section.hero {
        position: relative !important;
    }

    section.hero .hero-booking-desktop {
        display: none !important;
        visibility: hidden !important;
    }

    section.hero .hero-booking-desktop form {
        display: none !important;
    }

    section.hero .hero-booking-desktop * {
        display: none !important;
    }

    /* SHOW Mobile Booking Section */
    div.hero-booking-mobile {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        width: 96% !important;
        max-width: 340px !important;
        min-width: 0 !important;
        position: static !important;
        margin: 2rem auto 0.75rem auto !important;
        padding: 0.5rem 0.7rem !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        background: rgba(255, 255, 255, 0.7) !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.10) !important;
        border-radius: 10px !important;
        z-index: 10 !important;
        border: 1.5px solid rgba(201,162,77,0.18) !important;
    }

    div.hero-booking-mobile form {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.4rem !important;
    }

    div.hero-booking-mobile * {
        display: block !important;
        visibility: visible !important;
        font-size: 0.92rem !important;
    }
}

/* Mobile Responsive Images */
@media (max-width: 480px) {
    .cars-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .car-card {
        max-width: 100%;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-content {
        margin-bottom: 2rem !important;
    }

    .hero-booking-mobile {
        margin: 2.25rem auto 0.75rem auto !important;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    /* HIDE Desktop Booking Section on Mobile */
    div.hero-booking-desktop {
        display: none !important;
        position: fixed !important;
        top: -99999px !important;
        left: -99999px !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    section.hero .hero-booking-desktop {
        display: none !important;
        visibility: hidden !important;
    }

    section.hero .hero-booking-desktop form {
        display: none !important;
    }

    section.hero .hero-booking-desktop * {
        display: none !important;
    }

    /* SHOW Mobile Booking Section */
    div.hero-booking-mobile {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        width: 92% !important;
        max-width: 92% !important;
        position: static !important;
        margin: 1rem auto !important;
        padding: 1rem !important;
        left: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        background: rgba(255, 255, 255, 0.3) !important;
        z-index: 1 !important;
    }

    div.hero-booking-mobile form {
        display: flex !important;
    }

    div.hero-booking-mobile * {
        display: block !important;
        visibility: visible !important;
    }
}

/* Hide Hamburger on Desktop */
@media (min-width: 769px) {
    .hamburger {
        display: none;
    }

    /* HIDE Mobile Booking Section on Desktop - STRONG RULES */
    .hero-booking-mobile {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        pointer-events: none !important;
    }

    /* SHOW Desktop Booking Section on Desktop */
    .hero-booking-desktop {
        display: block !important;
        visibility: visible !important;
        position: absolute !important;
        height: auto !important;
        width: 90% !important;
    }
}