/* ==========================================================================
   Base styles and variables
   ========================================================================== */
:root {
    --border-radius: 15px;
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Oswald', sans-serif;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: #AFDDE5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Ensure all sections and containers respect viewport width */
section, .container, .info-container, .feature-cards-section, .flashcard-container {
    max-width: 100%;
    box-sizing: border-box;
}

/* Adjust hero section to prevent overflow */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    font-family: var(--font-heading);
    font-size: 180%;
}

#hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(/images/team.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.4;
    z-index: 1;
}

#hero > div {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

/* Ensure navbar stays within viewport */
#navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: calc(100% - 40px);
    max-width: 1600px;
    box-sizing: border-box;
}

/* Adjust container padding for smaller screens */
@media (max-width: 1024px) {
    .container {
        width: 95%;
        padding: 0 15px;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.5px;
}

h3 {
    font-size: 1.1em;
    margin-bottom: 8px;
    color: #003135;
}

p {
    font-size: 0.95em;
    color: #024950;
}

/* Common Layout Elements */
section {
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 15px;
}

.spacer {
    height: 40px;
}

main {
    flex: 1;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
nav.navbar {
    font-family: var(--font-heading);
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #003135;
    backdrop-filter: blur(10px);
    z-index: 10;
    color: white;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 49, 53, 0.2);
}

nav .title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-right: 1.5rem;
    color: white;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

nav .title:hover {
    color: #0FA4AF;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    color: white;
    align-items: center;
}

.nav-links a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.4rem 0;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0FA4AF;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: white;
    text-decoration: none;
}

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

.nav-links a.active {
    color: white;
    font-weight: 500;
}

.nav-links a.active::after {
    width: 100%;
    background-color: #0FA4AF;
}

#menu-button {
    display: none;
    background-color: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    margin: 0;
    transition: transform 0.3s ease;
}

#menu-button:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 0.8rem;
    color: white;
}

#hero-btn {
    position: relative;
    background-color: #964734;
    padding: 12px 25px;
    border: none;
    color: white;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    border-radius: calc(var(--border-radius) / 2);
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0.5px;
}

#hero-btn:hover {
    background-color: #803c2c;
}

/* ==========================================================================
   Info Section
   ========================================================================== */
.info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 15px 30px;
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.info-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #003135;
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.info-text {
    font-size: 1.1rem;
    font-weight: 400;
    color: #024950;
    line-height: 1.5;
    max-width: 800px;
    margin-bottom: 15px;
    text-justify: auto;
    font-family: var(--font-primary);
    font-weight: 400;
}

.info-text:last-of-type {
    margin-bottom: 0;
}

.center-div {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    margin: 0;
}

.bold-text {
    font-weight: bold;
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.flashcard-description {
    text-align: center;
    color: #024950;
    font-size: 1.1em;
    margin: 0 auto 20px;
    max-width: 800px;
    padding: 0 20px;
}

/* ==========================================================================
   Flashcard Section
   ========================================================================== */

#flashcards {
    overflow-x: scroll;
}

.flashcard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 80%;
    margin: 0 auto;
}

.first-row, .second-row {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.second-row {
    margin-top: 20px;
}

.flashcard {
    width: 220px;
    height: 220px;
    perspective: 1000px;
}

.flashcard-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: var(--border-radius);
    text-align: center;
}

.flashcard-front {
    background-color: #024950;
    color: white;
}

.flashcard-back {
    background-color: #0FA4AF;
    color: white;
    transform: rotateY(180deg);
}

.flashcard-front h3, .flashcard-back p {
    padding: 15px;
    color: white;
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.flashcard-back p {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
}

/* ==========================================================================
   Feature Cards Section
   ========================================================================== */
.feature-cards-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    background-color: #AFDDE5;
}

.feature-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 49, 53, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    background-color: #024950;
    color: white;
}

.feature-card:hover h3,
.feature-card:hover p {
    color: white;
}

.icon {
    font-size: 35px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
}

/* ==========================================================================
   Q&A Section
   ========================================================================== */
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: stretch;
}

.box {
    padding: 25px;
    background-color: white;
    border: 1px solid #AFDDE5;
    box-shadow: 0 4px 8px rgba(0, 49, 53, 0.1);
    display: flex;
    flex-direction: column;
    height: auto;
    border-radius: var(--border-radius);
}

