/* Luxury Bus Rental SA - Frontend Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: #1a1a1a;
    line-height: 1.6;
    min-height: 100vh;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { color: var(--link); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
    background: var(--primary);
    color: var(--text);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
}
.logo-icon { font-size: 1.6rem; }
.main-nav {
    display: flex;
    gap: 28px;
}
.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.9;
}
.main-nav a:hover { opacity: 1; color: var(--accent); }
.header-cta { white-space: nowrap; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent {
    background: var(--accent);
    color: var(--primary);
}
.btn-primary {
    background: var(--primary);
    color: var(--text);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text);
    padding: 80px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 70px 0; }
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 12px;
    color: var(--primary);
}
.section-sub {
    text-align: center;
    color: #555;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Fleet cards */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}
.bus-card {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.bus-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.bus-card-img {
    height: 200px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}
.bus-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.bus-card-body { padding: 20px; }
.bus-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary);
}
.bus-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}
.bus-meta span {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 20px;
}
.bus-card p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Features strip */
.features {
    background: var(--primary);
    color: var(--text);
    padding: 50px 0;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}
.feature-item h4 { margin: 12px 0 6px; color: var(--accent); }
.feature-item p { font-size: 0.9rem; opacity: 0.85; }

/* Forms */
.form-card {
    background: var(--card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #333;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-section-title {
    font-size: 1.1rem;
    color: var(--primary);
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}
.required::after { content: ' *'; color: #e74c3c; }

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Bus detail */
.bus-detail-hero {
    background: var(--primary);
    color: var(--text);
    padding: 40px 0;
}
.bus-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}
.bus-gallery {
    border-radius: 12px;
    overflow: hidden;
    background: #eee;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}
.bus-gallery img { width: 100%; height: 100%; object-fit: cover; }
.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.feature-list li::before {
    content: '✓ ';
    color: var(--accent);
    font-weight: bold;
}

/* Calendar availability */
.availability-calendar {
    background: var(--card);
    padding: 24px;
    border-radius: 12px;
    margin-top: 24px;
}
.cal-month { font-weight: 600; margin-bottom: 12px; }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    font-size: 0.85rem;
}
.cal-day {
    padding: 8px 4px;
    border-radius: 6px;
}
.cal-day.booked { background: #f8d7da; color: #721c24; }
.cal-day.available { background: #d4edda; color: #155724; }
.cal-day.header { font-weight: 600; background: transparent; }

/* Footer */
.site-footer {
    background: var(--primary);
    color: var(--text);
    padding: 50px 0 20px;
    margin-top: 60px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h3, .footer-col h4 {
    color: var(--accent);
    margin-bottom: 14px;
}
.footer-col a {
    display: block;
    color: var(--text);
    opacity: 0.85;
    margin-bottom: 8px;
}
.footer-col p { opacity: 0.85; font-size: 0.95rem; margin-bottom: 6px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 20px;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Page header */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text);
    padding: 50px 0;
    text-align: center;
}
.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
}

/* Safe rich text on cards / pages */
.card-body-html p { margin: 0 0 0.6em; }
.card-body-html p:last-child { margin-bottom: 0; }
.card-body-html ul, .card-body-html ol { margin: 0.4em 0 0.6em 1.2em; }
.card-body-html a { text-decoration: underline; }
.hero-intro { max-width: 600px; margin: 0 auto 28px; opacity: 0.92; }
.hero-intro p { margin-bottom: 0.5em; }

/* Card media — kept small (~30% of typical card height) so text stays dominant */
.card-media {
    margin: 0 0 12px;
    max-height: 72px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-media img {
    max-height: 72px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}
.card-media-sm {
    max-height: 56px;
    margin-bottom: 10px;
}
.card-media-sm img {
    max-height: 56px;
    max-width: 120px;
}
.feature-item .card-media {
    margin-left: auto;
    margin-right: auto;
}

/* Classic layout tweaks */
.layout-classic .hero {
    padding: 56px 0 64px;
    text-align: left;
}
.layout-classic .hero .container { max-width: 900px; }
.layout-classic .hero-actions { justify-content: flex-start; }

/* ========== Bento Grid Rise layout ========== */
.layout-bento-grid-rise .site-header {
    background: var(--card);
    color: #1a1a1a;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.layout-bento-grid-rise .logo,
.layout-bento-grid-rise .main-nav a {
    color: #1a1a1a;
}
.layout-bento-grid-rise .main-nav a:hover { color: var(--primary); }
.layout-bento-grid-rise .nav-toggle { color: #1a1a1a; }
.layout-bento-grid-rise .btn-accent {
    color: #fff;
}
.layout-bento-grid-rise .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}
.layout-bento-grid-rise .site-footer {
    background: #1a1a1a;
}

.bento-hero {
    padding: 40px 0 20px;
}
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 16px;
}
.bento-cell {
    background: var(--card);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bento-cell:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.bento-hero-main {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(145deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.bento-hero-main h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    line-height: 1.2;
    margin: 12px 0 16px;
}
.bento-hero-main p {
    opacity: 0.92;
    margin-bottom: 24px;
    max-width: 420px;
}
.bento-kicker {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
}
.bento-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.bento-stat-accent {
    background: linear-gradient(145deg, var(--accent), var(--secondary));
    color: var(--text);
}
.bento-icon { font-size: 1.8rem; margin-bottom: 10px; }
.bento-stat h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: inherit;
}
.bento-stat p {
    font-size: 0.88rem;
    opacity: 0.85;
    margin: 0;
}
.bento-hero-main .btn-outline {
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}

/* Bento fleet cards */
.bento-fleet {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 16px;
}
.bento-bus-card {
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bento-bus-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
    opacity: 1;
}
.bento-wide {
    grid-column: span 2;
}
.bento-tall {
    grid-row: span 2;
}
.bento-tall .bento-bus-img { flex: 1; min-height: 200px; }
.bento-bus-img {
    height: 160px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.bento-bus-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bento-bus-placeholder { font-size: 3rem; }
.bento-bus-body { padding: 18px 20px 22px; }
.bento-bus-body h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 8px;
}
.bento-bus-body p {
    font-size: 0.88rem;
    color: #555;
    margin-top: 8px;
}

.bento-cta { padding-top: 20px; }
.bento-cta-card {
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    color: var(--text);
    border-radius: 24px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.bento-cta-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 12px;
}
.bento-cta-card p {
    opacity: 0.9;
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 900px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-hero-main { grid-column: span 2; }
    .bento-fleet { grid-template-columns: 1fr 1fr; }
    .bento-wide { grid-column: span 2; }
    .bento-tall { grid-row: span 1; }
}
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }
    .layout-bento-grid-rise .main-nav { background: var(--card); }
    .main-nav.open { display: flex; }
    .nav-toggle { display: block; }
    .header-cta { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .bus-detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .feature-list { grid-template-columns: 1fr; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-hero-main { grid-column: span 1; grid-row: span 1; }
    .bento-fleet { grid-template-columns: 1fr; }
    .bento-wide { grid-column: span 1; }
}

/* Hero sliding gallery (~30% of hero card) */
.hero-slide-gallery {
    position: relative;
    width: 100%;
    max-height: 30%;
    height: 120px;
    margin: 16px 0 20px;
    overflow: hidden;
    border-radius: 12px;
}
.hero-slide-gallery-wide { height: 140px; max-width: 520px; margin-left: auto; margin-right: auto; }
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Card image placement + text wrap */
.card-img-top-left { float: left; margin: 0 12px 8px 0; }
.card-img-top-right { float: right; margin: 0 0 8px 12px; }
.card-img-bottom-left { float: left; margin: 8px 12px 0 0; clear: left; }
.card-img-bottom-right { float: right; margin: 8px 0 0 12px; clear: right; }
.feature-item::after, .bento-stat::after { content: ""; display: table; clear: both; }

/* Bus detail gallery */
.bus-gallery { position: relative; }
.bus-gallery-slider { position: relative; overflow: hidden; border-radius: 12px; background: #f0f0f0; min-height: 220px; }
.bus-gallery-slider img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    display: none;
}
.bus-gallery-slider img.active { display: block; }
.bus-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.bus-gallery-thumbs button {
    border: 2px solid transparent;
    padding: 0;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
}
.bus-gallery-thumbs button.active { border-color: var(--accent); }
.bus-gallery-thumbs img { width: 64px; height: 48px; object-fit: cover; display: block; }
.bus-card-img img { width: 100%; height: 100%; object-fit: cover; }

/* Footer credit */
.site-credit { text-align: center; padding: 12px 0 20px; font-size: 0.75rem; color: #888; }
.site-credit a { color: inherit; text-decoration: none; }
