/*
Theme Name: RS500 KGF Style
Description: RS500 registry theme with KGF-style layout (Upgraded)
Author: Ethan
Version: 1.1
*/

/* Google Font – Open Sans */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

/* Base */
body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: #222;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    color: #004999;
    text-decoration: underline;
}

/* Container spacing */
.container {
    max-width: 1200px;
}

/* Header */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    margin-bottom: 0;
    position: relative;
    z-index: 9999;
}

.site-header .site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.site-header .site-tagline {
    font-size: 14px;
    color: #777;
}

/* Footer */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 14px;
    color: #777;
}

/* Buttons */
.btn-primary {
    background-color: #0066cc;
    border-color: #0066cc;
}

.btn-primary:hover {
    background-color: #004999;
    border-color: #004999;
}

/* Price badge */
.vehicle-price .badge {
    background-color: #28a745 !important;
}

/* ===================================================== */
/* VEHICLE GALLERY (Upgraded for GLightbox)               */
/* ===================================================== */

.vehicle-gallery {
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.vehicle-gallery-main img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: transform 0.25s ease;
}

.vehicle-gallery-main img:hover {
    transform: scale(1.02);
}

.vehicle-gallery-thumbs {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vehicle-gallery-thumbs img {
    width: 100px;
    height: auto;
    border-radius: 3px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.vehicle-gallery-thumbs img:hover {
    transform: scale(1.05);
    border-color: #0066cc;
}

/* GLightbox caption styling */
.glightbox-clean .gdesc-inner {
    font-size: 15px;
    line-height: 1.5;
    color: #f1f1f1;
}

.glightbox-clean .gslide-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

/* Enquiry box */
.vehicle-enquiry-box {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.vehicle-enquiry-box h4 {
    margin-bottom: 10px;
}

/* Summary */
.vehicle-summary {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
}

/* Description */
.vehicle-description {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
}

/* Specs table */
.vehicle-specs {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
}

.vehicle-specs table {
    margin-bottom: 0;
}

/* Archive cards (For Sale grid) */
.card {
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.card-img-top {
    border-bottom: 1px solid #e0e0e0;
}

.card-body {
    background-color: #ffffff;
}

/* Alerts */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Form */
.rs500-enquiry-form .form-label {
    font-weight: 600;
}

/* Spacing tweaks */
.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

/* Slider Fixes */
#rs500Slider {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.slider-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 6;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Caption Readability */
.carousel-caption {
    background: rgba(0, 0, 0, 0.55);
    padding: 20px;
    border-radius: 6px;
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 1;
}

.carousel-caption h2,
.carousel-caption p {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* Header Overlay Fix */
header.site-header {
    z-index: 10;
    position: relative;
}

.slider *[class*="caption"],
.carousel *[class*="caption"],
.banner *[class*="caption"],
.hero *[class*="caption"] {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    background: rgba(0,0,0,0.55);
    padding: 20px;
    border-radius: 6px;
}

header.site-header {
    position: relative !important;
    z-index: 9999 !important;
}

.slider,
.carousel,
.banner,
.hero {
    position: relative !important;
    z-index: 1 !important;
}

/* ===================================================== */
/* WORDPRESS GALLERY + GLIGHTBOX FIX                     */
/* ===================================================== */

.gallery-item,
.gallery-icon {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
}

.gallery-icon a {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
}

.glightbox-container .gslide-media {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.glightbox-container .gslide-media img {
    max-width: calc(100vw - 40px) !important;
    max-height: calc(100vh - 40px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* ===================================================== */
/* RS500 HAMBURGER MENU (Right-Aligned Dropdown)         */
/* ===================================================== */

/* Hamburger icon */
.rs500-hamburger {
    width: 30px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: auto;
}

.rs500-hamburger span {
    height: 3px;
    background: #000;
    border-radius: 3px;
    transition: 0.3s;
}

/* Dropdown menu (hidden by default) */
.rs500-dropdown {
    display: none;
    position: absolute;
    right: 20px;
    top: 80px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 10px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 9999;
    border-radius: 4px;
}

/* Menu items */
.rs500-dropdown .rs500-menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rs500-dropdown .rs500-menu-items li {
    padding: 10px 20px;
}

.rs500-dropdown .rs500-menu-items li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    display: block;
}

.rs500-dropdown .rs500-menu-items li a:hover {
    background: #f5f5f5;
}

/* Show dropdown when active */
.rs500-dropdown.active {
    display: block;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .rs500-dropdown {
        right: 10px;
        top: 70px;
    }
}

/* ===================================================== */
/* RS500 HAMBURGER MENU — ANIMATIONS + BACKDROP + FIXED  */
/* ===================================================== */

/* Fixed header */
.site-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(4px);
}

/* Backdrop overlay */
.rs500-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rs500-backdrop.active {
    display: block;
    opacity: 1;
}

/* Slide-down animation */
.rs500-dropdown {
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.25s ease;
}

.rs500-dropdown.active {
    transform: translateY(0);
    opacity: 1;
}

/* Hamburger → X animation */
.rs500-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.rs500-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.rs500-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}
