@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Nunito:wght@400;700&display=swap');

/* Global Styles */
body {
  font-family: 'Nunito', sans-serif; /* Use Nunito as base font */
  text-align: center; /* Center align text and inline elements */
  margin: 0;
  padding: 20px;
  background-color: #f4f7f6; /* Slightly softer background */
}

h1 {
    font-family: 'Special Elite', monospace; /* Keep title font */
    color: #2c3e50; /* Darker blue-grey */
    margin-bottom: 20px;
    font-size: 2.5em; /* Slightly larger */
}

/* Video Container Styles */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 800px; /* Limit max width */
    background: #000;
    margin: 20px auto 30px auto; /* Center the container horizontally, adjust spacing */
    border-radius: 10px; /* Smoother corners */
    box-shadow: 0 6px 12px rgba(0,0,0,0.15); /* Slightly stronger shadow */
}

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

/* Post-it Styles */
.post-it {
    background-color: #fffacd; /* Lighter lemon */
    padding: 35px; /* More padding */
    max-width: 650px; /* Adjusted width */
    margin: 50px auto; /* Center and add space */
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.25); /* Enhanced shadow */
    transform: rotate(-2.5deg); /* Slightly more rotation */
    text-align: left;
    line-height: 1.7; /* Increased line height */
    color: #4a4a4a; /* Darker text */
    font-family: 'Special Elite', monospace;
    font-size: 1.15em; /* Slightly larger font */
    border-radius: 5px; /* Rounded corners */
    border: 1px solid #e0dcb5; /* Subtle border */
}

.post-it p {
    margin: 0; /* Remove default paragraph margin */
}

