:root {
    --primary-color: #0056b3;
    --primary-dark: #004494;
    --accent-color: #f7941d;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --gray-light: #f4f7f9;
    --border-color: #dee2e6;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.main-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Tier 1: Top Bar */
.top-bar {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.top-container {
    display: flex;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 120px; /* Increase gap slightly to center title more */
}

.logo-img {
    height: 65px;
    width: auto;
}

.platform-title {
    font-size: 15px;
    font-weight: 400;
    color: #222;
}

.header-search {
    width: 280px;
    margin-left: auto;
    margin-right: 25px;
}

.search-input-wrapper {
    display: flex;
    border: 1px solid #e0e4e8;
    background-color: #f4f6f8;
    border-radius: 4px;
    overflow: hidden;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    padding: 8px 12px;
    background: transparent;
    font-size: 13px;
    color: #555;
}

.search-input-wrapper input:focus {
    outline: none;
}

.search-icon-btn {
    background: transparent;
    border: none;
    padding: 0 12px;
    color: #555;
    cursor: pointer;
    font-size: 14px;
}

.top-auth {
    display: flex;
    gap: 20px;
}

.top-auth a {
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-color);
}

.top-auth a:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* Tier 2: Nav Bar */
.nav-bar {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Lighter shadow */
    position: relative;
    z-index: 50;
}

.nav-container ul {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-container ul li {
    flex: 1;
    text-align: center;
}

.nav-container ul li a {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    gap: 8px;
    width: 100%;
}

.nav-container ul li a i {
    font-size: 16px;
    margin-top: 0;
}

.nav-container ul li a:hover {
    background-color: transparent;
    opacity: 0.8;
}

.nav-container ul li a.active {
    border-bottom: 5px solid #337ab7;
    font-weight: 500;
}

/* Main Content */
main {
    padding-bottom: 60px;
}

.hero-section {
    display: none; /* Hidden to match screenshot better */
}

.search-section {
    padding: 30px 0;
    background-color: var(--white);
}

.search-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #222;
}

.search-card {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.input-group input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-actions {
    grid-column: span 3;
    display: flex;
    margin-top: 20px;
}

.btn-search {
    background-color: var(--white);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 30px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-search:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Results Section */
.results-section {
    padding: 20px 0;
}

.results-header {
    margin-bottom: 15px;
}

.badge {
    background-color: #eee;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.table-container {
    border: 1px solid var(--border-color);
    border-bottom: none;
}

th {
    background-color: #f8f9fa;
    color: #555;
    padding: 12px 15px;
    font-size: 13px;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 12px 15px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

/* Detailed Permit View */
.permit-detail-section {
    padding: 20px 0;
    margin-bottom: 40px;
}

.permit-card {
    background: #fff;
    border: 1px solid #d4d4d4;
    width: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: #000;
}

.permit-card-header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #d4d4d4;
    padding: 15px 25px;
    position: relative;
    text-align: center;
}

.header-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
}

.header-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
}

.permit-card-body {
    padding: 25px;
}

.permit-main-info {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 70px;
}

.info-content p, .permit-employment p, .permit-docs p {
    margin: 3px 0;
    font-size: 13px;
}

.info-content strong, .permit-employment strong, .permit-docs strong {
    font-weight: 700;
}

.info-photo img {
    width: 130px;
    height: 130px;
}

.permit-employment {
    margin-bottom: 20px;
}

.permit-docs {
    margin-bottom: 25px;
}

.permit-conditions {
    padding-top: 10px;
}

.permit-conditions h4 {
    font-size: 13px;
    font-weight: 700;
    color: #000;
}

.permit-conditions ol {
    padding-left: 15px;
    font-size: 12px;
    line-height: 1.5;
    color: #444;
}

.permit-conditions li {
    margin-bottom: 3px;
}

/* Alert Box */
.alert-box {
    text-align: left;
    border: 1px solid #f9eed8;
    border-radius: 4px;
    background: #fff;
    width: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
}
.alert-header {
    background-color: #fcf8e3;
    color: #8a6d3b;
    padding: 15px 25px;
    font-weight: 500;
    border-bottom: 1px solid #faebcc;
    font-size: 15px;
}
.alert-body {
    padding: 25px;
    color: #333;
    font-size: 14px;
    font-weight: normal;
}
.alert-body p {
    margin: 10px 0;
}
.alert-body a {
    color: #337ab7;
    text-decoration: none;
}
.alert-body a:hover {
    text-decoration: underline;
}

/* Footer */
.main-footer {
    border-top: none;
    padding: 0;
    background-color: transparent;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(5, 1fr);
    gap: 30px;
    background-color: #3b3b3b;
    color: #c9c9c9;
    padding: 40px;
}

.footer-col h3 {
    font-size: 15px;
    margin-bottom: 12px;
    color: #e0e0e0;
    font-weight: 400;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 4px;
}

.footer-col a {
    text-decoration: none;
    font-size: 13px;
    color: #a0a0a0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #ffffff;
}

/* Brand Col (MSECB Logo Area) */
.brand-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.certification-logo {
    margin-bottom: 5px;
}

.msecb-logo {
    height: 100px;
    width: auto;
    display: block;
}

.success-story {
    color: #a0a0a0;
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
}

.success-story:hover {
    color: #ffffff;
}

.helpdesk-contact {
    font-size: 14px;
    color: #a0a0a0;
}

.helpdesk-contact p {
    margin-bottom: 0;
}

.helpdesk-contact a {
    color: #d0d0d0;
    font-weight: 600;
}

.helpdesk-contact a:hover {
    color: white;
}

.mobile-menu-toggle,
.mobile-search-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #2b7bb9;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .top-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
    }
    
    .mobile-menu-toggle,
    .mobile-search-toggle {
        display: block;
    }

    .platform-title,
    .header-search,
    .top-auth,
    .nav-bar {
        display: none;
    }

    .logo-area {
        justify-content: center;
        gap: 0;
        margin: 0 auto;
    }

    .logo-img {
        height: 60px;
    }

    .search-section {
        padding: 15px 0;
    }

    .search-title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 30px;
        color: #111;
    }

    .search-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .input-group label {
        font-size: 13px;
        color: #333;
        font-weight: 400;
        margin-bottom: 2px;
    }

    .input-group input {
        padding: 12px 12px;
        border: 1px solid #cccccc;
        font-size: 16px;
        color: #888;
    }

    .form-actions {
        grid-column: span 1;
        justify-content: flex-start;
        display: flex;
        margin-top: 5px;
    }

    .btn-search {
        padding: 10px 25px;
        background-color: var(--white);
        color: #72a6cc;
        border: 1px solid #b5d5e8;
        border-radius: 4px;
        font-weight: 400;
        font-size: 18px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
