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

/* Color Palette:
   #fdfdfa (Archival Ivory)
   #222222 (Deep Charcoal)
   #8B0000 (Sangre Red)
   #2C3E50 (Mountain Blue-Gray)
   #34495E (Darker Blue-Gray)
   #ECF0F1 (Light Gray)
   #BDC3C7 (Medium Gray)
*/

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

/* Header with Marquee */
.header {
    position: relative;
    height: 400px;
    background: url('sangre-de-cristo-film-conservatory-marquee.png') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.header h1 {
    font-family: 'Garamond', 'Palatino', serif;
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.header h2 {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 300;
    opacity: 0.95;
}

/* Navigation */
nav {
    background: #34495E;
    padding: 1rem 0;
    text-align: center;
}

nav a {
    color: #ECF0F1;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    margin: 0 0.5rem;
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 4px;
}

nav a:hover {
    background: rgba(236, 240, 241, 0.2);
}

/* Navigation active state */
nav a.active {
    background: #8B0000;
    color: white;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-content {
    padding: 4rem 0;
}

.intro-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.intro-section h3 {
    font-size: 2.2rem;
    color: #8B0000;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.lead-text {
    font-size: 1.3rem;
    color: #2C3E50;
    margin-bottom: 2rem;
    font-style: italic;
}

.description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin: 4rem 0;
}

.feature {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #8B0000;
}

.feature h4 {
    font-size: 1.4rem;
    color: #8B0000;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature p {
    color: #444;
    line-height: 1.7;
}

.highlight {
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    color: white;
    border-left: none;
}

.highlight h4 {
    color: white;
}

.highlight p {
    color: rgba(255, 255, 255, 0.95);
}

/* Mission Statement */
.mission {
    background: #2C3E50;
    color: white;
    padding: 4rem 0;
    margin: 4rem 0;
}

.mission h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.mission p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.8;
}

/* Status Banner */
.status-banner {
    background: #ECF0F1;
    border: 1px solid #BDC3C7;
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 8px;
    text-align: center;
}

.status-banner h4 {
    color: #8B0000;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.status-banner p {
    color: #555;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: #34495E;
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer a {
    color: #ECF0F1;
    text-decoration: none;
}

.footer a:hover {
    color: #8B0000;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        height: 300px;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .header h2 {
        font-size: 1.2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .intro-section h3 {
        font-size: 1.8rem;
    }

    .lead-text {
        font-size: 1.1rem;
    }
}

/* ===== SEARCH PAGE STYLES ===== */
.search-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.search-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    border-left: 4px solid #8B0000;
}

.search-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #BDC3C7;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Georgia', 'Times New Roman', serif;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.search-btn {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #A52A2A, #8B0000);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.3);
}

.search-help {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.advanced-link {
    text-align: center;
    margin-top: 1rem;
}

.advanced-link a {
    color: #2C3E50;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.advanced-link a:hover {
    color: #8B0000;
}

.results-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.results-header {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h2 {
    color: #8B0000;
    font-size: 1.5rem;
    font-weight: 400;
}

.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #ECF0F1;
    border-top: 4px solid #8B0000;
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    font-size: 1.2rem;
    color: #2C3E50;
    margin-bottom: 1rem;
}

.loading-quote {
    font-style: italic;
    color: #8B0000;
    font-size: 1rem;
    transition: opacity 0.3s ease;
}

.solr-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.solr-container {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.solr-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.solr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.2);
    border-color: #8B0000;
}

.solr-card.ai-enhanced {
    border-color: #8B0000;
    background: linear-gradient(to bottom, rgba(139, 0, 0, 0.02), white);
}

.solr-poster {
    width: 100%;
    height: 400px;
    object-fit: cover;
    background: #ECF0F1;
}

.solr-text {
    padding: 1.5rem;
}

.solr-title {
    color: #8B0000;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.solr-year {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.solr-director {
    color: #2C3E50;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.solr-plot {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.ai-insight {
    background: rgba(139, 0, 0, 0.05);
    border-left: 3px solid #8B0000;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 0 6px 6px 0;
}

.ai-insight-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #8B0000;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ai-insight-text {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    font-style: italic;
}

.solr-show-details {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #2C3E50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.solr-show-details:hover {
    background: #8B0000;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.no-results h3 {
    color: #8B0000;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.no-results p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ===== ADVANCED SEARCH PAGE STYLES ===== */
.advanced-search-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.search-header {
    text-align: center;
    margin-bottom: 40px;
}

.search-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #8B0000;
    font-weight: 400;
}

