/* Import Open Sans from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

:root {
    --primary: #006ba5; /* marge */
    --primary-rgb: 0, 107, 165;
    --secondary: #675a95; /* leela */
    --secondary-rgb: 103, 90, 149;
    --accent: #e63478; /* barbie */
    --accent-rgb: 230, 52, 120;
    --highlight: #9ac6dd; /* elsa */
    --highlight-rgb: 154, 198, 221;
    --muted: #7e84ad; /* ursula */
    --soft: #d29db5; /* peppa */
    --light: #f0e0a4; /* belle */
    --warm: #e5b0a7; /* patrick */
    --green: #9bc7a3; /* maleficent */
    --text-primary: #333;
    --text-secondary: #666;
    --border: #e1e4e8;
    --background: #f8f9fa;
    --card-bg: rgba(255, 255, 255, 0.98);
    --success: #9bc7a3; /* maleficent */
    --error: #e63478; /* barbie */
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

@font-face {
	font-family:'fa-light';
	src:url(fonts/fa-light-300.woff2) format('woff2');
	font-weight:normal;
	font-style:normal;
}
@font-face {
	font-family:'fa-solid';
	src:url(fonts/fa-solid-900.woff2) format('woff2');
	font-weight:normal;
	font-style:normal;
}
@font-face {
	font-family:'fa-brands';
	src:url(fonts/fa-brands-400.woff2) format('woff2');
	font-weight:normal;
	font-style:normal;
}

/* Base Styles */
* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-shadow: none !important;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow-y: auto; /* Allow page scrolling */
    overflow-x: hidden;
    background: white;
    height: 100%;
    width: 100%;
}

html {
    height: 100%;
}

/* Link styles */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: rgba(var(--primary-rgb), 0.9);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.secondary-btn {
    background-color: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.secondary-btn:hover {
    background-color: rgba(var(--primary-rgb), 0.05);
    transform: translateY(-2px);
}

.secondary-btn:active {
    transform: translateY(0);
}

/* Container Styles */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* New navigation styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo-link {
    display: inline-block;
}

.nav-logo {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    padding-bottom: 0.25rem;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Split layout for index page */
.split-container {
    display: flex;
    width: 100%;
    position: relative;
    top: 72px; /* Position below navbar */
    min-height: calc(100vh - 72px);
}

.image-section {
    width: 50%;
    height: calc(100vh - 72px);
    background-size: cover;
    background-position: center;
    position: fixed; /* Keep image section fixed */
    top: 72px; /* Position below navbar */
    left: 0;
    overflow: hidden;
}

#slideshow-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    left: 0;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 1;
}

.hero-image.active {
    opacity: 1;
    z-index: 2;
}

.content-section {
    width: 50%;
    margin-left: 50%; /* Push content to right half */
    padding: 2rem 2rem 140px 2rem;
    min-height: calc(100vh - 72px);
    box-sizing: border-box;
}

.intro-section {
    max-width: 800px;
    margin: 0 auto 2rem;
    position: relative;
}

.intro-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: bold;
    line-height: 1.2;
}

.intro-section h1 .highlight {
    position: relative;
    display: inline-block;
}

.intro-section h1 .highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 8px;
    background-color: rgba(var(--highlight-rgb), 0.5);
    bottom: 4px;
    left: 0;
    z-index: -1;
    border-radius: 4px;
}

/* Enhanced subheadings for index page */
.intro-section .subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-weight: 500;
    padding-right: 0;
}

.intro-section .subtitle::after {
    content: none;
}

/* Add blue line to the left of h3 titles */
.content-section h3 {
    position: relative;
    padding-left: 15px;
    font-size: 1.3rem;
    margin-top: 1.8rem;
    margin-bottom: 1rem;
}

.content-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

/* Fix accordion title styles - remove right lines */
.accordion-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.25rem;
    padding-right: 0;
}

/* Remove the right-side blue line */
.accordion-title::after {
    content: none;
}

.accordion {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
}

.accordion-header {
    padding: 1rem 1.5rem;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s ease;
}

.accordion.active .accordion-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.accordion-header:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

.accordion-icon {
    font-size: 1rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.accordion.active .accordion-icon {
    transform: rotate(180deg);
}

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

.accordion.active .accordion-content {
    padding: 1rem 1.5rem;
    max-height: 500px; /* Adjust as needed */
}

.accordion-content p {
    margin: 0;
    line-height: 1.6;
}

.accordion-content ul {
    padding-left: 1.5rem;
}

.accordion-content li {
    margin-bottom: 0.5rem;
}

/* CTA buttons */
.cta-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Fixed button container at the bottom */
.fixed-button-container {
    position: fixed;
    bottom: 0;
    right: 0;
    height: 120px; 
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 0 3rem;
    width: 50%;
    left: 50%;
}

/* Updated quiz styles to match content width on other pages */
#quiz-container, #results-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
}