.box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.box p {
    margin: 0;
    padding-bottom: 25px;
    font-size: 0.95rem;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */
.gap-button-container {
    grid-column: span 2;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding: 20px;
}

.action-button {
    padding: 15px 30px;
    font-size: 16px;
    background-color: #964734;
    color: white;
    border: none;
    border-radius: calc(var(--border-radius) / 2);
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.action-button:hover {
    background-color: #803c2c;
}

/* ==========================================================================
   Despre Page Specific Styles
   ========================================================================== */
#despre-hero {
    margin-top: 100px;
}

.despre-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
    border-radius: var(--border-radius);
    margin: 30px auto;
    max-width: 1000px;
    box-shadow: 0 4px 15px rgba(0, 49, 53, 0.15);
}

.despre-section .subject-header {
    background: linear-gradient(135deg, #003135, #024950);
    padding: 25px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: -20px -20px 20px -20px;
    border-bottom: none;
    display: flex;
    align-items: center;
}

.despre-section .subject-header h3 {
    color: white;
    margin: 0;
    font-size: 2rem;
}

.subject-icon {
    font-size: 3rem;
    margin-right: 20px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.points-box {
    background-color: rgba(15, 164, 175, 0.05);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.points-box ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.points-box li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.points-box li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0FA4AF;
    font-size: 1.5rem;
    line-height: 1;
}

.points-box li strong {
    color: #003135;
    font-weight: 600;
}

/* Manipulation Types Grid */
.manipulation-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.type-box {
    background-color: rgba(175, 221, 229, 0.1);
    padding: 25px;
    border-radius: var(--border-radius);
    border-left: 4px solid #0FA4AF;
}

.type-box h4 {
    color: #003135;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.type-box ul {
    list-style-type: none;
    padding-left: 0;
}

.type-box li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: #024950;
}

.type-box li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #0FA4AF;
}

/* Defense Strategies */
.defense-strategies {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.strategy-box {
    background-color: rgba(2, 73, 80, 0.05);
    padding: 25px;
    border-radius: var(--border-radius);
    border-left: 4px solid #024950;
}

.strategy-box h4 {
    color: #003135;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.strategy-box ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.strategy-box li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: #024950;
}

.strategy-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0FA4AF;
    font-weight: bold;
}

/* Conclusion Box */
.conclusion-box {
    background: linear-gradient(135deg, rgba(15, 164, 175, 0.1), rgba(2, 73, 80, 0.1));
    padding: 30px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    border: 1px solid rgba(15, 164, 175, 0.2);
}

.conclusion-box p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #003135;
    margin: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
section#footer {
    width: 100%;
    text-align: center;
    background-color: #003135;
    color: white;
    font-family: var(--font-primary);
    margin-top: auto;
    padding: 0;
    margin: 0;
    border-radius: 0;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    letter-spacing: 0.5px;
    padding: 4px 0;
}

footer p:not(:last-child) {
    margin-bottom: 0;
}

footer p:first-child {
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    padding-top: 12px;
}

