:root {
    --brand-dark-blue: #164863;
    --brand-mid-blue: #427d9d;
    --brand-light-blue: #9bbec8;
    --brand-lightest-blue: #eaf6ff;
    --brand-yellow: #fada34;
    --white: #ffffff;
    --text-dark: #333333;
    --border-radius: 8px;
}

.som-guide-wrapper {
    font-family: 'Lexend', 'DM Sans', sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    padding-bottom: 40px;
}

/* --- ULTRA-SLIM HERO --- */
.som-guide-hero {
    background-color: var(--brand-dark-blue);
    color: var(--white);
    padding: 12px 20px; /* Very tight padding */
    text-align: center;
}
.som-guide-hero h1 { 
    margin: 0; 
    font-size: 1.6rem; /* Smaller font size */
    color: var(--white); 
}

/* --- CLEAN CONTAINER (No Overlap) --- */
.som-guide-container {
    max-width: 1000px; /* Reduced width automatically shrinks video height */
    margin: 20px auto 0; /* Positive margin creates a clean gap below the header */
    display: flex;
    gap: 25px;
    padding: 0 20px;
}

/* --- SIDEBAR --- */
.guide-sidebar {
    width: 260px; /* Slightly narrower to give the video more room */
    flex-shrink: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    height: fit-content;
    overflow: hidden;
}
.sidebar-header {
    background: var(--brand-lightest-blue);
    padding: 10px 15px;
    border-bottom: 1px solid var(--brand-light-blue);
}
.sidebar-header h3 { margin: 0; color: var(--brand-dark-blue); font-size: 1rem; }
.guide-contents-list { list-style: none; margin: 0; padding: 0; }
.guide-contents-list li {
    padding: 10px 15px; /* Tighter padding */
    border-bottom: 1px solid #eee;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 0.9rem; /* Slightly smaller text */
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.guide-contents-list li:hover { background-color: #fdfdfd; }
.guide-contents-list li .step-num { font-weight: bold; color: var(--brand-mid-blue); width: 20px; }
.guide-contents-list li.active {
    background-color: var(--brand-lightest-blue);
    border-left: 4px solid var(--brand-dark-blue);
    font-weight: bold;
    color: var(--brand-dark-blue);
}

/* --- MAIN VIEWER --- */
.guide-viewer {
    flex-grow: 1;
    min-width: 0;
}

/* STACKED MINIMAL HEADER */
.viewer-header-minimal {
    display: flex;
    flex-direction: column; /* Stacks the progress over the title cleanly */
    margin-bottom: 12px;
}
.guide-progress {
    font-size: 0.75rem;
    color: var(--brand-mid-blue);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.viewer-header-minimal h2 { 
    margin: 0; 
    color: var(--brand-dark-blue); 
    font-size: 1.4rem; 
    line-height: 1.1; 
}

/* FLUSH VIDEO CARD */
.video-card {
    background: var(--white);
    padding: 0;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 12px;
    overflow: hidden;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background: #000;
}
.video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* COMBINED FOOTER CARD */
.guide-footer-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    padding: 12px 15px; /* Tighter padding */
}
.guide-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dark);
    margin: 0 0 10px 0; /* Pushes nav row down tightly */
}

/* NAV ROW */
.guide-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.up-next-info {
    text-align: center;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}
.up-next-info:hover {
    background: var(--brand-lightest-blue);
}
.up-next-label { 
    font-size: 0.7rem; 
    color: var(--brand-mid-blue); 
    text-transform: uppercase; 
    font-weight: bold; 
    display: block; 
    margin-bottom: 2px; 
}
.up-next-info strong { 
    color: var(--brand-dark-blue); 
    font-size: 0.9rem; 
}

/* BUTTONS */
.btn { padding: 8px 14px; font-size: 0.9rem; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; border: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background-color: var(--brand-dark-blue); color: var(--white); }
.btn-primary:hover { background-color: var(--brand-mid-blue); }
.btn-secondary { background-color: var(--white); color: var(--brand-dark-blue); border: 1px solid var(--brand-mid-blue); }
.btn-secondary:hover { background-color: var(--brand-lightest-blue); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* MOBILE TOGGLE */
.guide-mobile-toggle {
    display: none;
    width: 100%;
    padding: 10px;
    background: var(--brand-mid-blue);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 15px;
}

/* RESPONSIVE */
@media (max-width: 850px) {
    .som-guide-container { flex-direction: column; gap: 10px; margin-top: 15px; }
    .guide-mobile-toggle { display: block; }
    .guide-sidebar { width: 100%; display: none; }
    .guide-sidebar.open { display: block; }
    .guide-nav-row { flex-direction: column; gap: 15px; }
    .up-next-info { order: -1; margin-bottom: 5px; }
    .btn { width: 100%; justify-content: center; }
}