@import 'variables.css';

* {
    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(--bg-color);
}

/* Layout */
main {
    max-width: 900px;
    margin: var(--spacing-lg) auto;
    padding: 0 var(--spacing-sm);
}

/* Typography */
main > section > h1 {
    color: var(--primary-color);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-xs);
}

main > section > h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-xl);
}

main > section > p {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-base);
}

/* Lists - Scope to specific sections */
.bus-routes ul,
.puzzle-games ul {
    list-style: none;
    display: grid;
    gap: var(--spacing-sm);
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.bus-routes ul li,
.puzzle-games ul li {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.bus-routes ul li:hover,
.puzzle-games ul li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Links - Scope to specific sections */
.bus-routes ul li a,
.puzzle-games ul li a {
    color: var(--text-color);
    text-decoration: none;
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    height: 100%;
}

.bus-routes ul li a:hover,
.puzzle-games ul li a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Sections */
.bus-routes,
.puzzle-games {
    margin-bottom: var(--spacing-xl);
}

.puzzle-games ul {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Media Queries */
@media (max-width: 600px) {
    main > section > h1 {
        font-size: var(--font-size-xl);
    }

    .bus-routes ul,
    .puzzle-games ul {
        grid-template-columns: 1fr;
    }
}

/* Contact Form */
form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 500px;
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg);
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

form label {
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
}

form input[type="text"],
form input[type="email"],
form textarea {
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-color);
    background-color: var(--bg-color);
    width: 100%;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

form textarea {
    resize: vertical;
    min-height: 100px;
}

form button[type="submit"] {
    background-color: var(--primary-color);
    color: var(--button-text-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size-md);
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

form button[type="submit"]:hover {
    background-color: var(--primary-dark-color);
    transform: translateY(-1px);
}