#quiz-intro {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#question-container {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.4;
    width: 100%;
}

#options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2rem;
    width: 100%;
}

.option {
    display: block;
    width: 100%;
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-size: 1rem;
    line-height: 1.5;
}

.option:hover {
    border-color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
    transform: translateY(-2px);
}

.option.selected {
    border-color: var(--primary);
    border-width: 2px;
    background-color: rgba(var(--primary-rgb), 0.1);
}

.option.correct {
    border-color: var(--success);
    background-color: rgba(155, 199, 163, 0.2);
}

.option.incorrect {
    border-color: var(--error);
    background-color: rgba(230, 52, 120, 0.1);
}

.option.disabled {
    pointer-events: none;
    opacity: 0.75;
}

/* Quiz Progress */
#quiz-progress {
    margin-bottom: 2rem;
}

#progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

#question-counter {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Quiz results */
#score-display {
    font-size: 1.25rem;
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(var(--primary-rgb), 0.05);
}

#score-message {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: 8px;
    line-height: 1.6;
}

/* Quiz Navigation */
#navigation {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-right: 0;
    width: 100%;
}

/* CTA Container for Quiz */
.cta-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsiveness for Quiz */
@media (max-width: 768px) {
    #quiz-container, #results-container {
        padding: 1.25rem;
        margin: 0 0.5rem;
    }
    
    .option {
        padding: 0.75rem 1rem;
    }
    
    #question-container {
        font-size: 1.1rem;
    }
    
    #score-display, #score-message {
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* Responsive styles */
@media (max-width: 1200px) {
    .split-container {
        flex-direction: column;
    }
    
    .image-section {
        width: 100%;
        height: 30vh;
    position: relative;
        top: 0;
    }
    
    .content-section {
    width: 100%;
        margin-left: 0;
    padding: 1.5rem;
}

    .fixed-button-container {
        width: 100%;
        height: 100px;
        left: 0;
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .fixed-button-container {
        padding: 0 1.5rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background-color: white;
        padding: 1rem 0;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    .intro-section h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .fixed-button-container {
        height: 140px;
    }
    
    .cta-container {
        flex-direction: column;
    }
}

/* Custom scrollbar for Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(var(--primary-rgb), 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(var(--primary-rgb), 0.7);
}

/* Page-specific style overrides */
/* Principles page */
.principles-page .content-section {
    width: 50%;
    margin-left: 50%;
    padding-bottom: 150px;
    padding-top: 2rem;
}

.principles-page .split-container {
    position: relative;
}

.principles-page #carousel-container {
    position: relative;
    width: 100%;
    margin: 1.5rem auto;
    max-width: 800px;
}

.principles-page #principles-carousel {
    position: relative;
    overflow: hidden;
    height: 400px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.principles-page .principle-card {
    padding: 1.5rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    border-radius: 8px;
    background-color: white;
    border: none;
    overflow-y: auto;
}

.principles-page .principle-card.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 1;
}

.principles-page .carousel-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0;
}

.principles-page #carousel-indicators {
    display: flex;
    gap: 8px;
    margin: 0 10px;
    position: relative;
    z-index: 5;
        justify-content: center;
}

.principles-page .indicator {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--primary-rgb), 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
}

.principles-page .indicator.active {
    background-color: var(--primary);
    transform: scale(1.1);
    border-color: var(--primary);
    color: white;
}

.principles-page .carousel-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.principles-page .carousel-btn:hover {
    background-color: var(--secondary);
    transform: scale(1.05);
}

/* Quiz page */
.quiz-page .content-section {
    width: 50%;
    margin-left: 50%;
    padding: 2rem 2rem 150px;
}

.quiz-page .question-container {
    margin-bottom: 2rem;
}

.quiz-page .options-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-page .option-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.quiz-page .option-btn:hover {
    border-color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.quiz-page .option-btn.selected {
    border-color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.1);
}

.quiz-page .progress-container {
        width: 100%;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.quiz-page .progress-bar {
    height: 100%;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.quiz-page #result-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    text-align: center;
}

/* Responsive fixes for principles and quiz pages */
@media (max-width: 1200px) {
    .principles-page .content-section,
    .quiz-page .content-section {
        width: 100%;
        margin-left: 0;
    }
    
    .principles-page #principles-carousel {
        height: 450px;
    }
}

