/* ===================================================================
   1. General & Setup
   =================================================================== */
:root {
    --seacon-primary: #192a51;
    --seacon-primary-dark: #111e3c;
    --text-dark: #1a202c;
    --text-light: #f8fafc;
    --text-muted: #6b7280;
    --bg-light: #ffffff;
    --bg-off-white: #f7fafc;
    --border-color: #e5e7eb;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* ===================================================================
   2. Animations & Helpers
   =================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================================
   3. Header & Navigation
   =================================================================== */
#main-header {
    transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

#main-header.scrolled {
    background-color: #f8f9fa;
    backdrop-filter: blur(10px);
    color: var(--seacon-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* --- Full Screen Navigation --- */
#full-screen-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
    overflow: hidden;
}

#full-screen-nav.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.nav-single {
    width: 100%;
    height: 100%;
    position: relative;
}

.main-nav-toggle {
    cursor: pointer;
    user-select: none;
}

.main-nav-toggle:hover {
    background-color: #f3f4f6;
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.submenu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu-content:not(.hidden) {
    max-height: 2000px;
}

.sub-nav-link {
    display: flex;
    align-items: center;
    color: var(--text-dark);
    transition: all 0.3s;
    text-decoration: none;
}

.sub-nav-link:hover {
    color: var(--seacon-primary);
}

.sub-nav-link span {
    flex-grow: 1;
}

.sub-nav-link.with-logo {
    gap: 0.75rem;
}

.nav-business-logo {
    height: 48px;
    width: 64px;
    object-fit: contain;
    flex-shrink: 0;
}


/* ===================================================================
   4. Component Styles (Cards, Buttons, Forms)
   =================================================================== */

/* --- Business Section Cards --- */
.business-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05);
    text-align: center;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease-out;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border-color);
}

.business-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    border-color: var(--seacon-primary);
}

.business-logo {
    height: 60px;
    width: auto;
    margin: 0 auto 1rem auto;
    object-fit: contain;
}

.business-year {
    display: block;
    font-size: 0.875rem;
    color: var(--seacon-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.business-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    flex-grow: 1;
    color: var(--text-dark);
}

.business-description {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* --- News Card Styles --- */
.news-card {
    display: block;
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: box-shadow 0.3s ease;
}

.news-card:hover {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.news-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
}

.news-card:hover .news-card-image {
    transform: scale(1.05);
}

.news-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.1) 70%, transparent 100%);
    color: var(--text-light);
    transition: background 0.3s ease;
}

.news-card:hover .news-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.news-card-content {}

.news-date {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.news-card-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    background-color: var(--bg-light);
    color: var(--seacon-primary);
    border-radius: 9999px;
    padding: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.news-card:hover .news-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Stat Card --- */
.stat-card {
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    border-right: 2px solid rgba(255, 255, 255, 0.2);
}

/* --- Form Input --- */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 42, 81, 0.3);
    border-color: var(--seacon-primary);
}

/* ===================================================================
   5. Responsive Styles
   =================================================================== */

/* --- Mobile & Tablet Navigation Styles --- */
@media (max-width: 1024px) {
    #full-screen-nav {
        position: fixed;
    }

    .nav-single {
        overflow-y: auto;
    }
}

/* --- Stat Card on Mobile --- */
@media (max-width: 767px) {
    .stat-card {
        border-left: none;
        border-right: none;
        padding-bottom: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .stat-card:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

/* --- Back to Top Button --- */
#back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--seacon-primary);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top-btn:hover {
    background-color: var(--seacon-primary-dark);
}

/* ... (existing styles) ... */

/* ===================================================================
   6. Timeline Page Styles
   =================================================================== */
.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background-color: #cbd5e0;
    margin-left: -1.5px;
}

.timeline-block {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.timeline-spacer {
    width: calc(50% - 1rem);
}

.timeline-dot {
    z-index: 10;
    display: flex;
    align-items: center;
    background-color: var(--seacon-primary);
    box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
}

.timeline-content {
    width: calc(50% - 1rem);
}

.timeline-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* --- Responsive Timeline --- */
@media (max-width: 768px) {
    .timeline-line {
        left: 2rem;
    }

    .timeline-block {
        justify-content: flex-start;
        /* Align all items to the left */
        flex-direction: row !important;
        /* Force direction */
    }

    .timeline-spacer {
        display: none;
        /* Hide the spacer div */
    }

    .timeline-dot {
        position: absolute;
        left: 2rem;
        margin-left: -1.75rem;
        /* Center the dot on the line */
    }

    .timeline-content {
        width: 100%;
        padding-left: 5rem;
        /* Space for the line and dot */
    }
}