footer p:last-child {
    margin-top: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    padding-bottom: 12px;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        padding: 0 50px;
    }

    .gap-button-container {
        grid-column: span 1;
    }
    
    .box {
        margin-bottom: 30px;
        padding: 30px;
    }

    .box p {
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    #navbar {
        width: calc(100% - 20px);
        top: 10px;
    }

    nav.navbar {
        padding: 0.6rem 1rem;
    }

    nav .title {
        font-size: 1.2rem;
        margin-right: 1rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0.8rem;
        position: absolute;
        top: 100%;
        right: 0;
        background-color: #003135;
        backdrop-filter: blur(10px);
        padding: 1rem;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        min-width: 200px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    #menu-button {
        display: block;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0;
    }

    /* Hero Section */
    #hero {
        min-height: 70vh;
        font-size: 150%;
    }

    #hero:before {
        min-height: 70vh;
    }

    /* Info Section */
    .info-container {
        padding: 20px 15px;
        margin: 10px;
    }

    .info-title {
        font-size: 1.5rem;
    }

    .info-text {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* Flashcards */
    .flashcard-container {
        width: 95%;
        padding: 0 10px;
    }

    .first-row, .second-row {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .flashcard {
        width: 200px;
        height: 200px;
    }

    /* Feature Cards */
    .feature-cards-section {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 15px;
    }

    .feature-card {
        padding: 15px;
    }

    /* Q&A Section */
    .container {
        grid-template-columns: 1fr;
        width: 100%;
        padding: 0 15px;
        gap: 15px;
    }

    .box {
        padding: 20px;
    }

    /* Content Sections */
    .content-section {
        padding: 15px;
    }

    .subject-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .subject-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .definition-box, .examples-box {
        padding: 15px;
    }

    /* Quiz Section */
    .quiz-section {
        padding: 15px;
    }

    .quiz-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .quiz-buttons .action-button {
        width: 100%;
    }

    .answer-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    /* Resources Section */
    .video-grid, .help-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .video-container {
        margin-bottom: 15px;
    }

    /* History Section */
    .case-studies-grid, .psychology-studies {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .timeline-item {
        padding: 10px;
    }

    /* Footer */
    footer {
        padding: 15px;
    }

    footer p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* Additional small screen adjustments */
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .action-button {
        width: 100%;
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .flashcard-front h3, .flashcard-back p {
        font-size: 0.9rem;
        padding: 15px;
    }

    .feature-card h3 {
        font-size: 1rem;
    }

    .feature-card p {
        font-size: 0.8rem;
    }
}

/* Fix for iOS Safari 100vh issue */
@supports (-webkit-touch-callout: none) {
    #hero {
        min-height: -webkit-fill-available;
    }
    #hero:before {
        min-height: -webkit-fill-available;
    }
}

/* Improve touch targets */
@media (hover: none) {
    .nav-links a, .action-button {
        padding: 12px 0;
    }
    
    .flashcard {
        cursor: pointer;
    }
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
}

/* Improve scrolling performance */
* {
    -webkit-overflow-scrolling: touch;
}

/* Fix for sticky hover states on mobile */
@media (hover: none) {
    .feature-card:hover,
    .nav-links a:hover,
    .action-button:hover {
        transform: none;
    }
}

/* Ce este manipularea page styles */
.definition-section,
.mechanism-section,
.mechanisms-section,
.daily-life-section,
.danger-section {
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.definition-section {
    margin-top: 120px;
}

.subject-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #024950, #0FA4AF);
    color: white;
}

.subject-header h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.subject-icon {
    font-size: 2rem;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
}

.content-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #3498db;
}

.main-definition {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #2c3e50;
}

.mechanisms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.mechanism-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.mechanism-card:hover {
    transform: translateY(-5px);
}

.mechanism-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.example-box {
    margin-top: 1rem;
    padding: 1rem;
    background: #f7f9fc;
    border-radius: 8px;
    border-left: 3px solid #e74c3c;
}

.example-box strong {
    color: #e74c3c;
}

.scenarios-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.scenario-card {
    background: linear-gradient(135deg, #fff, #f5f6fa);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e8ed;
}

.scenario-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.danger-section .subject-header.warning {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.danger-content {
    background: #fff5f5;
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid #e74c3c;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #2c3e50;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .definition-section,
    .mechanism-section,
    .mechanisms-section,
    .daily-life-section,
    .danger-section {
        padding: 1rem;
        margin: 1rem;
    }

    .mechanisms-grid {
        grid-template-columns: 1fr;
    }

    .subject-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .content-box,
    .mechanism-card,
    .scenario-card {
        padding: 1rem;
    }

    .main-definition {
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   Quiz Styles
   ========================================================================== */
#quiz-hero {
    margin-top: 100px;
}

.quiz-section {
    padding: 2rem;
    margin: 2rem auto;
    max-width: 800px;
}

.quiz-selector {
    text-align: center;
    margin-bottom: 2rem;
}

.quiz-selector h2 {
    color: #003135;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.quiz-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.quiz-buttons .action-button {
    min-width: 250px;
    margin: 0.5rem;
}

.quiz-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 49, 53, 0.15);
    margin-bottom: 2rem;
}

.quiz-card h2 {
    color: #003135;
    margin-bottom: 1.2rem;
    font-family: var(--font-heading);
    font-size: 1.6rem;
}

.quiz-disclaimer {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fff5f5;
    border-radius: var(--border-radius);
    border-left: 4px solid #e74c3c;
    font-size: 0.9rem;
    color: #2c3e50;
}

.answers-container {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.answer-btn {
    background: #f5f6fa;
    border: 2px solid #e1e8ed;
    padding: 0.8rem;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.answer-btn:hover {
    background: #e1e8ed;
    transform: translateY(-2px);
}

.answer-btn.selected {
    border-color: #3498db;
    background: #f1f9ff;
}

#score {
    font-size: 1.5rem;
    color: #003135;
    margin-bottom: 1rem;
    text-align: center;
}

#feedback {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: #f7f9fc;
    border-left: 4px solid #3498db;
}

#recommendations {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: #f0f9ff;
    border-left: 4px solid #27ae60;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quiz-section {
        padding: 1rem;
        margin: 1rem;
    }

    .quiz-card {
        padding: 1.5rem;
    }

    .quiz-card h2 {
        font-size: 1.5rem;
    }

    .answer-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .quiz-buttons .action-button {
        min-width: 200px;
    }
}