@media (max-width: 768px) {
    .principles-page #principles-carousel {
        height: 500px;
    }
    
    .principles-page .carousel-navigation {
        flex-wrap: wrap;
    }
    
    .principles-page #carousel-indicators {
        order: 3;
    width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .quiz-page #quiz-container,
    .quiz-page #result-container {
        padding: 1.5rem;
    }
}

.fa-solid, .fa-light, .fa-brands {
    font-style: normal;
    display: inline-block;
}

.fa-solid::before {
    font-family: 'fa-solid';
    display: inline-block;
}

.fa-light::before {
    font-family: 'fa-light';
    display: inline-block;
}

.fa-brands::before {
    font-family: 'fa-brands';
    display: inline-block;
}

.fa-bars::before {
    content: "\f0c9";
}

.fa-chevron-left::before {
    content: "\f053";
}

.fa-chevron-right::before {
    content: "\f054";
}

.fa-chevron-down::before {
    content: "\f078";
}

/* New custom tooltip */
.custom-tooltip {
    position: fixed;
    background-color: var(--primary);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    z-index: 9999;
    pointer-events: none;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease;
    min-width: 150px;
    max-width: 250px;
    width: auto;
    display: none;
    will-change: opacity, top;
}

.custom-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: var(--primary) transparent transparent transparent;
}

/* Quiz page specific styles */
.quiz-page .option-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.quiz-page .option-btn:hover {
    border-color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.quiz-page .option-btn.active {
    border-color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.1);
}

.quiz-page .option-btn.correct {
    border-color: var(--success);
    background-color: rgba(74, 158, 154, 0.1);
}

.quiz-page .option-btn.incorrect {
    border-color: var(--error);
    background-color: rgba(229, 115, 115, 0.1);
}

/* Default desktop layout - Split screen 50/50 */
@media (min-width: 1201px) {
    .fixed-button-container {
        left: 50%;
        width: 50%;
    }
}

/* Tablet Layout - When image is 30% */
@media (max-width: 1200px) and (min-width: 769px) {
    .split-container {
        flex-direction: column;
    }
    
    .image-section {
        height: 30%;
        width: 100%;
    }
    
    .content-section {
        width: 100%;
        height: 70%;
    }
    
    .fixed-button-container {
        width: 100%;
        height: 100px;
        left: 0;
        padding: 0 2rem;
    }
    
    .content-blocks {
        max-height: calc(100% - 150px);
        overflow-y: auto !important;
    }
    
    body {
        overflow: auto !important;
    }
}

/* Mobile layout */
@media (max-width: 768px) {
    .fixed-button-container {
        width: 100%;
        height: 100px;
        left: 0;
        padding: 0 1.5rem;
    }
    
    .content-section {
        overflow-y: auto !important;
    }
}

/* Very small screens */
@media (max-width: 576px) {
    .fixed-button-container {
        height: 140px;
    }
    
    .intro-section {
        height: calc(100% - 160px);
    }
    
    .content-blocks {
        max-height: calc(100% - 180px);
    }
}

/* Make hero image scale slightly on hover */
.hero-image:hover {
    transform: scale(1.02);
}

#quiz-intro .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

#quiz-intro .lead {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .lead {
        font-size: 1.1rem;
    }
    
    #quiz-intro {
        text-align: center;
    }
    
    #quiz-intro .subtitle,
    #quiz-intro .lead {
        text-align: center;
    }
    
    #navigation {
        justify-content: center;
    }
}

/* Principles Page Layout Fix */
.principles-content {
    width: 50%;
    margin-left: 50%;
    padding: 40px;
    box-sizing: border-box;
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

.carousel-container {
    position: relative;
    height: calc(100vh - 200px);
    overflow: hidden;
}

#principles-carousel {
    position: relative;
    height: 100%;
    width: 100%;
}

.principle-card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
    overflow-y: auto;
    padding: 20px 0;
}

.principle-card.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 1;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    position: sticky;
    bottom: 30px;
    width: 100%;
    z-index: 10;
}

#carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
    width: 100%;
    position: sticky;
    bottom: 0;
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.9);
}

/* Quiz Layout Fix */
.quiz-content {
    width: 50%;
    margin-left: 50%;
    padding: 40px;
    box-sizing: border-box;
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

#quiz-container, #results-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.question-number {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.option {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.option:hover {
    transform: translateY(-2px);
}

.option.selected {
    border-width: 2px;
}

.option.correct {
    background-color: rgba(155, 199, 163, 0.2);
    border-color: var(--success);
}

