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

:root {
    --bg-main: #f8fafc;
    --bg-panel: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-link: #0284c7;
    --border-color: #cbd5e1;
    --accent-blue: #0284c7;
    --accent-indigo: #4f46e5;
    --accent-hover: #0369a1;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;

    /* Elevation Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sticky Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-icon {
    filter: drop-shadow(0 4px 6px rgba(2, 132, 199, 0.2));
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: scale(1.05) rotate(2deg);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-top: 2px;
}

.main-nav {
    display: flex;
    gap: 30px;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
}

.nav-link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s ease;
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.25s ease;
}

.nav-link:hover {
    color: var(--accent-blue);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--accent-blue);
}

.nav-link.active::after {
    width: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-indigo));
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    padding: 9px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    background-color: transparent;
}

.btn-login:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

.btn-register {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: white;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
}

.btn-register:hover {
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    position: relative;
    background-image: url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 90px 20px;
    color: #1e1e1efa;
    min-height: 380px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0 auto;
    width: 100%;
    padding: 30px 30px;
}

.hero-badge {
    background: rgba(2, 132, 199, 0.25);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 20px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: #64748b;
    max-width: 750px;
}

/* Container & Grid Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    flex-grow: 1;
    width: 100%;
}

/* Top Search Area */
.top-search-area {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.main-search-wrapper {
    position: relative;
}

.main-search-input {
    width: 100%;
    padding: 16px 55px 16px 20px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all 0.3s ease;
    background-color: var(--bg-panel);
    color: var(--text-main);
}

.main-search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12), var(--shadow-md);
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    fill: var(--text-muted);
    width: 22px;
    height: 22px;
    cursor: pointer;
    transition: fill 0.2s ease, transform 0.2s ease;
}

.search-icon:hover {
    fill: var(--accent-blue);
    transform: translateY(-50%) scale(1.05);
}

.exact-match-checkbox {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 1000px;
    font-size: 14px;
    color: var(--text-muted);
    gap: 8px;
    cursor: pointer;
}

/* Layout Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
    align-items: start;
}

@media (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards Area (Center) */
.cards-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tender-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: 1fr 260px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.tender-card:hover {
    box-shadow: var(--shadow-card-hover), 0 0 0 1px rgba(2, 132, 199, 0.05);
    border-color: #94a3b8;
}

@media (max-width: 768px) {
    .tender-card {
        grid-template-columns: 1fr;
    }
}

.card-main-info {
    padding: 24px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .card-main-info {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

.card-price-info {
    padding: 24px;
    background-color: #f8fafc;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .card-price-info {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
}

.tender-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-blue);
    margin-bottom: 14px;
}

.tender-meta span {
    background-color: #f0f9ff;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #e0f2fe;
}

.tender-actions {
    display: flex;
    gap: 12px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    fill: var(--text-muted);
    width: 20px;
    height: 20px;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    fill: var(--accent-blue);
    transform: scale(1.1);
}

.icon-btn.active {
    fill: var(--accent-blue);
}

.tender-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    margin-right: 12px;
    transition: color 0.2s ease;
    display: inline-block;
    vertical-align: middle;
}

.tender-number:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.tender-status {
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
    background-color: #ecfdf5;
    border: 1px solid #d1fae5;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
}

.tender-object-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-top: 18px;
    margin-bottom: 6px;
}

.tender-object-desc {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 16px;
}

.tender-customer-link {
    font-size: 13.5px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.tender-customer-link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.price-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.dates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 13px;
}

.date-block {
    display: flex;
    flex-direction: column;
}

.date-block span:not(.date-label) {
    font-weight: 500;
    color: var(--text-main);
}

.date-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

/* Filter Area (Right) */
.filter-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.filter-panel:hover {
    box-shadow: var(--shadow-md);
}

.filter-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background-color: var(--bg-panel);
    color: var(--text-main);
}

.form-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

/* Region Autocomplete */
.region-wrapper {
    position: relative;
}

.region-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: var(--shadow-lg);
}

.region-dropdown.active {
    display: block;
}

.region-item {
    padding: 10px 14px;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.region-item:hover {
    background-color: #f1f5f9;
    color: var(--accent-blue);
}

.price-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    color: var(--text-main);
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

.btn-save {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
    transition: all 0.2s ease;
}

.btn-save:hover {
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.25);
    transform: translateY(-1px);
}

/* Saved Filters */
.saved-filters {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.saved-filters-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.saved-filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px dashed var(--border-color);
}

.saved-filter-item:last-child {
    border-bottom: none;
}

.saved-filter-name {
    color: var(--accent-blue);
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s ease;
}

.saved-filter-name:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Footer */
.main-footer {
    background-color: #0b1329;
    color: #94a3b8;
    padding: 60px 0 30px;
    margin-top: 60px;
    border-top: 1px solid #1e293b;
    font-size: 14px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 20px;
}

.footer-brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: white;
}

.footer-description {
    line-height: 1.6;
    color: #64748b;
    max-width: 300px;
}

.footer-title-col {
    color: white;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-list a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links-list a:hover {
    color: #38bdf8;
    padding-left: 4px;
}

.footer-contact-item {
    margin-bottom: 12px;
    line-height: 1.5;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copy {
    color: #64748b;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #38bdf8;
}

/* Custom Styled Checkbox */
.custom-checkbox {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    color: var(--text-main);
    gap: 10px;
    padding: 4px 0;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox .checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

/* Hover style */
.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

/* Checked style */
.custom-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    border-color: transparent;
}

/* Checkmark indicator */
.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.custom-checkbox .checkmark:after {
    left: 7px;
    top: 2px;
    width: 3px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox .label-text {
    line-height: 1.4;
    transition: color 0.2s ease;
}

.custom-checkbox input:checked ~ .label-text {
    color: var(--text-main);
    font-weight: 600;
}

/* Tender Card Action Buttons */
.tender-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tender-actions-row .btn-save,
.tender-actions-row .btn-login {
    font-size: 13px;
    padding: 7px 14px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    flex: 0 0 auto;
    width: 100%;
}

/* Fisguarde Badge */

/* Fisguarde Badge */
.tender-meta .badge-fisguarde {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
