/* Classical Civilisation - Common Styles
   Shared across all Classical Civ courses (Politics, Myth & Religion)
   Matches the blue theme from language courses */

/* ========================================
   BASE STYLES & RESETS
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #0066ff 0%, #4d94ff 25%, #e6f0ff 60%, #ffffff 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    color: #333;
}

/* ========================================
   FLOATING BACKGROUND SHAPES
   ======================================== */
.bg-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 102, 255, 0.05);
    animation: float 20s infinite ease-in-out;
}

.shape1 {
    width: 400px;
    height: 400px;
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.shape2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    left: -150px;
    animation-delay: 5s;
    background: rgba(0, 102, 255, 0.03);
}

.shape3 {
    width: 250px;
    height: 250px;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ========================================
   INFO BUTTON (Global)
   ======================================== */
.info-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
    color: #0066ff;
}

.info-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.2);
}

/* ========================================
   HEADER
   ======================================== */
header {
    position: relative;
    z-index: 10;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.logo {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e6f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -3px;
    margin-bottom: 0.5rem;
    text-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.logo a {
    text-decoration: none;
    background: linear-gradient(135deg, #ffffff 0%, #e6f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.author {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* ========================================
   DASHBOARD LAYOUT
   ======================================== */
.dashboard-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 5;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 180px 1fr 280px;
    gap: 2rem;
    align-items: start;
}

/* ========================================
   LEFT SIDEBAR NAVIGATION
   ======================================== */
.left-sidebar {
    padding-top: 1rem;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.nav-link {
    display: block;
    padding: 0.6rem 0;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.nav-link:hover {
    color: white;
    border-left-color: white;
}

.nav-link.current {
    color: white;
    border-left-color: white;
    font-weight: 600;
}

/* ========================================
   MAIN CONTENT CONTAINER
   ======================================== */
.app-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.app-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.app-greeting {
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.app-subtitle {
    color: #666;
    font-size: 0.95rem;
}

.lesson-nav {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.lesson-nav button {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e1f0ff 100%);
    border: 1px solid rgba(0, 102, 255, 0.2);
    border-radius: 8px;
    color: #0066ff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lesson-nav button:hover {
    background: linear-gradient(135deg, #0066ff 0%, #4d94ff 100%);
    color: white;
    transform: translateY(-1px);
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */
.lesson-content {
    padding: 2rem;
}

.section-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Proper bullet indentation for all content */
.lesson-content ul,
.app-container ul,
.info-box ul,
.detail-box ul {
    margin: 1rem 0 1rem 1.5rem;
    padding-left: 0;
    list-style-position: outside;
}

.lesson-content li,
.app-container li,
.info-box li,
.detail-box li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Nested lists */
.lesson-content ul ul,
.app-container ul ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

/* Ordered lists */
.lesson-content ol,
.app-container ol {
    margin: 1rem 0 1rem 1.5rem;
    padding-left: 0;
    list-style-position: outside;
}

/* Blue Info Boxes */
.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(33, 150, 243, 0.15);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.08);
}

.info-box h3 {
    color: #1565c0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.info-box p {
    color: #37474f;
    line-height: 1.7;
}

/* Card Layouts */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.15);
    border-color: #0066ff;
}

.card-title {
    font-size: 1.1rem;
    color: #0066ff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-content {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Interactive Elements */
.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable:hover {
    transform: scale(1.02);
}

.reveal-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.reveal-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RIGHT SIDEBAR WIDGETS
   ======================================== */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.widget {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.widget p {
    color: #666;
    line-height: 1.5;
    font-size: 0.9rem;
}

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

.widget li {
    padding: 0.5rem 0;
    color: #666;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
    border-bottom: none;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal-header {
    padding: 1.5rem 2rem 1rem 2rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.modal-body {
    display: flex;
    gap: 2rem;
    padding: 1rem 2rem;
    align-items: flex-start;
}

.modal-text {
    flex: 2;
}

.modal-text p {
    margin: 0 0 1rem 0;
    line-height: 1.5;
    color: #555;
    font-size: 0.9rem;
}

.modal-image {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
    border-radius: 0 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-items {
    display: flex;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    flex: 1;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
    border-color: #0066ff;
}

.contact-icon {
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.contact-value {
    color: #666;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

.modal-signature {
    text-align: center;
    margin-top: 1rem;
}

.modal-signature p {
    margin: 0.25rem 0;
    color: #777;
    font-size: 0.9rem;
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #333;
    background-color: #f0f0f0;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #0066ff 0%, #4d94ff 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-secondary {
    background: white;
    color: #0066ff;
    border: 2px solid #0066ff;
}

.btn-secondary:hover {
    background: #0066ff;
    color: white;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .left-sidebar {
        display: flex;
        gap: 3rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
    }

    .nav-section {
        margin-bottom: 0;
    }

    .right-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 3rem;
    }

    .dashboard-container {
        padding: 1rem;
    }

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

    .right-sidebar {
        grid-template-columns: 1fr;
    }

    .info-btn {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }

    .left-sidebar {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-items {
        flex-direction: column;
    }

    .lesson-nav {
        flex-direction: column;
    }

    .lesson-nav button {
        width: 100%;
    }
}
