:root {
    --primary-dark: #05101c;
    --secondary-dark: #0a1b2a;
    --accent-gold: #c5a059;
    --accent-silver: #e0e0e0;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--primary-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--accent-silver);
}

h2.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 1rem;
}

h2.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 16, 28, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--accent-gold);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Темне накладення для читабельності тексту */
    z-index: -1;
}

.hero-content {
    z-index: 1;
    padding: 0 20px;
    position: relative;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to bottom, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-gold);
    margin-bottom: 2rem;
}

.btn-gold {
    display: inline-block;
    padding: 1rem 3rem;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-top: 2rem;
}

.btn-gold:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

/* Sections */
.section {
    padding: 6rem 0;
}

.history {
    background-color: var(--secondary-dark);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    height: 280px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent-gold);
}

/* Olympic & Titanic Specs */
.olympic-specs {
    background-color: var(--primary-dark);
}

.blueprint-container {
    width: 100%;
    margin-bottom: 3rem;
    border: 1px solid #1a3a54;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9); /* In case image has transparency */
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    padding: 10px;
}

.titanic-blueprint-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    object-position: top; /* This ensures the top side-profile part of the blueprint remains visible if cropped */
    display: block;
    filter: sepia(0.2) contrast(1.1); /* Adds a slight vintage blueprint feel */
}

.specs-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.spec-card {
    background: #0d2133;
    padding: 2rem;
    border: 1px solid #1a3a54;
}

.spec-card h4 {
    margin-bottom: 1rem;
    color: var(--accent-gold);
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 0.5rem;
}

.spec-card ul {
    list-style: none;
}

.spec-card li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.spec-card strong {
    color: var(--text-primary);
}

/* RMS Olympic Cabins */
.cabins-block {
    margin-top: 3rem;
}

.cabins-title {
    text-align: center;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cabins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cabin-card {
    background: #0d2133;
    border: 1px solid #1a3a54;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cabin-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.cabin-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.cabin-content {
    padding: 1rem 1.2rem 1.3rem;
}

.cabin-content h4 {
    color: var(--accent-silver);
    margin-bottom: 0.6rem;
}

.cabin-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Liners Cards */
.liners-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.liner-card {
    background: #0d2133;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.liner-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-image {
    height: 200px;
    background-color: #222;
    position: relative;
    /* In real use, use <img> tags, but here using div for layout */
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
}

.card-content .meta {
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-style: italic;
}

.facts {
    list-style: none;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
}

/* Table */
.comparison {
    background: #081624;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

tr:hover td {
    background-color: rgba(197, 160, 89, 0.05);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--accent-gold);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger active state */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Tablet */
@media (max-width: 1024px) {
    h2.section-title {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 4rem 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(5, 16, 28, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 1000;
        border-left: 1px solid rgba(197, 160, 89, 0.2);
    }

    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }

    .specs-wrapper {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero .description {
        font-size: 0.9rem;
    }

    .btn-gold {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
    
    .cabin-card img {
        height: 180px;
    }
    
    .card-image {
        height: 180px;
    }
    
    .history-item {
        padding: 1.5rem;
    }
}

/* Vertical Timeline */
.timeline-section {
    background: #06121f;
    padding: 6rem 0;
}

.vertical-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.vertical-timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent-gold), var(--accent-gold), transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.v-timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.v-timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--primary-dark);
    border: 3px solid var(--accent-gold);
    border-radius: 50%;
    top: 32px;
    z-index: 1;
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.5);
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::after {
    right: -10px;
}

.right::after {
    left: -10px;
}

.v-timeline-content {
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.v-timeline-content:hover {
    background: rgba(197, 160, 89, 0.05);
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.v-year {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-gold);
    color: var(--primary-dark);
    font-weight: bold;
    border-radius: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(197, 160, 89, 0.3);
}

.v-timeline-content h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: var(--accent-silver);
}

.v-timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.v-timeline-image {
    margin-top: 15px;
    width: 100%;
    height: 180px;
    border-radius: 6px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05); /* Placeholder background */
    border: 1px dashed rgba(197, 160, 89, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v-timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.v-timeline-item:hover .v-timeline-image img {
    transform: scale(1.05);
}

@media screen and (max-width: 768px) {
    .vertical-timeline::after {
        left: 31px;
    }
    
    .v-timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }
    
    .left::after, .right::after {
        left: 21px;
    }
    
    .right {
        left: 0;
    }
}

/* Future Section */
.future {
    background: linear-gradient(to bottom, #05101c, #000);
}

.future-content {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.future-card {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    padding: 2rem;
    width: 300px;
    text-align: center;
}

.future-card h4 {
    color: #00e5ff;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.future-card-long {
    width: 100%;
    max-width: 964px; /* 300*3 + 2rem*2 gap approx */
    padding: 3rem 2rem;
}

footer {
    text-align: center;
    padding: 2rem;
    background: #02060b;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}