/* ===========================
   CSS Custom Properties
   =========================== */
:root {
    --primary: #c1121f;
    --primary-dark: #9b0d18;
    --dark: #0f172a;
    --text: #374151;
    --text-light: #6b7280;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e5e7eb;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 20px rgba(0,0,0,0.07);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.14);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 68px;
}

/* ===========================
   Base
   =========================== */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img { max-width: 100%; display: block; }

/* ===========================
   Header
   =========================== */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--dark);
    text-decoration: none;
}

.logo span { color: var(--primary); }

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 4px;
    background: none;
    border: none;
}

.burger span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    display: block;
    border-radius: 2px;
    transition: var(--transition);
}

/* Nav */
nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

nav a:hover {
    background: rgba(193, 18, 31, 0.07);
    color: var(--primary);
}

nav a:last-child {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    font-weight: 600;
    margin-left: 6px;
}

nav a:last-child:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(193, 18, 31, 0.3);
}

/* ===========================
   Hero
   =========================== */
.hero {
    position: relative;
    margin-top: 0;
    height: 65vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.55) 100%);
    z-index: 1;
}

.homepage .hero {
    height: 92vh;
    background: url('../images/WZyachten_bild.jpeg') center/cover no-repeat;
}

.hidea-page .hero {
    height: 70vh;
    background: url('../images/Hidea_Motors.jpg') center/cover no-repeat;
}

.ranieri-page .hero {
    height: 62vh;
    background: url('../images/ranieri.jpg') center/cover no-repeat;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    max-width: 760px;
}

.hero-content h1 {
    font-size: clamp(34px, 6vw, 70px);
    font-weight: 800;
    margin: 0 0 18px;
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-shadow: 0 2px 30px rgba(0,0,0,0.25);
}

.hero-content p {
    font-size: clamp(16px, 2.2vw, 21px);
    opacity: 0.88;
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.btn-hero {
    font-size: 16px;
    padding: 14px 30px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 30px rgba(193, 18, 31, 0.4);
}

.btn-hero:hover {
    background: var(--primary-dark);
    box-shadow: 0 12px 40px rgba(193, 18, 31, 0.5);
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-scroll::after {
    content: '';
    width: 1px;
    height: 44px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.5; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.15); }
}

/* Small Hero (Kontakt, Subpages) */
.small-hero {
    height: 42vh;
    min-height: 260px;
}

.small-hero h1 {
    position: relative;
    z-index: 2;
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

/* ===========================
   Sections
   =========================== */
.section {
    padding: 100px 0;
}

.container h2 {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 800;
    color: var(--dark);
    margin-top: 0;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

/* ===========================
   Brand Cards
   =========================== */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

@media (max-width: 768px) {
    .brand-grid { grid-template-columns: 1fr; }
}

.brand-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.brand-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.brand-card .img-wrap {
    overflow: hidden;
}

.brand-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.brand-card:hover img {
    transform: scale(1.05);
}

.brand-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.brand-content h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 10px;
}

.brand-content p {
    color: var(--text-light);
    margin: 0 0 20px;
    flex: 1;
    line-height: 1.7;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(193, 18, 31, 0.3);
}

/* ===========================
   Contact
   =========================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-info {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.contact-info h2 {
    color: var(--dark);
    margin-bottom: 28px !important;
}

.contact-info p {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    margin: 0;
    color: var(--text);
    font-size: 15px;
}

.contact-info p:last-of-type { border-bottom: none; }

.contact-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover { text-decoration: underline; }

.contact-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* ===========================
   Motor Grid
   =========================== */
.motor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

@media (max-width: 1200px) { .motor-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .motor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .motor-grid { grid-template-columns: 1fr; } }

.motor-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.motor-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.motor-card .img-wrap { overflow: hidden; }

.motor-card img {
    width: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.motor-card:hover img { transform: scale(1.05); }

.motor-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.motor-content h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.motor-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
}

.motor-content .btn {
    margin-top: auto;
    padding: 10px 18px;
    font-size: 14px;
    text-align: center;
    justify-content: center;
}

/* ===========================
   News Section
   =========================== */
.news-section {
    background: var(--dark);
    padding: 70px 0;
    color: white;
}

.news-section .container h2 {
    color: white;
    margin-bottom: 8px;
}

.news-heading-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin-bottom: 40px;
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.news-heading {
    display: inline-block;
    white-space: nowrap;
    animation: newsSlide 10s linear infinite;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 3px;
    text-transform: uppercase;
}

@keyframes newsSlide {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

.news-item {
    padding: 22px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.news-item:last-child { border-bottom: none; }

.news-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.news-title {
    font-size: 17px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
}

.news-content {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
}

/* ===========================
   Homepage Layout
   =========================== */
.homepage .main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 36px;
    padding: 70px 0 100px;
}

.homepage .content-left {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.homepage .intro {
    background: var(--card);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.homepage .intro h2 {
    color: var(--primary);
    margin-bottom: 14px !important;
    font-size: 24px !important;
}

.homepage .intro p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
}

.homepage .sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* In the sidebar, override news dark background */
.homepage .sidebar-right .news-section {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 28px;
    overflow: hidden;
}

.homepage .sidebar-right .news-section .container h2,
.homepage .sidebar-right .news-section h2 {
    color: var(--primary) !important;
    font-size: 16px !important;
    margin-bottom: 0 !important;
}

.homepage .sidebar-right .news-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.homepage .sidebar-right .news-title {
    color: var(--dark);
    font-size: 15px;
}

.homepage .sidebar-right .news-content {
    color: var(--text-light);
    font-size: 13px;
}

.homepage .sidebar-right .news-heading-wrapper {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* ===========================
   Weather Widget
   =========================== */
.weather-widget {

    border-radius: var(--radius);
    padding: 28px;
    color: transparent;
}

.weather-widget h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--dark);
    letter-spacing: 0.3px;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.55);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo {
    color: white;
    font-size: 20px;
    display: inline-block;
    margin-bottom: 14px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.75;
    max-width: 280px;
}

.footer-col h4 {
    color: white;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 18px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul li a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-col ul li a:hover { color: white; }

.footer-bottom {
    padding: 22px 0;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom a {
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom a:hover { color: white; }

.footer-links { display: flex; gap: 20px; }

/* ===========================
   Scroll Animations
   =========================== */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   Mobile
   =========================== */
@media (max-width: 900px) {
    .burger { display: flex; }

    nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        display: none;
        padding: 12px;
        gap: 3px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        border-bottom: 1px solid var(--border);
    }

    nav a {
        margin: 0;
        padding: 14px 16px;
        border-radius: var(--radius-sm);
        font-size: 16px;
    }

    nav a:last-child {
        margin-left: 0;
        margin-top: 4px;
        text-align: center;
        justify-content: center;
    }

    nav.active { display: flex; }

    .homepage .main-layout {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 50px 0 70px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .section { padding: 70px 0; }
}

@media (max-width: 600px) {
    .hero-content h1 { letter-spacing: -0.5px; }
    .homepage .intro { padding: 28px; }
    .contact-info { padding: 28px; }
}
