/* --- Redflag Corporate Visual Identity --- */

/* --- Font Imports --- */
/* --- Font Imports --- */
/* --- Local Font Definitions --- */
/* Lato Regular */
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 400;
    src: url("../fonts/Lato/Lato-Regular.subset.woff2") format("woff2");
}

/* Lato Bold */
@font-face {
    font-family: "Lato";
    font-style: normal;
    font-weight: 700;
    src: url("../fonts/Lato/Lato-Bold.subset.woff2") format("woff2");
}

/* Montserrat SemiBold */
@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 600;
    src: url("../fonts/Montserrat/static/Montserrat-SemiBold.subset.woff2")
        format("woff2");
}

/* Montserrat Bold */
@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 700;
    src: url("../fonts/Montserrat/static/Montserrat-Bold.subset.woff2")
        format("woff2");
}

/* --- Color Palette --- */
:root {
    --primary-color: #0a2342; /* Deep, professional blue */
    --secondary-color: #2c3e50; /* Sophisticated dark gray for text */
    --accent-color: #00a896; /* Vibrant, modern teal */
    --background-color: #f4f6f8; /* Clean, off-white */
    --red-flag-color: #d90429; /* Impactful red */
    --success-color: #27ae60; /* Green for success states */
    --neutral-color: #7f8c8d; /* Gray for neutral/N/A states */
    --white-color: #ffffff;
    --border-color: #dfe6e9;
}

/* --- Base Styles --- */
body {
    font-family: "Lato", sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--secondary-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 30px 40px;
    background-color: var(--white-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(10, 35, 66, 0.05);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Montserrat", sans-serif;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.75em;
}

h1 {
    font-size: 2.5em;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

h2 {
    font-size: 2em;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

h3 {
    font-size: 1.5em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* --- Header & Footer --- */
/* This requires creating a new header template include */
.main-header {
    background-color: var(--white-color);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.main-header .logo {
    font-family: "Montserrat", sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
}

.main-header .logo a {
    color: var(--primary-color);
}

.main-nav a {
    color: var(--secondary-color);
    margin: 0 15px;
    font-size: 1.1em;
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

.main-footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #888;
    font-size: 0.9em;
}

.footer-nav {
    margin-bottom: 15px;
}

.footer-nav a {
    margin: 0 20px;
    color: var(--primary-color);
    font-weight: 600;
}

.footer-nav a:hover {
    color: var(--accent-color);
}

/* --- Forms & Inputs --- */
.search-container {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.search-input {
    flex-grow: 1;
    padding: 12px 20px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.2);
}

.clear-button,
.search-button {
    padding: 12px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-button {
    background-color: #b2bec3;
    color: #2d3436;
}

.clear-button:hover {
    background-color: #636e72;
    color: white;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    font-size: 0.95em;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    background-color: var(--background-color);
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #f8f9fa;
}

td a {
    font-weight: bold;
}

/* --- Red Flag Status --- */
.red-flag-yes {
    color: var(--red-flag-color);
    font-weight: bold;
    text-align: center;
}

.red-flag-no {
    color: var(--success-color);
    text-align: center;
}

.red-flag-na {
    color: var(--neutral-color);
    text-align: center;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.3em 0.5em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    color: var(--white-color);
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.badge-inactive {
    background-color: var(--red-flag-color);
}

.badge-private {
    background-color: var(--neutral-color);
}

/* --- Utility & Component Styles --- */
.no-data {
    text-align: center;
    color: var(--neutral-color);
    font-style: italic;
    padding: 60px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed var(--border-color);
}

.view-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.view-link:hover {
    background-color: var(--accent-color);
    color: var(--white-color);
    text-decoration: none;
}

/* --- Company Page Specifics --- */
.company-header {
    margin-bottom: 30px;
}

.company-basic-info {
    display: flex;
    gap: 30px;
    padding: 20px;
    background-color: var(--background-color);
    border-radius: 8px;
}

.company-basic-info p {
    margin: 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.details-grid p {
    margin: 0;
}

.details-grid p strong {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
}

/* --- Corporate Bio Section --- */
.corporate-bio-section {
    margin-top: 40px;
}

.corporate-bio-section h2 {
    /* As per request, hiding the "Corporate Bio" title, but keeping for semantics/accessibility */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.corporate-bio-section p {
    line-height: 1.7;
    font-size: 1.05em;
}

/* --- People/Person Page Specifics --- */
.people-list {
    list-style: none;
    padding: 0;
}

.person-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 5px solid var(--accent-color);
}

.relationships,
.relationships-list {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
}

/* --- Admin Overlay --- */
#admin-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-family: "Montserrat", sans-serif;
}

#admin-overlay strong {
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    font-size: 1.1em;
}

#admin-overlay button {
    background-color: var(--accent-color);
    color: var(--white-color);
    border: none;
    padding: 10px 15px;
    margin-top: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: block;
    width: 100%;
    text-align: left;
    transition: background-color 0.3s ease;
}

#admin-overlay button:hover {
    background-color: #008a7b; /* A slightly darker shade of accent */
}

/* --- People Table Specifics --- */
.people-table .col-name {
    width: 20%;
}
.people-table .col-bio {
    width: 35%;
}
.people-table .col-companies {
    width: 25%;
}
.people-table .col-linkedin {
    width: 20%;
}

.bio-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5em;
    height: 3em;
    word-wrap: break-word;
}

/* --- Person Page Layout --- */
.person-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.person-header h1 {
    margin: 0;
    flex-grow: 1;
}

.person-photo {
    flex-shrink: 0;
    margin-left: 30px;
}

.person-photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--white-color);
    box-shadow: 0 4px 15px rgba(10, 35, 66, 0.1);
}
