/* Variables */

:root {
    --site-width: 800px;
}

/* Reset */

* {
    box-sizing: border-box;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Layout */

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    grid-template-rows: auto 1fr auto; /* header / main / footer */
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
    background: #f4f4f4;
}

header {
    display: flex;
    justify-content: center;
    background: #111;
}

main {
    flex: 1;
    display: flex;
}

footer {
    display: flex;
    justify-content: center;
    background: #111;
}

.header-content {
    max-width: var(--site-width);
    width: 100%;
    height:60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.main-container {
    flex: 1;
    display: flex;
    flex-wrap: wrap;    
}

    .main-container .main-content {
        max-width: var(--site-width);
        width: 100%;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        display: flex;
        flex-direction: column;
        background: white;
    }

        .main-container .main-content > section {
            flex: 1;
            padding: 0 25px 40px 25px;
        }

.main-container aside {
    flex: 1;
}

.footer-content {
    max-width: var(--site-width);
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

    .footer-content * {
        color: #a8a8a8;
        font-size: .90rem;
        text-decoration: none;
    }

    .footer-content a:hover {
        text-decoration: underline;
    }
               

/* Ads */

.top-ad {
    /*position: sticky;
    top: 0;
    z-index: 99;*/
    text-align: center;
}

.bottom-ad {
    text-align: center;
}

.side-ad {
    position: sticky;
    top: 0;
    z-index: 99;
}

.sample-side-ad {
    background: #ececec;
    border: 1px solid #ccc;
    width: 155px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #333;
}

.sample-inline-ad {
    background: #ececec;
    border: 1px solid #ccc;
    width: 155px;
    height: 75px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Logo */

.logo {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px; /* space between image and title */    
}

    .logo a, .logo a:hover {
        color: white;
        text-decoration: none;
    }
    
    .logo img {
        height: 32px;
        width: auto;
        border-radius: 8px;
        object-fit: contain;
        display: block;
    }

    .logo h1 {
        font-size: 1.5rem;
        margin: 0;
        line-height: 1;        
    }

/* Nav Menu */

nav.menu {
    display: flex;
    gap: 20px
}

    nav.menu a {
        color: white;
        text-decoration: none;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        text-wrap: nowrap;
    }

        nav.menu a:hover {
            text-decoration: underline;
        }

        nav.menu a.active {
            font-weight: 600;
            border-bottom: 2px solid #fff;
        }

            nav.menu a.active:hover {
                text-decoration: none;
            }


/* Typography */

/* ============================= */
/* TYPOGRAPHY */
/* ============================= */

h1, h2, h3, h4 {
    margin-top: 1.2em;
    margin-bottom: 0.9em;
    line-height: 1.25;
    font-weight: 400;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 1.5em;
}

h3 {
    font-size: 1.3rem;
}

p {
    margin: 1em 0;
}

a {
    color: #0066cc;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

ul, ol {
    padding-left: 1.5rem;
    margin: 1em 0;
}

blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1rem;
    color: #555;
    margin: 1.5em 0;
}

code {
    background: #f2f2f2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

pre {
    background: #111;
    color: #f8f8f8;
    padding: 16px;
    overflow-x: auto;
}

    pre code {
        background: none;
        padding: 0;
    }

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
}

th {
    background: #f7f7f7;
}



/* Cards */

.guide-grid {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.guide-card {
    display: block;
    padding: 1.5rem;
    border-radius: 10px;
    background: #f8f9fa;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid #e5e5e5;
}

    .guide-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    }

    .guide-card h3 {
        margin-top: 0;
        margin-bottom: 0.5rem;
        font-size: 1.2rem;
    }

    .guide-card p {
        font-size: 0.95rem;
        color: #666;
        margin: 0;
    }

    .guide-card,
    .guide-card:hover,
    .guide-card:focus,
    .guide-card:active {
        text-decoration: none;
        color: inherit; /* optional: keep text color consistent */
    }

.flexheader {
    display: flex;
    justify-content: space-between; /* h1 left, link right */
    align-items: center;
    flex-wrap: wrap; /* allow wrapping on small screens */
    gap: 0.5rem; /* optional spacing for small screens */
    margin-top: 1.2em; /* same as the margin removed */
}

    .flexheader h1 {
        margin: 0;
    }
    /* Back link floated right */
    .flexheader .back-link {
        color: #0066cc; /* default app blue */
        text-decoration: none;
        font-weight: 350;
        font-size: 0.85rem; /* smaller text */
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        transition: background-color 0.2s, color 0.2s;
    }
        /* Hover/focus states same as Quick Links */
        .flexheader .back-link:hover,
        .flexheader .back-link:focus {
            color: #004999; /* darker blue */
            background-color: rgba(0, 0, 0, 0.05); /* subtle highlight */
            outline: none;
        }

        .flexheader .back-link:active {
            background-color: rgba(0, 0, 0, 0.1);
        }

/* Quick Link */

#quick-links {
    background-color: transparent; /* keep container transparent/white */
    padding: 0.5rem 0;
    font-family: inherit;
    max-width: 300px; /* optional width */
}

    #quick-links h2 {
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
        color: #222; /* header color slightly darker */
        border-bottom: 1px solid #ccc;
        padding-bottom: 0.25rem;
    }

    #quick-links ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        #quick-links ul li {
            margin-bottom: 0.25rem;
            white-space: nowrap; /* prevent wrapping */
        }

            #quick-links ul li a {
                display: inline-block;
                text-decoration: none;
                padding: 0.25rem 0.5rem;
                border-radius: 4px;
                transition: background-color 0.2s, color 0.2s;
                font-weight: 500;
                font-size: 0.95rem;
            }

                #quick-links ul li a:hover,
                #quick-links ul li a:focus {
                    color: #004999; /* darker blue for contrast */
                    background-color: rgba(0, 0, 0, 0.03); /* very subtle highlight */
                    outline: none;
                }

                #quick-links ul li a:active {
                    background-color: rgba(0, 0, 0, 0.06);
                }

