/* Q&A Information Hub - Static Site Styles */

/* Color Palette */
:root {
    --red: #D50032;
    --green: #009639;
    --black: #000000;
    --white: #FFFFFF;
    --beige: #F5F5DC;
    --gray-light: #f0f0f0;
    --gray-medium: #d0d0d0;
    --gray-dark: #666666;
    --shadow-sm: rgba(0, 0, 0, 0.08);
    --shadow-md: rgba(0, 0, 0, 0.12);
    --shadow-lg: rgba(0, 0, 0, 0.16);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--beige);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
.site-header {
    padding: 40px 0 60px;
    box-shadow: 0 4px 20px var(--shadow-md);
    position: relative;
    width: 220px;
    height: 110px;
    background-image: -webkit-linear-gradient(top, #000 0, #000 33%, #FFF 33%, #FFF 67%, #007a33 67%, #007a33 100%);
    background-image: linear-gradient(180deg, #000 0, #000 33%, #FFF 33%, #FFF 67%, #007a33 67%, #007a33 100%);
    width: 100%;
    height: 20rem;
}

.site-header::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 12rem;
    height: 20rem;
    background-color: #c8102e;
    -webkit-clip-path: polygon(0 0, 100% 50%, 0 100%);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.site-title {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 18px 60px 18px 24px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    background-color: var(--white);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: var(--gray-dark);
}

.search-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-dark);
    pointer-events: none;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 0 60px;
}

.results-info {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1rem;
    color: var(--gray-dark);
    font-weight: 500;
}

/* Questions Grid */
.questions-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}


/* Question Card */
.question-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.question-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-md);
}

.question-card.expanded {
    box-shadow: 0 8px 32px var(--shadow-lg);
}

/* Card Header */
.card-header {
    padding: 24px;
    border-left: 6px solid var(--red);
}

.card-headline {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card-description {
    color: var(--gray-dark);
    line-height: 1.7;
    margin-top: 12px;
}

/* Expand Icon */
.expand-icon {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-weight: 600;
    font-size: 0.95rem;
}

.expand-icon svg {
    transition: transform 0.3s;
}

.question-card.expanded .expand-icon svg {
    transform: rotate(180deg);
}

/* Answer Content */
.answer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-card.expanded .answer-content {
    max-height: 5000px;
}

.answer-inner {
    padding: 24px;
    background-color: var(--beige);
    border-top: 2px solid var(--green);
}

.answer-section {
    margin-bottom: 20px;
}

.answer-section:last-child {
    margin-bottom: 0;
}

.answer-heading {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--green);
}

.answer-text {
    color: var(--black);
    line-height: 1.8;
    white-space: pre-wrap;
}

.answer-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-sm);
    margin: 8px 0;
}

.answer-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px var(--shadow-sm);
}

/* Sources Section */
.sources-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--green);
}

.sources-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 15px;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background-color: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--black);
    transition: all 0.2s;
}

.source-item:hover {
    border-color: var(--green);
    background-color: var(--beige);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-sm);
}

.source-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.source-title {
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

/* YouTube Thumbnail Sources */
.source-item .source-thumbnail {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
}

.source-item:has(.source-thumbnail) {
    flex-direction: column;
    align-items: stretch;
}

.source-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.source-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(213, 0, 50, 0.9);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.source-item:hover .source-play-icon {
    background-color: var(--red);
    transform: translate(-50%, -50%) scale(1.1);
}

.source-item:has(.source-thumbnail) .source-title {
    padding: 8px 0 0;
    text-align: center;
    font-weight: 600;
}

@media (max-width: 768px) {
    .sources-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-dark);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-dark);
}

.no-results p {
    font-size: 1.2rem;
}

/* Footer */
.site-footer {
    background-color: var(--black);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
}

.site-footer p {
    margin: 0;
}

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

.question-card {
    animation: fadeIn 0.5s ease-out;
}

.question-card:nth-child(1) { animation-delay: 0.05s; }
.question-card:nth-child(2) { animation-delay: 0.1s; }
.question-card:nth-child(3) { animation-delay: 0.15s; }
.question-card:nth-child(4) { animation-delay: 0.2s; }
.question-card:nth-child(5) { animation-delay: 0.25s; }

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }

    .search-input {
        font-size: 1rem;
        padding: 16px 50px 16px 20px;
    }

    .search-icon {
        right: 20px;
    }

    .card-headline {
        font-size: 1.15rem;
    }

    .card-header {
        padding: 20px;
    }

    .answer-inner {
        padding: 20px;
    }

    .container {
        padding: 0 15px;
    }

    .main-content {
        padding: 30px 0 40px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 30px 0 50px;
    }

    .site-title {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }

    .search-input {
        font-size: 0.95rem;
    }

    .card-headline {
        font-size: 1.1rem;
    }
}

/* Accessibility */
.question-card:focus {
    outline: 3px solid var(--green);
    outline-offset: 2px;
}

.search-input:focus {
    outline: 3px solid var(--green);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .search-container {
        display: none;
    }

    .question-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--gray-medium);
    }

    .answer-content {
        max-height: none !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Hidden Class */
.hidden {
    display: none !important;
}
