/* ============================================================
   2C2S — Site Shell CSS for Agenda Integration
   ============================================================
   Styles for the main site's navbar and footer when used
   inside the agenda application. Uses 'site-' prefixed classes
   to avoid any conflict with agenda's own style.css.
   ============================================================ */

/* ============================================================
   COLOR PALETTE (matches main site — edit here to change)
   ============================================================ */
:root {
    --site-red: #D32F2F;
    --site-red-dark: #B71C1C;
    --site-blue: #1565C0;
    --site-blue-dark: #0D47A1;
    --site-dark: #1A1A2E;
    --site-darker: #0F0F1A;
    --site-light: #F5F5F5;
    --site-white: #FFFFFF;
    --site-gray: #757575;
    --site-gray-light: #E0E0E0;
}

/* Dark mode adjustments:
   navbar & footer always stay dark, so we do NOT override
   --site-dark / --site-darker here (they serve as backgrounds). */

/* ============================================================
   LOGO COLORS (shared with main site)
   ============================================================ */
.logo-2 { color: var(--site-dark); font-weight: 900; }
.logo-c { color: var(--site-red); font-weight: 900; }
.logo-s { color: var(--site-blue); font-weight: 900; }

/* ============================================================
   SITE NAVBAR (main navigation)
   ============================================================ */
.site-navbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: var(--site-dark);
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 2px 20px rgba(0,0,0,.15);
}

.site-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-nav-logo {
    font-size: 1.8rem;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    letter-spacing: -1px;
    text-decoration: none;
    padding: 14px 0;
    display: flex;
    align-items: center;
    transition: opacity .3s;
}

.site-nav-logo:hover { opacity: .85; }

.site-navbar .logo-2 { color: var(--site-white); }
.site-navbar .logo-c { color: var(--site-red); }
.site-navbar .logo-s { color: var(--site-blue); }

/* Nav menu */
.site-nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    border-radius: 8px;
    transition: all .3s ease;
    white-space: nowrap;
}

.site-nav-link:hover {
    color: var(--site-white);
    background: rgba(255,255,255,.1);
}

.site-nav-link.active {
    color: var(--site-white);
    background: rgba(255,255,255,.15);
}

/* CTA button in navbar (Agenda) */
.site-nav-cta {
    background: linear-gradient(135deg, var(--site-red), var(--site-blue)) !important;
    color: var(--site-white) !important;
    border-radius: 50px !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    margin-left: 4px;
}

.site-nav-cta:hover {
    opacity: .9;
    transform: scale(1.02);
}

/* Hamburger toggle */
.site-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.site-nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--site-white);
    border-radius: 3px;
    transition: all .3s;
}

/* ============================================================
   ADMIN SUB-BAR
   ============================================================ */
.agenda-admin-bar {
    background: var(--site-white);
    border-bottom: 2px solid var(--site-gray-light);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: sticky;
    top: 54px; /* under the main navbar */
    z-index: 1050;
    box-shadow: 0 1px 8px rgba(0,0,0,.04);
}

[data-theme="dark"] .agenda-admin-bar {
    background: #1e293b;
    border-bottom-color: #334155;
}

.agenda-admin-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
    padding-bottom: 0;
}

.agenda-admin-links {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 0;
}

.agenda-admin-links::-webkit-scrollbar { display: none; }

.agenda-admin-link {
    padding: 7px 14px;
    font-size: .84rem;
    font-weight: 500;
    color: var(--site-gray);
    text-decoration: none;
    border-radius: 6px;
    transition: all .25s;
    white-space: nowrap;
}

.agenda-admin-link:hover {
    color: var(--site-red);
    background: rgba(211,47,47,.06);
}

.agenda-admin-link.active {
    color: var(--site-red);
    background: rgba(211,47,47,.1);
    font-weight: 600;
}

.agenda-admin-logout {
    color: #EF4444 !important;
}

.agenda-admin-logout:hover {
    background: rgba(239,68,68,.08) !important;
}

[data-theme="dark"] .agenda-admin-link {
    color: #94a3b8;
}

[data-theme="dark"] .agenda-admin-link:hover,
[data-theme="dark"] .agenda-admin-link.active {
    color: #f87171;
    background: rgba(248,113,113,.1);
}

/* Theme toggle in admin bar */
.agenda-admin-bar .theme-toggle {
    background: none;
    border: 1px solid var(--site-gray-light);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all .25s;
    flex-shrink: 0;
}

.agenda-admin-bar .theme-toggle:hover {
    background: var(--site-light);
}

[data-theme="dark"] .agenda-admin-bar .theme-toggle {
    border-color: #475569;
}

[data-theme="dark"] .agenda-admin-bar .theme-toggle:hover {
    background: #334155;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    background: var(--site-dark);
    color: rgba(255,255,255,.7);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-top: auto;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 24px 0;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.site-footer-logo {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 14px;
}

.site-footer .logo-2 { color: var(--site-white); }

.site-footer-brand p {
    font-size: .9rem;
    line-height: 1.7;
    margin-bottom: 16px;
    color: rgba(255,255,255,.6);
}

.site-footer-social {
    display: flex;
    gap: 10px;
}

.site-social-link {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: all .3s;
}

.site-social-link:hover {
    background: var(--site-red);
    border-color: var(--site-red);
    color: var(--site-white);
}

.site-footer-links h4 {
    color: var(--site-white);
    font-size: .95rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    margin-bottom: 16px;
}

.site-footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer-links li {
    margin-bottom: 10px;
    font-size: .88rem;
    color: rgba(255,255,255,.5);
}

.site-footer-links a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: all .3s;
}

.site-footer-links a:hover {
    color: var(--site-white);
    padding-left: 4px;
}

.site-footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: .82rem;
    color: rgba(255,255,255,.4);
}

/* ============================================================
   BODY INTEGRATION ADJUSTMENTS
   ============================================================ */
body.site-integrated {
    padding-top: 0;
}

/* Ensure main content fills remaining space */
body.site-integrated .main-content {
    flex: 1;
    padding: 30px 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .site-nav-toggle {
        display: flex;
    }

    .site-nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--site-dark);
        flex-direction: column;
        padding: 10px 16px 16px;
        gap: 2px;
        box-shadow: 0 8px 30px rgba(0,0,0,.2);
        z-index: 1100;
    }

    .site-nav-menu.open {
        display: flex;
    }

    .site-nav-link {
        padding: 12px 16px;
        width: 100%;
        font-size: .95rem;
    }

    .site-nav-cta {
        margin-left: 0 !important;
        text-align: center;
        justify-content: center;
        margin-top: 4px;
    }

    .agenda-admin-bar {
        top: 54px;
    }

    .agenda-admin-links {
        gap: 0;
    }

    .agenda-admin-link {
        padding: 7px 10px;
        font-size: .78rem;
    }

    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .site-navbar .site-nav-logo {
        font-size: 1.5rem;
    }

    .agenda-admin-link {
        font-size: .75rem;
        padding: 6px 8px;
    }
}
