/* Itinerary Page Specific Styles */
.itinerary-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    color: white;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.header-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Content Area */
.itinerary-content {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: calc(100vh - 200px);
    padding: 3rem 2rem;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* PDF Notice */
.pdf-notice {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.notice-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

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

.pdf-notice p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.loading-indicator {
    display: flex;
    justify-content: center;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #667eea;
    animation: loadingPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingPulse {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Preview Sections */
.preview-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.preview-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.card-content {
    padding: 2rem;
}

.card-content ul {
    list-style: none;
}

.card-content li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
}

.card-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* PDF Viewer Placeholder */
.pdf-viewer-placeholder {
    display: block; /* now show by default */
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.viewer-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.viewer-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.viewer-header p {
    opacity: 0.8;
}

.pdf-frame {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.pdf-toolbar {
    background: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.toolbar-title {
    font-weight: 600;
    color: #2c3e50;
}

.toolbar-actions {
    display: flex;
    gap: 1rem;
}

.toolbar-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.toolbar-btn:hover {
    background: #5a6fd8;
}

/* New: Embedding wrapper for full-height PDF */
.pdf-embed-wrapper {
    height: 80vh; /* large visible area */
    width: 100%;
}

.pdf-embed-wrapper object,
.pdf-embed-wrapper embed,
.pdf-embed-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Remove old simulated content area sizing */
.pdf-content {
    display: none;
}

/* Markdown Body Styles */
.markdown-body {
    background: white;
    border-radius: 15px;
    padding: 2rem 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
    color: #2c3e50;
    font-size: 1.1rem;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.markdown-body h1 {
    font-size: 2.5rem;
    text-align: center;
    color: #667eea;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #667eea;
}

.markdown-body h2 {
    font-size: 1.8rem;
    color: #764ba2;
    margin-top: 3rem;
    padding-left: 1rem;
    border-left: 4px solid #764ba2;
}

.markdown-body h3 {
    font-size: 1.4rem;
    color: #2c3e50;
}

.markdown-body p {
    margin-bottom: 1rem;
    text-align: justify;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

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

.markdown-body strong {
    color: #2c3e50;
    font-weight: 600;
}

.markdown-body em {
    color: #667eea;
    font-style: italic;
}

.markdown-body blockquote {
    border-left: 4px solid #667eea;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
}

.markdown-body th, .markdown-body td {
    border: 1px solid #e9ecef;
    padding: 0.75rem;
    text-align: left;
}

.markdown-body th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.markdown-body tr:nth-child(even) {
    background: #f8f9fa;
}

.markdown-body code {
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
}

.markdown-body pre {
    background: #2c3e50;
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.markdown-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.markdown-body hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    margin: 2rem 0;
}

/* Footer */
.itinerary-footer {
    padding: 2rem;
    text-align: center;
    color: #555;
}

.itinerary-footer .footer-content p {
    margin: 0;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .itinerary-content {
        padding: 2rem 1rem;
    }
    
    .pdf-notice {
        padding: 2rem;
    }
    
    .pdf-toolbar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .preview-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .pdf-page {
        padding: 1.5rem;
    }
    
    .toolbar-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}