:root {
    --guide-bg: var(--surface);
    --guide-text: var(--text-secondary);
    --guide-title: var(--text-primary);
    --guide-border: var(--border-light);
}

[data-theme="dark"] {
    --guide-bg: var(--surface-2);
}

.guide-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.guide-hero {
    text-align: center;
    padding: 3rem 1rem;
    background-color: var(--guide-bg);
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    border: 1px solid var(--guide-border);
}

.hero-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.guide-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--guide-title);
    margin-bottom: 0.75rem;
}

.guide-hero .subtitle {
    font-size: 1.1rem;
    color: var(--guide-text);
    max-width: 600px;
    margin: 0 auto;
}

.guide-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
    background-color: var(--background);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--guide-border);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: var(--guide-bg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    color: var(--guide-title);
    transition: var(--transition);
    border: 2px solid transparent;
}

.checklist-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.checklist-number {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.guide-section {
    padding: 2.5rem;
    background-color: var(--background);
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    border: 1px solid var(--guide-border);
    scroll-margin-top: 2rem;
}

.guide-section h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--guide-title);
}

.guide-section h2 .step-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
}

[data-theme="dark"] .guide-section h2 .step-badge {
     background: var(--surface-2);
     color: var(--text-primary);
}


.guide-section p {
    color: var(--guide-text);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.do-dont-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.do-dont-container.single-column {
    grid-template-columns: 1fr;
}


.do-list h3, .dont-list h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.do-list h3 { color: var(--success-color); }
.dont-list h3 { color: var(--danger-color); }

.do-list ul, .dont-list ul {
    list-style: none;
    padding: 0;
}

.do-list li, .dont-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    position: relative;
    padding-inline-start: 2.5rem; /* Increased padding for icon */
    text-align: start; /* Ensure text aligns left in LTR */
}

html[dir="rtl"] .do-list li, 
html[dir="rtl"] .dont-list li {
    text-align: right; /* Ensure text aligns right in RTL */
}


.do-list li { background-color: #f0fdf4; border-left: 4px solid var(--success-color); }
.dont-list li { background-color: #fef2f2; border-left: 4px solid var(--danger-color); }

html[dir="rtl"] .do-list li, html[dir="rtl"] .dont-list li {
    border-left: none;
    border-right: 4px solid;
}
html[dir="rtl"] .do-list li { border-right-color: var(--success-color); }
html[dir="rtl"] .dont-list li { border-right-color: var(--danger-color); }

[data-theme="dark"] .do-list li { background-color: #166534; color: #d1fae5; }
[data-theme="dark"] .dont-list li { background-color: #991b1b; color: #fee2e2; }


.do-list li::before, .dont-list li::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 14px;
    inset-inline-start: 1rem;
}
.do-list li::before { content: '\f00c'; color: var(--success-color); }
.dont-list li::before { content: '\f00d'; color: var(--danger-color); }

.pro-tip {
    background: #fefce8;
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 2rem;
}

html[dir="rtl"] .pro-tip {
    border-left: none;
    border-right: 4px solid var(--accent-color);
}

[data-theme="dark"] .pro-tip {
    background-color: #78350f;
    color: #fef3c7;
}

.pro-tip h4 {
    color: #b45309;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
[data-theme="dark"] .pro-tip h4 {
    color: #fef3c7;
}

.formula-box {
    background: var(--primary-light);
    border: 2px dashed var(--primary-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-dark);
    position: relative;
}

[data-theme="dark"] .formula-box {
     background: var(--surface-2);
     color: var(--text-primary);
}


.copy-btn {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
}

.copy-btn .fa-copy { display: inline; }
.copy-btn .fa-check { display: none; }
.copy-btn.copied .fa-copy { display: none; }
.copy-btn.copied .fa-check { display: inline; }

.guide-img {
    width: 100%;
    max-width: 500px;
    margin: 1.5rem auto;
    display: block;
    border-radius: var(--radius-lg);
    border: 1px solid var(--guide-border);
}

@media (max-width: 768px) {
    .guide-hero h1 { font-size: 1.75rem; }
    .guide-hero .subtitle { font-size: 1rem; }
    .guide-section { padding: 1.5rem; }
    .guide-section h2 { font-size: 1.5rem; }
    .do-dont-container { grid-template-columns: 1fr; }
}

/* === Styles specific to Interview Guide === */
.formula-box.star-method {
    text-align: start;
    padding: 2rem;
    background-color: var(--surface);
}

html[dir="rtl"] .formula-box.star-method {
    text-align: right;
}

html[dir="ltr"] .formula-box.star-method {
    text-align: left;
}

.formula-box.star-method div {
    position: relative;
    padding-inline-start: 3rem;
    font-weight: normal;
    font-size: 1rem;
    color: var(--text-secondary);
}

.formula-box.star-method div:not(:last-child) {
    margin-bottom: 1.5rem;
}

.formula-box.star-method div strong {
    position: absolute;
    inset-inline-start: 0;
    top: -2px;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
}

.interactive-details {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: var(--transition);
}
.interactive-details summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none; /* Hide default marker */
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.interactive-details summary::-webkit-details-marker {
    display: none; /* Hide default marker for Safari */
}
.interactive-details summary::after {
    content: '\f078'; /* Font Awesome chevron-down */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    transition: transform 0.3s;
    color: var(--text-tertiary);
}
.interactive-details[open] {
    border-color: var(--primary-color);
}
.interactive-details[open] summary {
    color: var(--primary-color);
}
.interactive-details[open] summary::after {
    transform: rotate(180deg);
}
.details-content {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* === Fix for STAR Method Text Alignment === */
.formula-box.star-method div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.formula-box.star-method div strong {
    position: static;
    flex-shrink: 0;
}

/* === Dark Mode & LTR Fixes === */
[data-theme="dark"] .btn-secondary {
    background: var(--surface-2);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--surface);
}

