/* VKAZU Website Styles
   Based on the Verkehrskadetten Design System v1.0.0
   https://marke.verkehrskadetten.ch */

:root {
    /* Brand palette */
    --orange: #ff6300;
    --black: #1a1a1a;
    --blue: #2F5D77;
    --off-white: #f8f8f8;

    /* Functional colors */
    --border: #eeeeee;
    --text-muted: #777777;
    --success: #2d7a4f;
    --success-bg: #f0faf4;
    --error: #c0392b;
    --error-bg: #fef5f5;
    --orange-tint: #fff4ee;

    /* Legacy aliases (used in inline styles across pages) */
    --primary-color: var(--blue);
    --primary-dark: var(--black);
    --primary-light: var(--blue);
    --secondary-color: var(--off-white);
    --accent-color: var(--orange);
    --text-color: var(--black);
    --text-light: var(--text-muted);
    --white: #ffffff;
    --shadow: none;
    --border-radius: 10px;

    /* Layout */
    --nav-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
}

@supports (font-variation-settings: normal) {
    body {
        font-family: 'InterVariable', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    }
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
}

/* Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 28px;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    transition: color 0.15s ease, border-color 0.15s ease;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--orange);
    border-bottom-color: var(--orange);
}

/* Dropdown Menu */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.15s ease;
    min-width: 220px;
    z-index: 1001;
    overflow: hidden;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--black);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
    background-color: var(--orange-tint);
    color: var(--orange);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--black);
    cursor: pointer;
}

/* Main Content */
.main-content {
    margin-top: var(--nav-height);
}

/* Hero Section */
.hero {
    background:
        linear-gradient(rgba(26, 26, 26, 0.65), rgba(26, 26, 26, 0.65)),
        url('../images/homepage-header.png') center/cover;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.15rem;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.65;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--orange);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--black);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--white);
    margin-left: 15px;
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--black);
}

/* Button Color Variants */
.btn-primary {
    background: var(--black);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--orange);
}

.btn-primary-dark {
    background: var(--black);
    color: var(--white);
}

.btn-primary-dark:hover {
    background: var(--orange);
}

.btn-primary-light {
    background: var(--blue);
    color: var(--white);
}

.btn-primary-light:hover {
    background: var(--orange);
}

.btn-accent {
    background: var(--orange);
    color: var(--white);
}

.btn-accent:hover {
    background: var(--black);
}

.btn-white {
    background: var(--white);
    color: var(--black);
    border: 2px solid var(--black);
}

.btn-white:hover {
    background: var(--black);
    color: var(--white);
}

.btn-secondary-bg {
    background: var(--off-white);
    color: var(--black);
    border: 2px solid var(--black);
}

.btn-secondary-bg:hover {
    background: var(--black);
    color: var(--white);
}

/* Button Outline Variants */
.btn-outline-primary {
    background: transparent;
    color: var(--black);
    border: 2px solid var(--black);
}

.btn-outline-primary:hover {
    background: var(--black);
    color: var(--white);
}

.btn-outline-accent {
    background: transparent;
    color: var(--orange);
    border: 2px solid var(--orange);
}

.btn-outline-accent:hover {
    background: var(--orange);
    color: var(--white);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--black);
}

/* Button Size Variants */
.btn-sm {
    padding: 8px 20px;
    font-size: 11px;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 14px;
}

.btn-xl {
    padding: 20px 50px;
    font-size: 15px;
}

/* Button Block */
.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Sections */
.section {
    padding: 64px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 2rem;
    color: var(--black);
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1.15;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.65;
}

/* Section label (eyebrow) */
.section-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--orange);
    margin-bottom: 12px;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

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

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

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--orange);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 24px;
}

.card-title {
    font-size: 1.15rem;
    color: var(--black);
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.card-text {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* Vehicle Cards */
.vehicle-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.vehicle-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    height: 300px;
    background: var(--off-white);
}

.vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.vehicle-info {
    padding: 24px;
    flex-grow: 1;
    background: var(--white);
}

.vehicle-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
    line-height: 1.3;
}

.vehicle-type {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 20px;
    font-size: 0.9375rem;
}

.vehicle-specs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vehicle-specs li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
}

.vehicle-specs li:last-child {
    border-bottom: none;
}

