/* ============================================================
   AfricaNews365 Client Portal - Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:wght@600&display=swap');

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Base -------------------------------------------------- */
html { font-size: 15px; }

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 1rem;
    color: #2c2c2c;
    background: #f0f2f5;
    line-height: 1.6;
}

a { color: #1a3a8f; text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; color: #0f2460; }
p { margin-bottom: 1em; }

input[type="text"],
input[type="password"],
select,
textarea {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 0.9rem;
    border: 1px solid #cdd1d8;
    border-radius: 5px;
    padding: 7px 10px;
    background: #fff;
    color: #2c2c2c;
    transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #1a3a8f;
    box-shadow: 0 0 0 3px rgba(26,58,143,0.1);
}

input[type="submit"], input[type="button"], button, .btn-primary {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    background: #1a3a8f;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}
input[type="submit"]:hover, input[type="button"]:hover, button:hover, .btn-primary:hover {
    background: #0f2460;
}

/* ---- Page shell ------------------------------------------- */
#outer {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Header ----------------------------------------------- */
#header {
    background: linear-gradient(135deg, #0d1f5c 0%, #1a3a8f 100%);
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

#headercontent {
    display: flex;
    align-items: center;
    gap: 16px;
}

#header-logo { flex-shrink: 0; }

#tangaza-logo {
    height: 52px;
    width: auto;
    border-radius: 4px;
    opacity: 0.95;
    background: #fff;
    padding: 3px 6px;
}

#header-titles h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.01em;
}

#header-titles h2 {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#clientlogoin { height: 54px; width: auto; border: none; opacity: 0.92; }

/* ---- Navigation bar --------------------------------------- */
#menu {
    background: #12296e;
    padding: 0 2.5rem;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
}

#menu ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

#menu ul li a {
    display: block;
    padding: 0.75rem 1.2rem;
    color: rgba(255,255,255,0.80);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-bottom: 3px solid transparent;
}

#menu ul li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.07);
    text-decoration: none;
}

#menu ul li a.active {
    color: #fff;
    border-bottom-color: #4fc3f7;
    background: rgba(255,255,255,0.05);
}

/* Logoff - right side of nav */
.menu-logoff {
    display: flex;
    align-items: center;
    padding: 0 0.25rem;
}

.logoff-link {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255,255,255,0.55) !important;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    transition: all 0.15s;
    text-decoration: none !important;
}

.logoff-link:hover {
    color: #fff !important;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.08);
    text-decoration: none !important;
}

#menubottom {
    height: 3px;
    background: linear-gradient(90deg, #4fc3f7, #1a3a8f);
}

/* ---- Client switcher bar ---------------------------------- */
.client-switcher {
    background: #f6f8fc;
    border-bottom: 1px solid #e0e4ef;
    padding: 8px 2rem;
    font-size: 0.82rem;
    color: #444;
    line-height: 1.6;
}

.client-switcher a {
    font-weight: 500;
    color: #1a3a8f;
    margin-right: 2px;
}

/* ---- Section heading -------------------------------------- */
.section-heading {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #555;
    padding: 0 2rem;
    margin-bottom: 1rem;
}

/* ---- Page content container ------------------------------- */
#content-body {
    flex: 1;
    padding: 0 0 2.5rem;
}

/* ---- Search bar ------------------------------------------- */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #f6f8fc;
    border-bottom: 1px solid #e0e4ef;
    padding: 14px 2rem;
    margin-bottom: 1.5rem;
}

.search-bar label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.search-bar input[type="text"] { width: 200px; }
.search-bar .date-picker { width: 110px; }

.btn-search {
    background: #1a3a8f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 7px 18px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    cursor: pointer;
}
.btn-search:hover { background: #0f2460 !important; }

/* ---- News results ----------------------------------------- */
.news-results { padding: 0 2rem; }
.news-results table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.news-results td { padding: 6px 10px; }

/* ---- Advanced Search card --------------------------------- */
.adv-search-card {
    background: #fff;
    border: 1px solid #e0e4ef;
    border-radius: 10px;
    padding: 28px 32px;
    margin: 1.5rem 2rem;
    box-shadow: 0 2px 12px rgba(26,58,143,0.07);
}

.adv-search-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a3a8f;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8ecf6;
}

.adv-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.adv-col { display: flex; flex-direction: column; gap: 18px; }

.adv-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.adv-text { width: 100% !important; display: block; }

.adv-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #cdd1d8;
    font-size: 0.88rem;
    background: #fff;
}

.adv-select-grow { flex: 1; }

