/*==============================================================================
  VARIABLES & RESET
==============================================================================*/
:root {
    --primary: #1A033D;
    --accent: #00EBB4;
    --bg: #F9F9FB;
    --text: #333;
    --muted: #555;
    --white: #fff;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-h: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --font: 'Manrope', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
}

/*==============================================================================
    CONTAINERS
  ==============================================================================*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/*==============================================================================
    HEADER & NAVIGATION
  ==============================================================================*/
.site-header {
    background: var(--white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 16px;
    width: 90%;
}

.logo img {
    height: 40px;
}

/*==============================================================================
    HAMBURGER (mobile)
  ==============================================================================*/
.menu-toggle {
    display: none;
    position: relative;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    /* above overlay */
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 10px;
}

.menu-toggle span:nth-child(3) {
    top: 20px;
}

/* Animate to “X” */
.menu-toggle.open span:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg);
}

/*==============================================================================
    NAV LINKS (desktop)
  ==============================================================================*/
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.nav-links li {
    list-style: none;
    position: relative;
}

/* .nav-links li + li::before {
    content: '•';
    position: absolute;
    left: -10px;
    color: #999;
  } */

.nav-links a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    padding: 4px 8px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

/*==============================================================================
    SEARCH SECTION
  ==============================================================================*/
.search-section {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 64px 0;
}

#search-bar {
    max-width: 600px;
    margin: 0 auto;
}

.ais-SearchBox {
    display: flex;
}

.ais-SearchBox-input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.ais-SearchBox-submit {
    background: var(--accent);
    border: none;
    padding: 12px;
    border-radius: 0 4px 4px 0;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
}

/*==============================================================================
    CARDS LAYOUT (flex-based)
  ==============================================================================*/
.cards-section {
    padding: 64px 0;
}

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin: 0 auto;
}

.card {
    flex: 1 1 260px;
    max-width: 300px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    padding: 32px 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-h);
}

.card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.card img {
    width: 80px;
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.card-desc {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

/*==============================================================================
    FOOTER
  ==============================================================================*/
.site-footer {
    background: var(--white);
    text-align: center;
    padding: 32px 0;
    color: #666;
    font-size: 0.875rem;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.05);
}

/*==============================================================================
    RESPONSIVE: MOBILE & TABLET
  ==============================================================================*/
@media (max-width: 768px) {

    /* Show hamburger */
    .menu-toggle {
        display: block;
    }

    /* Full-screen overlay menu */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        transform: translateX(100vw);
        transition: transform 0.3s ease;
        z-index: 1001;
        gap: 24px;
        padding: 0;
    }

    .nav-links.nav-open {
        transform: translateX(0);
    }

    /* Remove desktop separators and make links bold & large */
    .nav-links li+li::before {
        display: none;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 700;
        margin: 12px 0;
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 32px;
    }

    .cards-section {
        padding: 48px 0;
    }
}

/* 404 Page */
section.error-section {
    padding: 32px 0;
}

section.error-section h1 {
    font-size: 5rem;
    margin-bottom: 16px;
}
section.error-section h2 {
    font-size: 2.5rem;
    margin-bottom: 14px;
}