/* Interior Design Course Website Styles */

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 2px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-style: italic;
}

/* Navigation Styles */
nav {
    background-color: #34495e;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

nav a:hover, nav a.active {
    background-color: #2c3e50;
    transform: translateY(-2px);
}

/* Main Content Styles */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.course-intro {
    background: white;
    padding: 3rem;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.course-intro h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.course-intro p {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* Module Styles */
.module {
    background: white;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    display: none;
}

.module.active {
    display: block;
}

.module-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 2rem;
    text-align: center;
}

.module-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.module-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.module-content {
    padding: 3rem;
}

.lesson {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.lesson:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.lesson h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 20px;
    position: relative;
}

.lesson h3:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #3498db;
}

.lesson h4 {
    color: #34495e;
    font-size: 1.2rem;
    margin: 1.5rem 0 0.5rem 0;
}

.lesson p {
    margin-bottom: 1rem;
    text-align: justify;
    font-size: 1rem;
    line-height: 1.7;
}

.lesson ul, .lesson ol {
    margin: 1rem 0 1rem 2rem;
}

.lesson li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Interactive Elements */
.exercise-box {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 5px 5px 0;
}

.exercise-box h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.tip-box {
    background: #e8f5e8;
    border-left: 4px solid #27ae60;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 5px 5px 0;
}

.tip-box h4 {
    color: #27ae60;
    margin-bottom: 1rem;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 5px 5px 0;
}

.warning-box h4 {
    color: #856404;
    margin-bottom: 1rem;
}

/* Image Gallery Styles */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}

.gallery-item p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Quiz Styles */
.quiz {
    background: #f8f9fa;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.quiz h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.quiz-question {
    margin-bottom: 1.5rem;
}

.quiz-options {
    list-style: none;
    margin: 0;
}

.quiz-options li {
    margin: 0.5rem 0;
}

.quiz-options input[type="radio"] {
    margin-right: 0.5rem;
}

.quiz-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.quiz-button:hover {
    background: #2980b9;
}

.quiz-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
}

.quiz-result.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.quiz-result.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Progress Tracker */
.progress-tracker {
    background: white;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.progress-bar {
    background: #e9ecef;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    background: linear-gradient(90deg, #3498db, #2980b9);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Footer Styles */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.25rem 0;
    }
    
    .course-intro, .module-content {
        padding: 2rem 1rem;
    }
    
    .module-header {
        padding: 1.5rem 1rem;
    }
    
    .image-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .course-intro, .module-content {
        padding: 1.5rem 1rem;
    }
}

/* Interactive Elements */
.interactive-tool {
    background: #f8f9fa;
    border: 2px solid #3498db;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
}

.interactive-tool h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

/* Color Wheel Tool */
.color-wheel-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.color-wheel {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
}

.color-segment {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.color-segment:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.color-segment.red { background: #e74c3c; top: 10px; left: 70px; }
.color-segment.orange { background: #f39c12; top: 35px; right: 20px; }
.color-segment.yellow { background: #f1c40f; bottom: 35px; right: 20px; }
.color-segment.green { background: #27ae60; bottom: 10px; left: 70px; }
.color-segment.blue { background: #3498db; bottom: 35px; left: 20px; }
.color-segment.purple { background: #9b59b6; top: 35px; left: 20px; }

.color-info {
    flex: 1;
    min-width: 250px;
}

.selected-color-info {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

/* Color Palette Generator */
.generator-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.color-input, .scheme-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-input input[type="color"] {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.scheme-selector select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.color-palette {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.color-swatch {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    display: flex;
    align-items: end;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.color-swatch:hover {
    transform: translateY(-5px);
}

.color-code {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* Room Planner */
.planner-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(10, 30px);
    grid-template-rows: repeat(10, 30px);
    gap: 1px;
    background: #ddd;
    padding: 10px;
    border-radius: 5px;
}

.grid-cell {
    background: white;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.grid-cell:hover {
    background: #f0f0f0;
}

.furniture-palette {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.furniture-item {
    background: white;
    border: 2px solid #3498db;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    cursor: grab;
    transition: all 0.3s ease;
    text-align: center;
}

.furniture-item:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

.furniture-item:active {
    cursor: grabbing;
}

/* Enhanced Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item p {
    padding: 1rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-header {
    background: #3498db;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 2rem;
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* Before/After Styles */
.before-after-container {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.before-after-item {
    text-align: center;
}

.before-after-images {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.before-image, .after-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.before-image img, .after-image img {
    width: 250px;
    height: 200px;
    object-fit: cover;
}

.image-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Module Completion */
.module-completion {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background: #e8f5e8;
    border-radius: 10px;
    border-left: 4px solid #27ae60;
}

.completion-button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.completion-button:hover {
    background: #219a52;
    transform: translateY(-2px);
}

/* Completion Notification */
.completion-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: slideInRight 0.5s ease;
}

.notification-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.notification-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* Course Completion */
.course-completion {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.course-completion h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.course-completion h4 {
    margin: 2rem 0 1rem 0;
    font-size: 1.3rem;
}

.course-completion ul {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.course-completion li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background: #2c3e50;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 1000;
    max-width: 200px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInRight {
    from { 
        opacity: 0;
        transform: translateX(100px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Quiz Styles */
.quiz {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #3498db;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.quiz::before {
    content: '🧠';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.quiz.attempted {
    border-color: #27ae60;
}

.quiz.attempted::before {
    content: '✅';
    opacity: 0.6;
}

/* Enhanced Progress Tracker */
.progress-tracker {
    background: linear-gradient(135deg, white, #f8f9fa);
    border: 2px solid #3498db;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.progress-bar {
    background: #e9ecef;
    height: 25px;
    border-radius: 15px;
    overflow: hidden;
    margin: 1rem 0;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, #3498db, #2980b9, #27ae60);
    height: 100%;
    width: 0%;
    transition: width 0.8s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .color-wheel-container {
        flex-direction: column;
    }
    
    .planner-container {
        flex-direction: column;
    }
    
    .room-grid {
        grid-template-columns: repeat(8, 25px);
        grid-template-rows: repeat(8, 25px);
    }
    
    .before-after-images {
        flex-direction: column;
        align-items: center;
    }
    
    .before-image img, .after-image img {
        width: 200px;
        height: 150px;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .interactive-tool {
        padding: 1rem;
    }
    
    .color-wheel {
        width: 150px;
        height: 150px;
    }
    
    .color-segment {
        width: 40px;
        height: 40px;
    }
    
    .color-segment.red { top: 5px; left: 55px; }
    .color-segment.orange { top: 25px; right: 15px; }
    .color-segment.yellow { bottom: 25px; right: 15px; }
    .color-segment.green { bottom: 5px; left: 55px; }
    .color-segment.blue { bottom: 25px; left: 15px; }
    .color-segment.purple { top: 25px; left: 15px; }
    
    .room-grid {
        grid-template-columns: repeat(6, 20px);
        grid-template-rows: repeat(6, 20px);
    }
}

/* Print Styles */
@media print {
    nav, .quiz, .progress-tracker, .interactive-tool, .modal-overlay {
        display: none;
    }
    
    .module {
        display: block !important;
        page-break-before: always;
    }
    
    .module:first-child {
        page-break-before: auto;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .lesson {
        page-break-inside: avoid;
    }
    
    .gallery-item {
        page-break-inside: avoid;
    }
}