:root {
    --primary: #000;
    --primary-dark: #172b4d;
    --light: #f4f5f7;
    --dark: #172b4d;
    --border: #dfe1e6;
    --muted: #5e6c84;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.1);
    --green: #00875a;
    --red: #de350b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #edeef1;
    color: var(--dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.main-header {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--light);
    color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white !important;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1.5rem;
    background: rgba(15, 23, 42, 0.85);
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.25rem;
    color: #e2e8f0;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero .actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Hero Section Button Overrides */
.hero .btn-primary {
    background: #000; /* A brighter blue */
    color: white !important;
}

.hero .btn-primary:hover {
    background: #0000005d; /* A darker shade of the new blue */
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero .btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.hero .btn-outline:hover {
    background: white;
    color: var(--primary-dark);
}


/* Content Sections */
.content-section {
    padding: 4rem 0;
    background-color: #edeef1;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.section-header p {
    color: var(--muted);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

/* Latest Tenders Section */
.tender-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tender-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.tender-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.tender-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.tender-ref {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.tender-deadline {
    margin-bottom: 1rem;
    font-weight: 500;
}

.tender-desc {
    margin-bottom: 1.5rem;
    color: #344563;
    flex-grow: 1;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Table Design */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #f4f5f7;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark);
    background: white;
    border: 1px solid var(--border);
    font-weight: 500;
}

.pagination a:hover {
    background: var(--light);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: white;
    font-weight: bold;
    border-color: var(--primary);
}

.pagination .disabled {
    color: var(--muted);
    background: #f9fafb;
    pointer-events: none;
}

/* Registration & Login Form */
#register {
    background: var(--light);
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.2);
    outline: none;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.full-width {
    grid-column: 1 / -1;
}

/* Login Page Specifics */
.login-page {
    padding: 3rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.login-page .form-container {
    width: 100%;
    max-width: 450px;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success {
    background: #e3fcef;
    color: var(--green);
    border-color: var(--green);
}

.alert-error {
    background: #ffebe6;
    color: var(--red);
    border-color: var(--red);
}

/* Footer */
.main-footer {
    background: #151414;
    color: #a5adba;
    text-align: center;
    padding: 3rem 0;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        border-top: 1px solid var(--border);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
    }

    .main-nav ul li {
        width: 100%;
    }

    .main-nav ul a {
        display: block;
        text-align: center;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

.btn-inscrption:hover {
    background-color: #172b4d !important;
}

.btn-appels:hover {
    background-color: #172b4d !important;
}