/* Vehicles Grid Layout */
.vehicles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Team Member Styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.team-member {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.team-member:hover {
    transform: translateY(-2px);
    border-color: var(--orange);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.member-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 10px;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
}

.member-role {
    font-size: 11px;
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.member-description {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Contact Info */
.contact-info {
    background: var(--off-white);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.contact-item h3 {
    color: var(--black);
    margin-bottom: 15px;
    font-size: 1.15rem;
    font-weight: 700;
}

.contact-item p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
    transition: border-color 0.15s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--orange);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--blue);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table tr:hover {
    background: var(--off-white);
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-logo img {
    height: 56px;
    width: auto;
    margin-bottom: 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.footer-section p,
.footer-section a {
    color: #888;
    font-size: 14px;
    line-height: 1.7;
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
    transition: color 0.15s ease;
}

.footer-section a:hover {
    color: var(--orange);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #555;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none !important;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        overflow-y: auto;
        z-index: 1001;
        transition: none !important;
        transform: none !important;
        height: auto !important;
        min-height: calc(100vh - var(--nav-height)) !important;
        border-top: 1px solid var(--border);
    }

    .nav-menu.active {
        display: flex !important;
    }

    /* Prevent body scroll when mobile menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .nav-item {
        margin: 10px 0;
    }

    .nav-item > .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 15px;
    }

    .nav-item.has-dropdown > .nav-link::after {
        content: '▼';
        font-size: 0.8rem;
        transition: transform 0.15s ease;
    }

    .nav-item.has-dropdown.open > .nav-link::after {
        transform: rotate(180deg);
    }

    .dropdown {
        display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--off-white);
        margin-top: 10px;
        border-radius: 5px;
        overflow: hidden;
    }

    .dropdown.show {
        display: block;
    }

    .dropdown .dropdown-item {
        display: block;
        padding: 12px 15px;
        color: var(--black);
        text-decoration: none;
        border-bottom: 1px solid var(--border);
    }

    .dropdown .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown .dropdown-item:hover {
        background: var(--orange-tint);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .section {
        padding: 48px 0;
    }

    .section-title {
        font-size: 1.625rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-images {
        grid-template-columns: 1fr 1fr;
        height: 250px;
    }

    .vehicles-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    /* Button spacing for mobile - small margin to prevent stacked buttons from touching */
    .btn {
        margin: 5px 0;
    }

    .member-photo {
        width: 100px;
        height: 100px;
    }

    /* Table to Card Layout on Mobile */
    .table {
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    .table tr {
        border: 1px solid var(--border);
        border-radius: 10px;
        display: block;
        margin-bottom: 20px;
        padding: 20px;
        background: var(--white);
    }

    .table tr:hover {
        background: var(--white);
        border-color: var(--orange);
    }

    .table td {
        border: none;
        border-bottom: 1px solid var(--border);
        display: block;
        font-size: 0.9375rem;
        text-align: left !important;
        padding: 8px 0;
        position: relative;
        padding-left: 40%;
        word-wrap: break-word;
    }

    .table td:last-child {
        border-bottom: none;
    }

    .table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 0;
        width: 35%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.8rem;
        letter-spacing: 0.08em;
    }

    /* Card header for table rows */
    .table tr td:first-child {
        background: var(--off-white);
        font-weight: 700;
        color: var(--black);
        margin: -20px -20px 15px -20px;
        padding: 15px 20px;
        border-radius: 10px 10px 0 0;
        font-size: 1.05rem;
        position: relative;
        padding-left: 20px;
    }

    .table tr td:first-child:before {
        display: none;
    }

    /* Responsive table wrapper */
    .table-responsive {
        overflow-x: visible;
    }

    /* Section Headers with Icons - Mobile Styles */
    .section-header + div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center !important;
    }

    .section-header + div[style*="display: flex"] .section-header {
        order: 2;
        margin: 0 !important;
        text-align: center !important;
    }

    .section-header + div[style*="display: flex"] div[style*="flex-shrink: 0"] {
        order: 1;
        align-self: center;
    }

    .section-header + div[style*="display: flex"] div[style*="flex-shrink: 0"] img {
        height: 120px !important;
        width: auto !important;
    }

    /* Alternative approach for sections with the flex container */
    div[style*="display: flex"][style*="align-items: center"][style*="gap: 30px"] {
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center !important;
    }

    div[style*="display: flex"][style*="align-items: center"][style*="gap: 30px"] .section-header {
        order: 2;
        margin: 0 !important;
        text-align: center !important;
    }

    div[style*="display: flex"][style*="align-items: center"][style*="gap: 30px"] div[style*="flex-shrink: 0"] {
        order: 1;
        align-self: center;
    }

    div[style*="display: flex"][style*="align-items: center"][style*="gap: 30px"] div[style*="flex-shrink: 0"] img {
        height: 120px !important;
        width: auto !important;
        opacity: 0.9 !important;
    }

    /* Ensure section titles and subtitles are properly sized on mobile */
    div[style*="display: flex"] .section-header .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 10px !important;
    }

    div[style*="display: flex"] .section-header .section-subtitle {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--orange);
}

.bg-primary {
    background: var(--blue);
    color: var(--white);
}

.bg-secondary {
    background: var(--off-white);
}

.mt-0 { margin-top: 0; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

.hidden {
    display: none;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}