/* Sources and Disclaimer Styles */
.sources-box, .disclaimer-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.sources-box {
    border-left: 4px solid #3498db;
}

.disclaimer-box {
    border-left: 4px solid #e74c3c;
}

.sources-box h2, .disclaimer-box h3 {
    color: #003135;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.sources-box ul, .disclaimer-box ul {
    list-style-type: none;
    padding-left: 0;
    margin: 1rem 0;
}

.sources-box li, .disclaimer-box li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #024950;
}

.sources-box li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #3498db;
}

.disclaimer-box li:before {
    content: "!";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
}

.sources-box a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sources-box a:hover {
    color: #2980b9;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .sources-box, .disclaimer-box {
        padding: 1rem;
    }
    
    .sources-box li, .disclaimer-box li {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   History Page Styles
   ========================================================================== */
.history-section,
.contemporary-section,
.psychology-section {
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.section-title {
    color: #003135;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-family: var(--font-heading);
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-list li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.history-list li:before {
    content: "◆";
    position: absolute;
    left: 0;
    color: #0FA4AF;
    font-size: 0.8rem;
}

.history-list li strong {
    display: block;
    color: #003135;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

/* Case Studies Grid */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.case-study-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 49, 53, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.case-study-card .subject-header,
.study-card .subject-header {
    min-height: 80px;
    display: flex;
    align-items: center;
    padding: 1rem;
}

.case-study-card .subject-header h3,
.study-card .subject-header h3 {
    font-size: 1.3rem;
    line-height: 1.4;
    margin: 0;
}

.case-study-card .content-box,
.study-card .content-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    height: 100%;
}

.case-study-card ul,
.study-card .study-details ul {
    flex: 1;
    margin: 1rem 0;
    padding: 0;
}

.case-study-card .example-box,
.study-card .study-details {
    margin-top: auto;
    padding-top: 1rem;
}

/* Psychology Studies */
.psychology-studies {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.study-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 49, 53, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.study-card p {
    margin: 0 0 1rem 0;
}

.study-details h4 {
    color: #003135;
    margin: 0 0 1rem 0;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .history-section,
    .contemporary-section,
    .psychology-section {
        padding: 1rem;
        margin: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .case-studies-grid,
    .psychology-studies {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .case-study-card .subject-header,
    .study-card .subject-header {
        min-height: 60px;
    }

    .case-study-card .subject-header h3,
    .study-card .subject-header h3 {
        font-size: 1.2rem;
    }

    .case-study-card .content-box,
    .study-card .content-box {
        padding: 1rem;
    }

    .timeline-item {
        margin-bottom: 2rem;
    }

    .study-card,
    .case-study-card {
        margin-bottom: 1.5rem;
    }
}

/* ==========================================================================
   Resources Page Styles
   ========================================================================== */
.resources-section,
.help-section {
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px; 
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.video-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 49, 53, 0.1);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-card h3 {
    padding: 1rem;
    margin: 0;
    color: #003135;
}

.video-card p {
    padding: 0 1rem 1rem;
    margin: 0;
    color: #024950;
}

/* Help Grid */
.help-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

.help-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 49, 53, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.help-card .subject-header {
    background: linear-gradient(135deg, #024950, #0FA4AF);
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.help-card .subject-header h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.help-card .subject-icon {
    font-size: 1.6rem;
    margin: 0;
}

.help-list {
    flex: 1;
    padding: 1.2rem;
    margin: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.help-list li {
    padding: 0;
    border-bottom: 1px solid rgba(0, 49, 53, 0.1);
    padding-bottom: 1.2rem;
}

.help-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.help-list strong {
    display: block;
    color: #003135;
    margin-bottom: 0.4rem;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.help-list p {
    margin: 0.4rem 0;
    color: #024950;
    font-size: 0.9rem;
}

.help-list a {
    color: #0FA4AF;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.help-list a:hover {
    color: #003135;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .help-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .help-card .subject-header {
        padding: 0.8rem;
    }

    .help-card .subject-header h3 {
        font-size: 1.1rem;
    }

    .help-list {
        padding: 1rem;
        gap: 1rem;
    }

    .help-list li {
        padding-bottom: 1rem;
    }
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #003135;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background-color: #0FA4AF;
    transform: translateY(-3px);
}

.back-to-top span {
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
}
      