/*
Theme Name: Xportpark Resources Theme
Theme URI: https://xportpark.com/
Author: Khun Ying Siri
Author URI: https://xportpark.com/
Description: A professional and responsive theme for the Xportpark Resources site. Built to showcase resource articles in a modern grid layout with multi‑language support and brand‑appropriate styling. Works seamlessly on web and mobile.
Version: 1.0.0
License: GPL2
*/

/* Global settings */
body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

a {
    color: #003A6B;
    text-decoration: none;
    transition: color 0.25s ease;
}
a:hover,
a:focus {
    color: #f5c542;
}

/* Header */
header.site-header {
    background-color: #003A6B;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
}

header.site-header .site-branding {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

header.site-header .site-branding img {
    max-height: 36px;
    width: auto;
}

nav.primary-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

nav.primary-navigation a {
    color: #ffffff;
    font-weight: 500;
}

nav.primary-navigation a:hover,
nav.primary-navigation a:focus {
    color: #f5c542;
}

/* Mobile menu toggle button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    nav.primary-navigation ul {
        display: none;
        flex-direction: column;
        background-color: #003A6B;
        width: 100%;
        margin-top: 0.5rem;
    }

    nav.primary-navigation ul.open {
        display: flex;
    }

    nav.primary-navigation ul li {
        margin: 0;
    }

    nav.primary-navigation ul li a {
        padding: 0.75rem 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav.primary-navigation ul ul {
        position: static;
    }
}

/* Dropdown menus */
nav.primary-navigation ul ul {
    display: none;
    position: absolute;
    background-color: #003A6B;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    min-width: 180px;
    top: 100%;
    left: 0;
    z-index: 99;
}

nav.primary-navigation ul li:hover > ul {
    display: block;
}

.lang-search-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-search-wrap form {
    margin: 0;
}

.lang-search-wrap select,
.lang-search-wrap input[type="text"] {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.lang-search-wrap button {
    background-color: #f5c542;
    border: none;
    color: #003A6B;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.lang-search-wrap button:hover {
    background-color: #ffdc70;
}

/* Hero section */
/* Use a soft gradient instead of a flat colour to add depth */
.hero {
    background: linear-gradient(to bottom, #f9e68a 0%, #f5c542 100%);
    padding: 2rem 1rem;
    text-align: center;
    color: #003A6B;
}

.hero h1 {
    margin: 0 0 0.5rem;
    font-size: 2.5rem;
}

.hero p {
    margin: 0;
    font-size: 1.25rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Controls bar and filters */
.controls-bar {
    width: 100%;
    background-color: #e8eff8;
    padding: 0.5rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.controls-bar form {
    margin: 0;
}

.controls-bar select,
.controls-bar input[type="text"] {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.controls-bar button {
    background-color: #003A6B;
    border: none;
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.controls-bar button:hover {
    background-color: #002a4f;
}

.filter-bar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-bar a {
    background-color: #003A6B;
    color: #ffffff;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.25s ease;
}

.filter-bar a:hover,
.filter-bar a.current {
    background-color: #f5c542;
    color: #003A6B;
}

/* Main content wrapper */
main.site-content {
    max-width: 1080px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Resource grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.resource-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease;
    background-color: #ffffff;
}

.resource-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.resource-card .card-image img {
    width: 100%;
    height: auto;
    display: block;
}

.resource-card .card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.resource-card h2 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    color: #003A6B;
}

.resource-card .excerpt {
    flex-grow: 1;
    color: #374151;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.resource-card .read-more {
    align-self: flex-start;
    background-color: #003A6B;
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.25s ease;
}

.resource-card .read-more:hover {
    background-color: #002a4f;
}

/* Footer */
footer.site-footer {
    background-color: #003A6B;
    color: #ffffff;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

footer.site-footer .footer-inner {
    max-width: 1080px;
    margin: 0 auto;
}

footer.site-footer .footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

footer.site-footer .footer-column {
    flex: 1 1 200px;
}

footer.site-footer .footer-column h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #f5c542;
}

footer.site-footer .footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer.site-footer .footer-column ul li {
    margin-bottom: 0.4rem;
}

footer.site-footer .footer-column a {
    color: #f5c542;
}

footer.site-footer .footer-column .social-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

footer.site-footer .social-links a {
    display: inline-block;
    padding: 0.4rem;
    background-color: #ffffff;
    color: #003A6B;
    border-radius: 50%;
    transition: background-color 0.25s ease, color 0.25s ease;
}

footer.site-footer .social-links a:hover {
    background-color: #f5c542;
    color: #003A6B;
}