.date-range-row { display: flex; align-items: center; gap: 8px; }
.date-range-row .date-picker { width: 120px; }
.date-sep { font-size: 0.82rem; color: #888; flex-shrink: 0; }

.adv-picker-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.btn-pill {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    padding: 5px 14px !important;
    border-radius: 20px !important;
    background: #1a3a8f !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    white-space: nowrap;
}
.btn-pill:hover { background: #0f2460 !important; }

.btn-pill-ghost {
    background: transparent !important;
    color: #1a3a8f !important;
    border: 1px solid #1a3a8f !important;
}
.btn-pill-ghost:hover { background: #1a3a8f !important; color: #fff !important; }

.checklist-wrap {
    margin-top: 6px;
    max-height: 100px;
    overflow-y: auto;
    border: 1px solid #e4e8f0;
    border-radius: 5px;
    padding: 6px 10px;
    background: #fafbfe;
    font-size: 0.82rem;
}

.adv-search-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e8ecf6;
    display: flex;
    justify-content: flex-end;
}

.btn-search-lg {
    background: linear-gradient(135deg, #0d1f5c, #1a3a8f) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 36px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer;
}
.btn-search-lg:hover { opacity: 0.88; }

@media (max-width: 700px) {
    .adv-search-grid { grid-template-columns: 1fr; }
}

/* ---- GridView --------------------------------------------- */
.grid-wrap { overflow-x: auto; margin: 0 2rem 2rem; }

.grid-wrap table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }

.grid-wrap th {
    background: #1a3a8f;
    color: #fff;
    padding: 9px 12px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.grid-wrap td {
    padding: 7px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.grid-wrap tr:hover td { background: #f4f7ff; }

.grid-wrap tr td[colspan] {
    background: #f6f8fc;
    text-align: center;
    padding: 6px 12px;
}

/* ---- Datepicker ------------------------------------------- */
input.date-picker {
    width: 110px;
    cursor: pointer;
    padding-right: 26px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat right 6px center;
}

.ui-datepicker {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
    font-size: 0.82rem !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
}

/* ---- Footer ----------------------------------------------- */
#footer {
    background: #0d1f5c;
    color: rgba(255,255,255,0.65);
    font-size: 0.78rem;
    padding: 16px 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
#footer a { color: rgba(255,255,255,0.80); font-weight: 400; }
#footer a:hover { color: #fff; text-decoration: underline; }

/* ---- Landing page (Home.aspx) ----------------------------- */
.landing-wrap {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    padding: 2rem 2.5rem;
}

.landing-about { flex: 1 1 60%; }
.landing-sidebar { flex: 0 0 300px; min-width: 260px; }

.about-hero {
    background: linear-gradient(135deg, #0d1f5c 0%, #1a3a8f 100%);
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 1.5rem;
    color: #fff;
}

.about-hero-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.about-hero-inner > div { flex: 1; }

.hero-logo {
    height: 70px;
    width: auto;
    border-radius: 6px;
    background: #fff;
    padding: 4px 8px;
    flex-shrink: 0;
    opacity: 0.95;
}

.about-hero h2 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.about-hero p {
    font-size: 0.86rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 0;
}

.capabilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cap-card {
    background: #f6f8fc;
    border: 1px solid #e0e4ef;
    border-radius: 8px;
    padding: 16px 18px;
}

.cap-card h4 {
    font-size: 0.86rem;
    font-weight: 700;
    color: #1a3a8f;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cap-icon {
    display: inline-block;
    background: #1a3a8f;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.02em;
    vertical-align: middle;
    flex-shrink: 0;
}

.cap-card p {
    font-size: 0.81rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

.tangaza-feature {
    margin-bottom: 1.25rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e4ef;
}

.feature-img { width: 100%; height: auto; display: block; }

.contact-strip {
    background: #fff;
    border: 1px solid #e0e4ef;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.84rem;
    color: #444;
}

.contact-strip strong { color: #1a3a8f; display: block; margin-bottom: 6px; }

.contact-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* Login card */
.login-card {
    background: #fff;
    border: 1px solid #dde2ef;
    border-radius: 10px;
    padding: 28px 26px;
    box-shadow: 0 4px 20px rgba(26,58,143,0.09);
    position: sticky;
    top: 20px;
}

.login-card h3 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a3a8f;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8ecf6;
}

.lc-field { margin-bottom: 14px; }

.lc-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lc-field input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cdd1d8;
    border-radius: 5px;
    font-size: 0.9rem;
}

.lc-field input:focus {
    border-color: #1a3a8f;
    box-shadow: 0 0 0 3px rgba(26,58,143,0.1);
    outline: none;
}

.lc-error {
    color: #c0392b;
    font-size: 0.8rem;
    margin-bottom: 12px;
    display: block;
}

.lc-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #0d1f5c, #1a3a8f);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
}

.lc-btn:hover { opacity: 0.88; }

.lc-note {
    margin-top: 14px;
    font-size: 0.76rem;
    color: #888;
    text-align: center;
    line-height: 1.5;
}

@media (max-width: 720px) {
    .landing-wrap { flex-direction: column; padding: 1.5rem; }
    .landing-sidebar { width: 100%; }
    .capabilities { grid-template-columns: 1fr; }
    .about-hero-inner { flex-direction: column; }
    .hero-logo { height: 50px; }
}

/* ---- Utility ---------------------------------------------- */
img { border: none; }
img.left  { float: left;  margin: 0 1.4em 1em 0; }
img.right { float: right; margin: 0 0 1em 1.4em; }