.search-header .subtitle {
    color: #666;
    font-style: italic;
    font-size: 1.1em;
}

.query-builder {
    background: white;
    border: 2px solid #BDC3C7;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.query-input-group {
    margin-bottom: 25px;
}

.query-input-group label {
    display: block;
    margin-bottom: 8px;
    color: #8B0000;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

#luceneQuery {
    width: 100%;
    min-height: 120px;
    background: #fdfdfa;
    border: 2px solid #BDC3C7;
    color: #222222;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border-radius: 8px;
    resize: vertical;
    transition: all 0.3s ease;
}

#luceneQuery:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.query-helpers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.helper-section {
    background: #ECF0F1;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #8B0000;
}

.helper-section h3 {
    color: #2C3E50;
    font-size: 1em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.helper-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 4px;
}

.helper-item:hover {
    background: rgba(139, 0, 0, 0.1);
    transform: translateX(5px);
}

.helper-item code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: #8B0000;
    margin-right: 8px;
    font-weight: 600;
}

.helper-item span {
    color: #555;
    font-size: 0.9em;
}

.search-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

#searchButton {
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

#searchButton:hover {
    background: linear-gradient(135deg, #A52A2A, #8B0000);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 0, 0, 0.4);
}

#clearButton, #saveButton, #loadButton {
    background: transparent;
    color: #666;
    border: 2px solid #BDC3C7;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Georgia', 'Times New Roman', serif;
}

#clearButton:hover {
    border-color: #2C3E50;
    color: #2C3E50;
}

#saveButton:hover, #loadButton:hover {
    border-color: #8B0000;
    color: #8B0000;
}

.row-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.row-filter label {
    color: #666;
    font-weight: 600;
}

#rowsFilter {
    background: #fdfdfa;
    border: 2px solid #BDC3C7;
    color: #222222;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.results-count {
    color: #8B0000;
    font-size: 1.1em;
    font-weight: 600;
}

.export-button {
    background: rgba(44, 62, 80, 0.1);
    color: #2C3E50;
    border: 2px solid #2C3E50;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-button:hover {
    background: #2C3E50;
    color: white;
}

#searchResults {
    min-height: 200px;
}

.loading {
    text-align: center;
    padding: 50px;
}

/* ===== CONTACT PAGE STYLES ===== */
.intro {
    text-align: center;
    margin-bottom: 3rem;
}

.intro h2 {
    color: #8B0000;
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.intro p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #8B0000;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2C3E50;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group label .required {
    color: #8B0000;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #BDC3C7;
    border-radius: 6px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fdfdfa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.ai-enhance-btn {
    background: linear-gradient(135deg, #2C3E50, #34495E);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-enhance-btn:hover {
    background: linear-gradient(135deg, #34495E, #2C3E50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.submit-btn {
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #A52A2A, #8B0000);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.3);
}

.submit-btn:disabled {
    background: #BDC3C7;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    font-weight: 600;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border: 2px solid rgba(46, 204, 113, 0.3);
    color: #27ae60;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    border: 2px solid rgba(231, 76, 60, 0.3);
    color: #c0392b;
}

/* ===== MOVIE DETAILS PAGE STYLES ===== */
.back-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.header-title {
    color: white;
    font-family: 'Garamond', 'Palatino', serif;
    font-size: 1.5rem;
    margin: 0;
    flex: 1;
    font-weight: 300;
}

.film-header {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #8B0000;
}

.poster-section {
    flex-shrink: 0;
}

.main-poster {
    width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 2px solid #BDC3C7;
}

.film-info {
    flex: 1;
}

.film-title {
    font-family: 'Garamond', 'Palatino', serif;
    font-size: 2.5rem;
    color: #8B0000;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.film-meta {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.film-meta span {
    display: inline-block;
}

.crew-section {
    margin-bottom: 1.5rem;
}

.crew-section h3 {
    color: #8B0000;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.crew-section p {
    color: #444;
    line-height: 1.6;
}

.external-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.external-link {
    background: #2C3E50;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.external-link:hover {
    background: #8B0000;
}

.archive-badge {
    background: rgba(139, 0, 0, 0.1);
    color: #8B0000;
    border: 1px solid rgba(139, 0, 0, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.section-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.section-title {
    color: #8B0000;
    font-family: 'Garamond', 'Palatino', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

/* Responsive adjustments for page-specific styles */
@media (max-width: 768px) {
    .search-input-group {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .solr-results {
        grid-template-columns: 1fr;
    }

    .film-header {
        flex-direction: column;
        gap: 2rem;
    }

    .main-poster {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

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