.option.incorrect {
    background-color: rgba(230, 52, 120, 0.1);
    border-color: var(--error);
}

.quiz-progress {
    width: 100%;
    background-color: var(--border);
    height: 8px;
    border-radius: 4px;
    margin: 24px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    transition: width 0.4s ease;
}

/* Responsive Fixes */
@media (max-width: 1024px) {
    .principles-content, .quiz-content {
        width: 60%;
        margin-left: 40%;
    }
}

@media (max-width: 768px) {
    .principles-content, .quiz-content {
        width: 100%;
        margin-left: 0;
        padding: 20px;
    }
    
    .principle-card, #quiz-container, #results-container {
        padding: 10px;
    }
}

/* Quiz container positioning */
#quiz-intro, #quiz-container, #results-container {
    margin-top: 1rem;
}

/* Quiz content visibility management */
.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .split-container {
        flex-direction: column;
    }
    
    .image-section {
        width: 100%;
        height: 30vh;
        position: relative;
        top: 0;
    }
    
    .content-section {
    width: 100%;
        margin-left: 0;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .content-section {
    padding: 1rem;
    }
    
    .intro-section {
        margin-bottom: 1.5rem;
    }
}

/* Carousel specific styling */
.carousel-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0;
    z-index: 5;
    margin-bottom: 1rem;
}

#carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border: 1px solid var(--primary);
    color: var(--primary);
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: var(--primary);
    color: white;
}

#principles-carousel {
    position: relative;
    width: 100%;
    min-height: 400px;
    margin-bottom: 2rem;
}

.principle-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
}

.principle-card.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.carousel-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background-color: var(--secondary);
}

/* Responsive fixes for carousel */
@media (max-width: 1200px) {
    #principles-carousel {
        min-height: 450px;
    }
}

@media (max-width: 768px) {
    .carousel-navigation {
        flex-wrap: wrap;
    }
    
    #carousel-indicators {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    #principles-carousel {
        min-height: 500px;
    }
}

/* Quiz results styling */
#results-container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 0 auto;
    position: relative;
    z-index: 10; /* Ensure it appears above other content */
}

#results-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.8rem;
}

#results-container.hidden {
    display: none !important;
}

#quiz-container.hidden {
    display: none !important;
}

#quiz-intro.hidden {
    display: none !important;
}

/* Fix for results container when quiz completes */
.content-section section:not(.hidden) {
    display: block !important;
}

/* Fix stacking context for quiz components */
.intro-section {
    position: relative;
}

.intro-section > section {
    position: relative;
}

/* Keep these simpler rules that don't use the problematic quiz-completed class */
#results-container:not(.hidden) {
    display: block !important;
    visibility: visible !important;
}

.content-section section:not(.hidden) {
    display: block !important;
}

#results-container #score-display {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0;
}

#results-container .summary-message {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(var(--primary-rgb), 0.05);
    border-radius: 8px;
}

.intro-section > section {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Restore page styling while fixing quiz issues */
.principles-page h1,
.principles-page h2,
.principles-page .subtitle,
.principles-page blockquote {
    /* Restore principles page styling */
    color: var(--primary);
    font-weight: 600;
}

.principles-page .principle-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
}

/* Ensure the index page and principles carousel works correctly */
.principle-card.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Fix for headings across the site */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.intro-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: bold;
    line-height: 1.2;
}

/* Quiz-specific fix that won't affect other pages */
.quiz-page #quiz-container.hidden,
.quiz-page #quiz-intro.hidden {
    display: none !important;
}

.quiz-page #results-container:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    z-index: 10 !important;
    position: relative !important;
}

/* High specificity quiz fixes that won't break other pages */
#quiz-container {
    z-index: 5;
}

#results-container {
    z-index: 10;
}

/* Only hide quiz elements when showing results */
body.showing-results #quiz-container,
body.showing-results #quiz-intro {
    display: none !important;
}

/* Blockquote styling for principles page */
.principles-page blockquote {
    background-color: rgba(var(--primary-rgb), 0.05);
    padding: 20px;
    border-radius: 8px;
    margin: 1.5rem 0;
    width: 100%;
    font-style: italic;
    border-left: 3px solid var(--primary);
    color: var(--text-primary);
}

.principles-page blockquote p {
    margin: 0;
}

/* Make quiz elements match intro width exactly */
#quiz-container, #question-container, #options-container, #results-container, #quiz-intro, #navigation {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.option {
    width: 100%;
    box-sizing: border-box;
}

/* Make progress bar same width as content */
#quiz-progress, #progress-bar {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
} 