/* ============================================================
   DATV-Express Website — styles.css
   Core layout, nav, typography, footer, helpers
   ============================================================ */

/* ---------- CSS variables ---------- */
:root {
    --datv-blue:    #1a3c5e;
    --datv-accent:  #e07b00;
    --datv-light:   #f4f7fa;
    --datv-dark:    #111827;
    --datv-text:    #2d3748;
    --datv-muted:   #718096;
    --header-h:     64px;
    --max-w:        1140px;
    --radius:       6px;
    --transition:   0.2s ease;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--datv-text);
    background: #fff;
    padding-top: var(--header-h);
}
a { color: var(--datv-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3rem 0; }
.section:nth-child(even) { background: var(--datv-light); }

/* ---------- Navigation ---------- */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--datv-blue);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.nav-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem;
}
.site-brand { color: #fff; text-decoration: none; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.5px; }
.site-brand:hover { text-decoration: none; }
.brand-accent { color: var(--datv-accent); }
.nav-list { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav-item > a, .dropdown-toggle {
    display: block; padding: 0.45rem 0.75rem;
    color: #e2e8f0; font-size: 0.9rem; font-weight: 500;
    border-radius: var(--radius); border: none; background: transparent;
    cursor: pointer; white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.nav-item > a:hover, .dropdown-toggle:hover,
.nav-item > a.is-active, .nav-item.is-active > .dropdown-toggle {
    background: rgba(255,255,255,0.12); color: #fff; text-decoration: none;
}
.has-dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute; top: calc(100% + 4px); left: 0;
    min-width: 220px; background: #fff;
    border: 1px solid #e2e8f0; border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    list-style: none; padding: 0.4rem 0; z-index: 200;
}
.dropdown-menu-right { left: auto; right: 0; }
.dropdown-menu li a, .dropdown-link-btn {
    display: block; width: 100%; padding: 0.55rem 1rem;
    color: var(--datv-text); font-size: 0.875rem; font-weight: 400;
    background: transparent; border: none; cursor: pointer; text-align: left;
    transition: background var(--transition);
}
.dropdown-menu li a:hover, .dropdown-link-btn:hover {
    background: var(--datv-light); color: var(--datv-blue); text-decoration: none;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.is-open .dropdown-menu { display: block; }
.caret { font-size: 0.65rem; margin-left: 0.2rem; }
.hamburger {
    display: none; flex-direction: column; justify-content: space-between;
    width: 26px; height: 20px; background: transparent; border: none; cursor: pointer; padding: 0;
}
.hamburger span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }

/* ---------- Page title band ---------- */
.page-title { background: var(--datv-blue); color: #fff; padding: 2.5rem 0 2rem; }
.page-title h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.4rem; }
.page-title p { font-size: 1.1rem; opacity: 0.85; }

/* ---------- Typography ---------- */
h2 { font-size: 1.6rem; font-weight: 700; color: var(--datv-blue); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.6rem; }
h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 1.15rem; color: var(--datv-muted); margin-bottom: 1.5rem; }
.section h2 { border-left: 4px solid var(--datv-accent); padding-left: 0.75rem; margin-bottom: 1.25rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: 0.65rem 1.5rem;
    background: var(--datv-accent); color: #fff;
    border: none; border-radius: var(--radius);
    font-size: 0.95rem; font-weight: 600; cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    text-decoration: none;
}
.btn:hover { background: #c96d00; color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-danger { background: #c53030; }
.btn-danger:hover { background: #9b2c2c; }
.btn-secondary { background: var(--datv-blue); }
.btn-secondary:hover { background: #14304f; }

/* ---------- Alerts ---------- */
.alert { padding: 0.85rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: 0.925rem; }
.alert-info    { background: #ebf8ff; color: #1a365d; border: 1px solid #bee3f8; }
.alert-success { background: #f0fff4; color: #22543d; border: 1px solid #9ae6b4; }
.alert-error   { background: #fff5f5; color: #742a2a; border: 1px solid #fed7d7; }

/* ---------- Hero banner ---------- */
.hero-banner { width: 100%; max-height: 340px; object-fit: cover; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--datv-dark); color: #a0aec0; padding: 2.5rem 0 1.5rem; margin-top: 3rem; font-size: 0.875rem; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: start; }
.footer-brand { color: #fff; font-size: 0.95rem; line-height: 1.6; }
.footer-links { display: flex; gap: 3rem; }
.footer-col h4 { color: #fff; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.6rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.3rem; }
.footer-col ul li a { color: #a0aec0; font-size: 0.825rem; }
.footer-col ul li a:hover { color: #fff; text-decoration: none; }
.footer-copy { color: #718096; font-size: 0.8rem; align-self: end; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-list {
        display: none; position: fixed;
        top: var(--header-h); left: 0; right: 0;
        background: var(--datv-blue);
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 0.75rem 0; border-top: 1px solid rgba(255,255,255,0.1);
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    }
    .nav-list.is-open { display: flex; }
    .nav-item > a, .dropdown-toggle { border-radius: 0; }
    .dropdown-menu {
        position: static; box-shadow: none; border: none;
        background: rgba(0,0,0,0.2); border-radius: 0; min-width: 0; padding: 0;
    }
    .dropdown-menu li a, .dropdown-link-btn { color: #cbd5e0; padding-left: 2rem; }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-copy { text-align: left; }
    .footer-links { flex-wrap: wrap; gap: 1.5rem; }
}