/* Back to Top */

.back-to-top {
    display: inline-block;
    color: #0066cc; /* app default blue */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem; /* smaller than Quick Links */
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s, font-size 0.2s;
}

    .back-to-top:hover,
    .back-to-top:focus {
        color: #004999; /* darker blue on hover/focus */
        background-color: rgba(0, 0, 0, 0.05); /* subtle highlight */
        outline: none;
    }

    .back-to-top:active {
        background-color: rgba(0, 0, 0, 0.1);
    }

/* A-Z Selector */

.az-selector {
    margin-top: 3rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

    .az-selector a {
        display: inline-block;
        padding: 0.25rem 0.30rem;
        border-radius: 6px;
        text-decoration: none;
        color: #0066cc;
        font-weight: 500;
        font-size: 0.9rem;
        transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    }


        .az-selector a:hover,
        .az-selector a:focus {
            color: #004999;
            background-color: rgba(0, 102, 204, 0.08);
            transform: translateY(-1px);
            outline: none;
        }

        .az-selector a:active {
            transform: translateY(0);
        }

/* Terms List */

.terms-list h2 {
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    border-radius: 10px;
    background: #f8f9fa;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid #e5e5e5;
}

.terms-list p {
    margin-left: 0.75rem
}

/* Hero Content Home Page */

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem;
}

    .hero-content h1 {
        font-size: clamp(1.8rem, 5vw, 3rem);
        text-shadow: 2px 2px 6px rgba(0,0,0,0.6);
        margin: 0;
    }

    .hero-content p {
        font-size: clamp(1rem, 2.5vw, 1.4rem);
        text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
        margin-top: 0.75rem;
        line-height: 1.6;
    }

/* Mobile Settings */

@media (max-width: 768px) {
    
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
        gap: 10px;
    }

    .side-ad {
        display:none;
    }
}

@media (max-width: 410px) {

    nav.menu a {
        font-size: 12px;        
    }

}
