:root {
    --ppt-orange: #D24726;
    --ppt-orange-dark: #A93418;
    --ppt-orange-light: #FBECE9;
    --bg-color: #F8FAFC;
    --surface-color: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-orange: 0 10px 25px -5px rgba(210, 71, 38, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Container for View Management */
.app-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px) scale(0.98);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    padding-bottom: 4rem;
}

.view.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    position: relative;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--ppt-orange) 0%, var(--ppt-orange-dark) 100%);
    color: white;
    padding: 1rem 0.5rem;
    text-align: center;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: rotate(30deg);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero p {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: white;
    color: var(--ppt-orange-dark);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.cta-button svg {
    width: 24px;
    height: 24px;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-color);
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.module-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    outline: none;
    position: relative;
    overflow: hidden;
}

.card-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: var(--ppt-orange-light);
    color: var(--ppt-orange-dark);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.module-card:hover .card-number {
    background-color: var(--ppt-orange);
    color: white;
}

.module-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, rgba(210, 71, 38, 0.05), transparent);
    opacity: 0;
    transition: var(--transition);
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-orange);
    border-color: var(--ppt-orange-light);
}

.module-card:hover::after {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    background: var(--ppt-orange-light);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 1;
}

.module-card:hover .card-icon {
    background: var(--ppt-orange);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-md);
}

.module-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    z-index: 1;
}

/* Subpage View */
.subpage-header {
    background: white;
    padding: 0.6rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ppt-orange-light);
    border: none;
    color: var(--ppt-orange-dark);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
}

.back-button:hover {
    background-color: var(--ppt-orange);
    color: white;
    transform: translateX(-4px);
}

.back-button svg {
    width: 20px;
    height: 20px;
}

.subpage-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

.subpage-content {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.centered-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    object-fit: contain;
    animation: zoomIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 1.5rem;
        border-bottom-left-radius: 2rem;
        border-bottom-right-radius: 2rem;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .subpage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .modules-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
}
