/* Base Styling */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #2980b9;
    --text-color: #555555;
    --text-light: #7f8c8d;       /* Medium gray */
    --light-gray: #f8f9fa;       /* Light gray for backgrounds */
    --border-color: #e9ecef;     /* Light gray for borders */
    --shadow-color: rgba(0,0,0,0.1); /* Shadow color */
    --transition: all 0.3s ease; /* Standard transition */
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --container-width: 80%;
    --max-width: 1200px;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 15px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

header p.tagline {
    margin: 10px 0 0;
    font-size: 1.2em;
    color: #ecf0f1;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

/* Article Styles */
.article-header h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.article-content {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-color);
}

.article-content h2 {
    font-size: 24px;
    color: var(--secondary-color);
    margin-top: 30px;
}

.article-content ul {
    list-style-type: square;
    margin-left: 20px;
}

.article-content li strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.article-footer, footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 50px;
}

.article-footer p, footer p {
    margin: 0.5rem 0;
}

.footer-link, footer a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.9;
}

.footer-link:hover, footer a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-link a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    border: 2px solid var(--secondary-color);
    padding: 8px 16px;
    border-radius: 5px;
    transition: var(--transition);
    display: inline-block;
}

.back-link a:hover {
    background-color: #ecf0f1;
    color: #2980b9;
    border-color: #2980b9;
}

/* Buttons */
.cta-button, .btn, button {
    background: var(--secondary-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.cta-button:hover, .btn:hover, button:hover {
    background: #2980b9;
}

/* Messages and Highlights */
.success-message, .highlight {
    color: var(--secondary-color);
    font-weight: 600;
}

.important-note {
    border: 2px solid var(--secondary-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    background-color: #ecf0f1;
}

/* Form Styles */
form {
    max-width: 600px;
    margin: 0 auto;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-weight: 600;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

/* Error Message */
.error-message {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 1.25rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
}

/* Grid Layouts */
.states-grid, .city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.state-item, .city-item {
    background: #ffffff;
    padding: 10px 15px;
    border-radius: 4px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px var(--shadow-color);
}

.state-item:hover, .city-item:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px var(--shadow-color);
    border-color: var(--secondary-color);
}

.state-item a, .city-item a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: block;
    text-align: center;
}

.state-item a:hover, .city-item a:hover {
    color: #2980b9;
}

.state-item .state-name {
    color: var(--text-light);
    font-size: 0.9em;
    font-weight: normal;
    margin-top: 4px;
    display: block;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    .navbar {
        flex-direction: column;
        padding: 0.5rem 0;
    }
    
    .navbar a {
        width: 100%;
        padding: 0.75rem;
    }
    
    .article-content {
        font-size: 16px;
    }
    
    .article-header h1 {
        font-size: 24px;
    }
    
    .article-content h2 {
        font-size: 20px;
    }

    .states-grid, .city-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
