/**
 * BSG Buildcon — global theme: tokens, top bar, navbar, footer, shared UI
 */
:root {
    --primary: #0f1419;
    --primary-soft: #1c2430;
    --accent: #c9a227;
    --accent-hover: #ddb82e;
    --muted: #5c6573;
    --surface: #ffffff;
    --page-bg: #f4f2ee;
    --border: rgba(15, 20, 25, 0.08);
    --shadow: 0 4px 24px rgba(15, 20, 25, 0.06);
    --shadow-hover: 0 20px 50px rgba(15, 20, 25, 0.12);
    --ring: 0 0 0 3px rgba(201, 162, 39, 0.35);

    --primary-color: var(--primary);
    --secondary-color: var(--primary-soft);
    --accent-color: var(--accent);
    --text-color: var(--muted);
    --light-text: #fff;
    --light-gray: var(--page-bg);
    --dark-gray: var(--muted);
    --text-light: #ffffff;
    --text-dark: var(--primary);
    --border-color: var(--border);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    color: var(--primary);
    line-height: 1.65;
    background: var(--page-bg);
    margin: 0;
}

::selection {
    background: rgba(201, 162, 39, 0.35);
}

a {
    text-underline-offset: 3px;
}

.container {
    scroll-margin-top: 88px;
}

.font-serif,
.font-heading {
    font-family: 'Instrument Serif', Georgia, serif;
}

/* ——— Top bar ——— */
.top-bar {
    background: var(--primary);
    padding: 0.65rem 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.875rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.top-bar .contact-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar .contact-info p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar .contact-info i {
    color: var(--accent);
    font-size: 0.9rem;
}

.top-bar .social-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.top-bar .social-links a {
    color: rgba(255, 255, 255, 0.85);
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.top-bar .social-links a:hover {
    color: var(--primary);
    background: var(--accent);
}

@media (max-width: 768px) {
    .top-bar .container {
        justify-content: center;
        text-align: center;
    }

    .top-bar .contact-info {
        justify-content: center;
    }
}

/* ——— Navbar ——— */
.navbar {
    background: var(--surface) !important;
    padding: 0;
    box-shadow: 0 1px 0 var(--border);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    padding: 1.1rem 0;
}

.nav-link {
    color: var(--primary) !important;
    margin: 0 0.2rem;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1.5rem 0.75rem !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 1.1rem;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after,
.nav-link[aria-current='page']::after {
    transform: scaleX(1);
}

.nav-link.active,
.nav-link[aria-current='page'] {
    color: var(--accent) !important;
}

.navbar .navbar-nav {
    align-items: center;
}

.navbar-toggler {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
}

.navbar-toggler:focus {
    box-shadow: var(--ring);
}

/* ——— Footer ——— */
.footer {
    background-color: var(--primary);
    color: #fff;
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

.footer-top {
    padding: 4rem 0 2.5rem;
    background-color: var(--primary-soft);
}

.footer-info h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.footer-contact-info {
    margin-bottom: 1.25rem;
}

.footer-contact-info p {
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.9rem;
}

.footer-contact-info i {
    color: var(--accent);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.footer .social-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer .social-links a {
    color: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.footer .social-links a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-2px);
}

.footer-links h4 {
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 0.65rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.footer-links ul li a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-newsletter h4 {
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.footer-newsletter > p {
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    min-width: 160px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.9rem;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.newsletter-form button {
    padding: 0.75rem 1.1rem;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
}

.newsletter-form button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.footer-working-hours h4 {
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
}

.footer-working-hours p {
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.footer-working-hours i {
    color: var(--accent);
}

.footer-bottom {
    background-color: var(--primary);
    padding: 1.25rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.copyright {
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    justify-content: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s;
}

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

@media (max-width: 991px) {
    .footer-top {
        padding: 3rem 0 2rem;
    }

    .footer-info,
    .footer-links,
    .footer-newsletter {
        margin-bottom: 2rem;
    }
}

@media (max-width: 767px) {
    .footer-bottom-links {
        justify-content: center;
        margin-top: 0.75rem;
    }

    .copyright {
        text-align: center;
    }

    .footer-bottom .row {
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }
}

/* ——— Bootstrap primary button ——— */
.btn-primary {
    background: linear-gradient(135deg, #d4af37, var(--accent)) !important;
    border: none !important;
    color: var(--primary) !important;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.28);
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    color: var(--primary) !important;
}

/* ——— Dark mode navbar toggle ——— */
.navbar .navbar-nav {
    align-items: center;
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--ring) !important;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 20, 25, 0.1);
    color: var(--primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 18px rgba(15, 20, 25, 0.08);
    border-radius: 999px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-glass:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15, 20, 25, 0.12);
    background: rgba(255, 255, 255, 0.92);
}

#darkModeToggle.theme-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    line-height: 1;
}

#darkModeToggle.theme-toggle i {
    font-size: 16px;
}

/* ——— Dark mode (body.dark-mode) ——— */
body.dark-mode {
    --primary-color: #eaeef2;
    --secondary-color: #1a1f26;
    --accent-color: var(--accent);
    --dark-gray: #c5ccd4;
    --light-gray: #1a1f26;
    --border-color: rgba(255, 255, 255, 0.1);
    --primary: #e8ecf1;
    --muted: #9aa5b4;
    --surface: #1e2633;
    --page-bg: #12161c;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.45);
    background-color: #12161c !important;
    color: #e8eaed !important;
}

body.dark-mode .top-bar {
    background: #0a0d11;
}

body.dark-mode .navbar {
    background: #161b22 !important;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.dark-mode .navbar-brand,
body.dark-mode .nav-link {
    color: #f0f2f5 !important;
}

body.dark-mode .nav-link.active,
body.dark-mode .nav-link:hover {
    color: var(--accent) !important;
}

body.dark-mode .footer,
body.dark-mode .footer-top,
body.dark-mode .footer-bottom {
    background-color: #0a0d11 !important;
}

body.dark-mode .footer-top {
    background: #12161c !important;
}

body.dark-mode .footer-links ul li a,
body.dark-mode .footer-bottom-links a {
    color: rgba(255, 255, 255, 0.65) !important;
}

body.dark-mode .footer-links ul li a:hover,
body.dark-mode .footer-bottom-links a:hover {
    color: var(--accent) !important;
}

body.dark-mode .btn-glass {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #f0f2f5;
    box-shadow: none;
}

body.dark-mode .btn-glass:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}

body.dark-mode .btn-primary {
    color: #0f1419 !important;
}

body.dark-mode .btn-primary:hover {
    color: #0f1419 !important;
}

body.dark-mode .form-control {
    background: #161b22 !important;
    color: #e8eaed !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

body.dark-mode .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.22);
}

body.dark-mode .form-control::placeholder {
    color: #7d8896 !important;
}