/* Diary Page Styles */
.diary-page {
    background-color: #fff; /* White background */
    border: 1px solid #e8e8e8; /* Lighter border */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* Softer shadow */
    max-width: 800px;
    margin: 50px auto; /* More vertical space */
    padding: 45px; /* More padding */
    text-align: left;
    font-family: 'Georgia', serif;
    line-height: 1.8; /* Slightly more line spacing */
    color: #333; /* Darker text */
    border-radius: 4px;
    position: relative;
    background-image: linear-gradient(to bottom, transparent 98%, #e0e8f0 98%); /* Lighter lines */
    background-size: 100% 2.2em; /* Adjust line height match */
}

.diary-page h2 {
    font-family: 'Special Elite', monospace;
    color: #4a6fa5; /* Softer blue */
    text-align: center;
    margin-bottom: 35px;
    font-size: 1.9em;
}

.diary-page h3 {
    font-family: 'Special Elite', monospace;
    color: #5e8b7e; /* Muted green */
    margin-top: 35px;
    margin-bottom: 15px; /* More space below heading */
    font-size: 1.5em;
    border-bottom: 1px dashed #c9d8d3; /* Lighter dash */
    padding-bottom: 8px;
}

.diary-page p {
    margin-bottom: 1.6em;
    text-indent: 1.5em;
}

/* Prevent first paragraph after a heading from being indented */
.diary-page h2 + p,
.diary-page h3 + p {
    text-indent: 0;
}

/* Simple Diagram Styles */
.simple-diagram-container {
    background-color: #f8f9fa; /* Lighter background */
    border: 1px solid #dee2e6; /* Soft border */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); /* Subtle shadow */
    max-width: 800px;
    margin: 50px auto;
    padding: 35px 45px;
    text-align: center;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
}

.simple-diagram-container h2 {
    font-family: 'Special Elite', monospace;
    color: #4a6fa5;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.simple-diagram-container > p { /* Intro paragraph */
    color: #555;
    margin-bottom: 35px;
    font-size: 1.1em;
    line-height: 1.6;
}

.diagram-columns {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 20px; /* Space between columns */
    text-align: left;
    margin-bottom: 25px;
}

.diagram-column {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    flex: 1; /* Allow columns to grow */
    min-width: 200px; /* Minimum width before wrapping */
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.diagram-column h3 {
    font-family: 'Special Elite', monospace;
    color: #5e8b7e; /* Muted green */
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px dashed #c9d8d3;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
}

.diagram-column h3 i {
    color: #8db5aa; /* Softer icon color */
    font-size: 1.1em;
}

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

.diagram-column li {
    margin-bottom: 15px; /* Increased margin to accommodate text */
    line-height: 1.5;
    color: #333;
    font-size: 0.95em;
}

.diagram-column li img {
    display: none;
}

.tag {
    font-size: 0.8em;
    color: #6c757d; /* Grey for tags */
    margin-left: 5px;
    font-style: italic;
}

.overlap-note {
    font-size: 0.9em;
    color: #6c757d;
    font-style: italic;
    margin-top: 20px;
}

/* Quiz Styles */
.quiz-container {
    background-color: #ffffff;
    border: 1px solid #dfe4ea;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    max-width: 800px;
    margin: 50px auto;
    padding: 35px 45px;
    text-align: left;
    border-radius: 8px;
    font-family: 'Special Elite', monospace;
}

.quiz-container h2 {
    text-align: center;
    color: #4a6fa5; /* Match other section titles */
    font-size: 1.8em;
    margin-bottom: 25px;
}

.quiz-container > p { /* Style the intro paragraph */
    text-align: center;
    color: #555;
    margin-bottom: 35px;
    font-family: 'Nunito', sans-serif; /* Use base font for intro */
    font-size: 1.1em;
}

.quiz-item {
    margin-bottom: 25px;
    padding-bottom: 20px; /* More space */
    border-bottom: 1px dashed #e0e8f0; /* Lighter dash */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px; /* Add gap between items */
}

.quiz-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.quiz-item p {
    margin: 0; /* Remove default margins */
    color: #444;
    flex-grow: 1;
    line-height: 1.6; /* Better line height */
    font-size: 1.05em; /* Slightly larger question text */
}

.quiz-item .show-answer-btn {
    padding: 8px 15px; /* Slightly larger button */
    font-size: 0.95em;
    cursor: pointer;
    background-color: #5e8b7e; /* Match diary H3 color */
    color: white;
    border: none;
    border-radius: 5px; /* Rounded button */
    transition: background-color 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
    font-family: 'Nunito', sans-serif; /* Clear button font */
    font-weight: bold;
}

.quiz-item .show-answer-btn:hover {
    background-color: #4a6e62; /* Darker shade on hover */
}

.quiz-item .answer {
    display: none;
    width: 100%;
    margin-top: 12px; /* More space above answer */
    padding: 12px 15px; /* Adjust padding */
    background-color: #e8f4f8; /* Very light blue */
    border-left: 4px solid #8ecae6; /* Match Europe color */
    color: #333;
    font-style: normal;
    border-radius: 0 5px 5px 0;
    line-height: 1.5;
    font-size: 1em; /* Adjust answer font size */
}

.viral-photos-gallery {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.viral-photos-gallery h2 {
    font-family: 'Special Elite', monospace;
    color: #4a6fa5;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2em;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: white;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.photo-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    color: white;
    text-align: center;
}

.photo-caption h3 {
    font-family: 'Special Elite', monospace;
    margin: 0 0 5px 0;
    font-size: 1.2em;
}

.photo-caption p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
    font-family: 'Nunito', sans-serif;
}

/* Hero Gallery Styles */
.hero-gallery {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.hero-gallery h2 {
    font-family: 'Special Elite', monospace;
    color: #4a6fa5;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2em;
}

.hero-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.hero-photo {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.hero-photo:hover {
    transform: translateY(-5px);
}

.hero-photo img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.hero-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    color: white;
}

.hero-caption h3 {
    font-family: 'Special Elite', monospace;
    margin: 0;
    font-size: 1.3em;
    text-align: center;
}

/* Journey Exercise Styles */
.journey-exercise {
    max-width: 1200px; /* Increased from 1000px */
    margin: 70px auto;
    padding: 60px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.journey-exercise h2 {
    font-family: 'Special Elite', monospace;
    color: #4a6fa5;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em; /* Increased font size */
    letter-spacing: 2px;
}

.exercise-intro {
    font-family: 'Special Elite', monospace;
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.3em;
    line-height: 1.6;
}

.journey-form {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* Adjusted ratio */
    gap: 40px;
    margin-bottom: 50px;
}

.moment-entry {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.location-input, .moment-type, .meaning-input {
    font-family: 'Special Elite', monospace;
    font-size: 1.1em;
    padding: 15px;
    margin-bottom: 15px;
}

.journey-section h3 {
    font-family: 'Special Elite', monospace;
    color: #4a6fa5;
    font-size: 1.6em;
    margin-bottom: 25px;
}

.story-preview {
    background: #f8f9fa;
    padding: 35px;
    border-radius: 10px;
    min-height: 400px;
}

.story-preview h3 {
    font-family: 'Special Elite', monospace;
    color: #4a6fa5;
    font-size: 1.6em;
    margin-bottom: 25px;
}

.preview-content {
    font-family: 'Special Elite', monospace;
    font-size: 1.1em;
    line-height: 1.8;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.save-story-btn, .download-pdf-btn, .print-story-btn {
    background: #5e8b7e;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Special Elite', monospace;
    font-size: 1.1em;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.save-story-btn:hover, .download-pdf-btn:hover, .print-story-btn:hover {
    background: #4a6e62;
}

@media (max-width: 768px) {
    .diagram-column {
        min-width: 100%;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .photo-item img {
        height: 350px;
    }
    
    .hero-photos {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .journey-form {
        grid-template-columns: 1fr;
    }
    
    .journey-exercise {
        padding: 20px;
    }
}

@media print {
    body * {
        visibility: hidden;
    }
    .journey-exercise, .journey-exercise * {
        visibility: visible;
    }
    .journey-exercise {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
    }
    .button-group {
        display: none;
    }
}