/* ==========================================================================
   DNS Central - Modern Stylesheet
   Replaces: dnscentral.2017.css
   ========================================================================== */

/* --- 1. Variables & Base Reset --- */
:root {
    /* --- Brand Colors --- */
    --brand-red: #cc0000;    
    --brand-yellow: #ffcc00; 
    
    /* --- Neutral Base Colors --- */
    --text-color: #333333;
    --text-light: #666666;
    --bg-body-color: #F5F5F5;
    --bg-color: #ffffff;
    --hover-bg: #f8f9fa;
    --border-color: #eaeaea;
    --max-width: 1200px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-body-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

.trademark {
    vertical-align: top;
    font-size: 0.7em; 
}

/* --- 2. Sticky Header & Branding --- */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.brand-link {
    text-decoration: none;
    color: var(--text-color);
}

.site-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--brand-red);
    line-height: 1.2;
}

/* Shared styling for both taglines */
.site-tagline, 
.site-tagline-min {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.2rem;
}

/* Desktop View: Show long tagline, hide min */
.site-tagline {
    display: block; 
}

.site-tagline-min {
    display: none;
}

/* --- 3. Desktop Navigation --- */
.site-nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

/* Animated Underline Hover Effect in Brand Red */
.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--brand-red);
    transition: width 0.3s ease;
}

.nav-links li a:hover {
    color: var(--brand-red);
}

.nav-links li a:hover::after {
    width: 100%;
}

/* Help Button with Yellow Accent */
.btn-help {
    text-decoration: none;
    background-color: var(--hover-bg);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--brand-yellow); 
    transition: all 0.2s ease;
}

.btn-help:hover {
    background-color: var(--brand-yellow);
    color: #000000; 
    border-color: var(--brand-yellow);
}

/* --- 4. Main Content Area --- */
.page-content {
    max-width: var(--max-width);
    margin: 3rem auto;
    padding: 0 1.5rem;
    min-height: 60vh; 
}

h1.title, .title {
    color: var(--brand-red);
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.page-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: #444;
}

/* --- 5. Footer Styles --- */
.page-footer {
    background-color: var(--hover-bg);
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Override the header's left-alignment and constrain the width */
.site-nav-container.site-nav-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    justify-content: center; /* Centers the navigation links on wide screens */
    width: 100%;
}

.site-nav-bottom .tab-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.site-nav-bottom .tab-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

/* Footer links hover effect (Red text, Yellow underline) */
.site-nav-bottom .tab-links a:hover {
    color: var(--brand-red);
}

.site-nav-bottom .tab-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--brand-yellow);
    transition: width 0.3s ease;
}

.site-nav-bottom .tab-links a:hover::after {
    width: 100%;
}

/* Desktop View: Show long footer nav, hide min */
.site-nav-bottom .site-nav {
    display: block; 
}

.site-nav-bottom .site-nav-min {
    display: none; 
}

.footnote {
    font-size: 0.85rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto; /* Keeps the footnote centered on wide screens */
    line-height: 1.6;
}

/* Footnote Inline Links */
.footnote a {
    color: var(--brand-red); 
    text-decoration: none;
    padding: 0 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.footnote a:hover {
    color: #000000; 
    background-color: var(--brand-yellow); 
    text-decoration: none;
}

/* --- 6. Mobile Responsiveness & Hamburger Menu --- */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--brand-red); 
    transition: all 0.3s ease-in-out;
}

@media (max-width: 900px) {
    .header-inner {
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .hamburger {
        display: block;
    }

    /* --- Mobile Text Swaps --- */
    /* Guarantee the taglines swap correctly on narrow screens */
    .site-tagline {
        display: none !important; 
    }
    
    .site-tagline-min {
        display: block !important; 
    }

    /* Guarantee the footer navs swap correctly on narrow screens */
    /* The :not selector ensures we only hide the desktop version, not both */
    .site-nav-bottom .site-nav:not(.site-nav-min) {
        display: none !important; 
    }
    
    .site-nav-bottom .site-nav-min {
        display: block !important; 
    }

    /* --- Off-canvas menu setup --- */
    .site-nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 6rem 2rem 2rem; 
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
    }

    .site-nav-container.active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    /* Hamburger to X Animation */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
