/* 
 * Random Canadian City Generator
 * Main stylesheet
 */

:root {
    --primary-color: #c8102e; /* Canadian red */
    --secondary-color: #ffffff;
    --accent-color: #f5f5f5;
    --text-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--accent-color);
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    overflow: hidden;
}

header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 30px 20px;
    text-align: center;
}

header h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
}

main {
    padding: 30px 20px;
}

.city-card {
    background-color: var(--secondary-color);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.city-name {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.city-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Loading styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: #666;
    font-size: 1rem;
    font-style: italic;
}

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

/* Error message styles */
.error-message {
    padding: 20px;
    background-color: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 5px;
    color: #d32f2f;
    text-align: center;
}

.error-message p {
    margin-bottom: 10px;
}

.error-message p:last-child {
    margin-bottom: 0;
}

.error-message em {
    font-size: 0.9rem;
    opacity: 0.8;
}

.actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

button#refresh-btn {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button#refresh-btn:hover {
    background-color: #a00d24;
}

/* FAQ Section Styles */
.faq-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--accent-color);
}

.faq-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--accent-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.faq-item p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

footer {
    background-color: var(--accent-color);
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 40px;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .city-name {
        font-size: 1.7rem;
    }
    
    .city-intro {
        font-size: 1rem;
    }
    
    button#refresh-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .faq-section h2 {
        font-size: 1.7rem;
    }
    
    .faq-item h3 {
        font-size: 1.2rem;
    }
    
    .faq-item {
        padding: 15px;
        margin-bottom: 20px;
    }
} 