:root {
    --mtech-black: #111;
    --mtech-red: #d7263d;
    --mtech-white: #f8f9fa;
}

body {
    background-color: var(--mtech-black);
    color: var(--mtech-white);
}

body.is-loading {
    overflow: hidden;
}

.app-placeholder {
    min-height: 100vh;
    padding-top: 5.5rem;
    background: radial-gradient(circle at top right, rgba(215, 38, 61, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(17, 17, 17, 0.95), rgba(10, 10, 10, 0.98));
}

.app-placeholder-main {
    background: rgba(0, 0, 0, 0.1);
}

.app-content {
    min-height: 100vh;
}

.app-placeholder .placeholder,
.app-placeholder .btn.placeholder {
    background-color: rgba(255, 255, 255, 0.08);
}

.app-placeholder .placeholder::before,
.app-placeholder .btn.placeholder::before {
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
}

.placeholder-card,
.placeholder-project-card,
.placeholder-count-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.placeholder-project-card {
    width: 260px;
    padding: 1.75rem;
}

.placeholder-horizontal-scroll {
    display: flex;
    gap: 1.5rem;
    overflow: hidden;
}

.placeholder-video .placeholder {
    border-radius: 1.25rem;
    display: block;
}

.placeholder-gradient {
    background: linear-gradient(90deg, rgba(215, 38, 61, 0.15), rgba(17, 17, 17, 0.9));
}

body:not(.is-loading) #app-placeholder {
    display: none;
}

body:not(.is-loading) .app-content {
    display: block !important;
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--mtech-red);
}

.navbar-brand__logo {
    height: 30px;
    width: auto;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.dropdown-hover:hover > .dropdown-menu,
.dropdown-hover:focus-within > .dropdown-menu {
    display: block;
    margin-top: 0;
}

.dropdown-menu-dark {
    background-color: rgba(17, 17, 17, 0.95);
    border: 1px solid rgba(215, 38, 61, 0.25);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.dropdown-menu-dark .dropdown-item:focus,
.dropdown-menu-dark .dropdown-item:hover {
    background-color: rgba(215, 38, 61, 0.2);
    color: var(--mtech-white);
}

.dropdown-menu-dark .dropdown-item.active,
.dropdown-menu-dark .dropdown-item.active:focus,
.dropdown-menu-dark .dropdown-item.active:hover {
    background-color: rgba(215, 38, 61, 0.35);
    color: var(--mtech-white);
}

.hero-card {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.85), rgba(215, 38, 61, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 45px rgba(215, 38, 61, 0.35);
}

.sidebar-card {
    background-color: rgba(17, 17, 17, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.section-title {
    color: var(--mtech-red);
    letter-spacing: 0.08em;
}

.feature-card {
    position: relative;
    background-color: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 0;
}

.feature-card:hover {
    border-color: var(--mtech-red);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.bg-gradient-red {
    background: linear-gradient(90deg, rgba(215, 38, 61, 0.92), rgba(17, 17, 17, 0.92));
}

.fixed-top-offset {
    padding-top: 5.5rem;
}

.horizontal-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 0.75rem 0;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.project-card {
    min-width: 280px;
    max-width: 300px;
    scroll-snap-align: start;
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1200px) {
    .project-card {
        min-width: 320px;
        max-width: 360px;
    }
}

.project-card--with-bg {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.08);
}

.project-card--with-bg .project-card__bg {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.02);
    filter: brightness(0.9);
    transition: transform 0.6s ease, filter 0.4s ease;
    z-index: 0;
}

.project-card--with-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(12, 13, 30, 0.65) 0%, rgba(12, 13, 30, 0.92) 100%);
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.project-card__content {
    position: relative;
    z-index: 2;
}

.project-card--with-bg:hover .project-card__bg {
    transform: scale(1.08);
    filter: brightness(1);
}

.project-card--with-bg:hover::after {
    opacity: 0.85;
}

.services-dropdown {
    min-width: 480px;
    padding: 1.25rem;
}

.services-dropdown__column {
    list-style: none;
    margin: 0;
    padding: 0;
}

.services-dropdown__column .dropdown-item {
    white-space: normal;
}

.services-dropdown__column .dropdown-divider {
    margin: 0.75rem 0;
    opacity: 0.15;
}

@media (max-width: 991.98px) {
    .services-dropdown {
        min-width: 100%;
    }

    .services-dropdown__column + .services-dropdown__column {
        margin-top: 1rem;
    }
}

.dropdown-submenu .dropdown-menu {
    margin: 0;
}

.dropdown-submenu .dropend .dropdown-toggle::after {
    margin-left: 0.5rem;
    transform: rotate(-90deg);
}

.dropdown-menu-sub {
    position: absolute;
    top: 100%;
    left: calc(100% - 0.5rem);
    margin-top: 0.35rem;
    margin-left: 0.5rem;
    min-width: 260px;
    padding: 0.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.dropdown-menu-sub .dropdown-item {
    white-space: normal;
    font-size: 0.95rem;
}

.dropend:hover > .dropdown-menu,
.dropend:focus-within > .dropdown-menu {
    display: block;
}

.dropdown-menu-sub .dropdown-item:hover,
.dropdown-menu-sub .dropdown-item:focus {
    background-color: rgba(215, 38, 61, 0.25);
}

.position-relative .scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(215, 38, 61, 0.5);
    background-color: rgba(17, 17, 17, 0.75);
    color: var(--mtech-white);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    z-index: 5;
}

.position-relative .scroll-btn:hover,
.position-relative .scroll-btn:focus {
    background-color: rgba(215, 38, 61, 0.85);
    border-color: rgba(215, 38, 61, 0.95);
    outline: none;
}

.position-relative .scroll-btn-prev {
    left: -1.5rem;
}

.position-relative .scroll-btn-next {
    right: -1.5rem;
}

.position-relative .scroll-btn.is-disabled {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .position-relative .scroll-btn {
        display: none;
    }
}

.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(215, 38, 61, 0.9);
    color: var(--mtech-white);
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: 0 12px 30px rgba(215, 38, 61, 0.4);
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, background 0.3s ease, opacity 0.3s ease;
    z-index: 1050;
}

.back-to-top i {
    font-size: 1.75rem;
    line-height: 1;
}

.back-to-top.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover,
.back-to-top:focus {
    transform: translateY(-4px);
    background: rgba(215, 38, 61, 1);
    outline: none;
}

@media (max-width: 575.98px) {
    .back-to-top {
        right: 1rem;
        bottom: 1.5rem;
    }
}

.social-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--mtech-white);
    font-size: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.social-icon:hover,
.social-icon:focus {
    transform: translateY(-3px);
    background-color: rgba(215, 38, 61, 0.85);
    color: var(--mtech-white);
    outline: none;
}

.error-page {
    background: radial-gradient(circle at top right, rgba(215, 38, 61, 0.15), transparent 55%);
    min-height: 70vh;
}

.error-card {
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.error-code {
    letter-spacing: 0.15em;
    text-shadow: 0 0 25px rgba(215, 38, 61, 0.45);
}

.error-support a {
    transition: color 0.3s ease;
}

.error-support a:hover,
.error-support a:focus {
    color: var(--mtech-red);
}

.error-hint-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 1rem;
    height: 100%;
    color: var(--mtech-white);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    line-height: 1.4;
    transition: transform 0.3s ease, background 0.3s ease;
}

.error-hint-card i {
    font-size: 1.5rem;
    color: var(--mtech-red);
}

.error-hint-card:hover,
.error-hint-card:focus-within {
    transform: translateY(-4px);
    background: rgba(215, 38, 61, 0.15);
}


.partners-marquee {
    overflow: hidden;
    width: 100%;
}

.partners-track {
    width: max-content;
    animation: partners-marquee 100s linear infinite;
}

.partners-logo {
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.85;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.partners-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.certificate-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.certificate-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.certificate-thumb {
    border: none;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.certificate-thumb:hover,
.certificate-thumb:focus {
    transform: translateY(-4px);
    background: rgba(215, 38, 61, 0.15);
    box-shadow: 0 12px 30px rgba(215, 38, 61, 0.25);
    outline: none;
}

.certificate-thumb img {
    max-height: 120px;
    width: 100%;
    object-fit: contain;
}

.certificate-thumb.placeholder {
    cursor: default;
    background: rgba(255, 255, 255, 0.04);
}

.certificate-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.certificate-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--mtech-white);
    line-height: 1.3;
}

.certificate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.certificate-modal .modal-content {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.65);
}

.certificate-modal .modal-body {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 0 0 1.5rem 1.5rem;
}

.team-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-6px);
    border-color: rgba(215, 38, 61, 0.6);
    box-shadow: 0 18px 48px rgba(215, 38, 61, 0.25);
}

.team-photo {
    border-radius: 1.25rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.team-card:hover .team-photo img {
    transform: scale(1.04);
}

.team-card .text-danger {
    letter-spacing: 0.08em;
}

/* Breadcrumbs */
.breadcrumb {
    --bs-breadcrumb-divider: '›';
    --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.35);
    margin: 0;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.breadcrumb-dark {
    background: rgba(14, 19, 34, 0.55);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 42px rgba(10, 12, 24, 0.65);
}

.breadcrumb:hover {
    background: rgba(215, 38, 61, 0.12);
    border-color: rgba(215, 38, 61, 0.4);
    box-shadow: 0 22px 48px rgba(215, 38, 61, 0.25);
}

.breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.2s ease;
}

.breadcrumb .breadcrumb-item a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb .breadcrumb-item a:hover,
.breadcrumb .breadcrumb-item a:focus {
    color: #ffffff;
    text-decoration: none;
}

.breadcrumb .breadcrumb-item.active {
    color: #ffffff;
    font-weight: 700;
}

.breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    padding: 0;
    margin-right: 0.75rem;
    margin-left: 0.25rem;
}

@media (max-width: 576px) {
    .breadcrumb {
        padding: 0.6rem 1rem;
        gap: 0.5rem;
        border-radius: 999px;
    }

    .breadcrumb .breadcrumb-item {
        font-size: 0.75rem;
        letter-spacing: 0.025em;
    }

    .breadcrumb .breadcrumb-item + .breadcrumb-item::before {
        margin-right: 0.5rem;
        margin-left: 0.15rem;
    }
}

@keyframes partners-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 576px) {
    .partners-logo {
        max-height: 40px;
    }
}

/* News page */
.section-news {
    background: radial-gradient(circle at top left, rgba(215, 38, 61, 0.12), transparent 55%);
}

.news-card {
    position: relative;
    background: linear-gradient(140deg, rgba(19, 19, 24, 0.94), rgba(38, 14, 20, 0.92));
    border: 1px solid rgba(215, 38, 61, 0.18);
    box-shadow: 0 16px 42px rgba(12, 0, 4, 0.35);
    overflow: hidden;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    z-index: 0;
}

.news-card::before {
    content: '';
    position: absolute;
    inset: -25% -20%;
    background: radial-gradient(circle at top left, rgba(215, 38, 61, 0.32), transparent 62%);
    opacity: 0.85;
    transition: opacity 0.35s ease, transform 0.45s ease;
    z-index: 0;
    pointer-events: none;
}

.news-card > * {
    position: relative;
    z-index: 1;
}

.news-card:hover {
    transform: translateY(-6px);
    border-color: rgba(215, 38, 61, 0.45);
    box-shadow: 0 22px 52px rgba(215, 38, 61, 0.28);
}

.news-card:hover::before {
    opacity: 1;
    transform: scale(1.05);
}

.news-card__image img {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.news-card__body {
    min-height: 100%;
}

.news-card__date {
    letter-spacing: 0.08em;
}

.news-modal .modal-content {
    background: linear-gradient(150deg, rgba(16, 16, 22, 0.98), rgba(48, 12, 20, 0.95));
    border: 1px solid rgba(215, 38, 61, 0.25);
    box-shadow: 0 40px 90px rgba(12, 0, 4, 0.55);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.news-modal .modal-header {
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(215, 38, 61, 0.25);
    box-shadow: inset 0 -1px 0 rgba(215, 38, 61, 0.12);
}

.news-modal .modal-header .btn-close {
    margin-top: 0.35rem;
}

.news-modal__date {
    letter-spacing: 0.08em;
}

.news-modal__image img {
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 65px rgba(12, 0, 4, 0.45);
}

.news-modal__content p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.4rem;
}

.news-modal__content p:last-child {
    margin-bottom: 0;
}

.news-modal__content strong {
    color: rgba(255, 255, 255, 0.95);
}

/* Contact modal */
.contact-modal .modal-dialog {
    max-width: 1020px;
}

.contact-modal .modal-content {
    background: radial-gradient(circle at top left, rgba(215, 38, 61, 0.16), transparent 70%),
        linear-gradient(150deg, rgba(18, 18, 24, 0.95), rgba(44, 12, 20, 0.92));
    border: 1px solid rgba(215, 38, 61, 0.25);
    box-shadow: 0 45px 110px rgba(12, 0, 4, 0.55);
    backdrop-filter: blur(14px);
    border-radius: 1.5rem;
    overflow: hidden;
}

.contact-modal .modal-header {
    padding: 2.25rem 2.25rem 0;
}

.contact-modal .modal-body {
    padding: 2.25rem;
    padding-top: 1.5rem;
}

.contact-modal__card {
    position: relative;
    height: 100%;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.75rem;
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
    background: rgba(12, 12, 18, 0.72);
}

.contact-modal__bg {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background-image: var(--contact-card-bg, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.02);
    filter: brightness(0.9);
    transition: transform 0.6s ease, filter 0.4s ease;
    z-index: 0;
}

.contact-modal__card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(12, 13, 30, 0.75) 0%, rgba(12, 13, 30, 0.9) 100%);
    z-index: 1;
    pointer-events: none;
}

.contact-modal__card-inner {
    position: relative;
    z-index: 2;
}

.contact-modal__card:hover {
    transform: translateY(-6px);
    border-color: rgba(215, 38, 61, 0.55);
    box-shadow: 0 28px 62px rgba(0, 0, 0, 0.55);
}

.contact-modal__card:hover .contact-modal__bg {
    transform: scale(1.08);
    filter: brightness(1);
}

.contact-modal__card:hover {
    transform: translateY(-6px);
    border-color: rgba(215, 38, 61, 0.55);
    box-shadow: 0 28px 62px rgba(0, 0, 0, 0.55);
}

.contact-modal__card:hover::before {
    opacity: 1;
    transform: scale(1.08);
}

.contact-modal__badge {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    padding: 0.5rem 1rem;
    background: rgba(215, 38, 61, 0.92);
}

.contact-modal__section-title {
    letter-spacing: 0.14em;
    font-size: 0.75rem;
}

.contact-modal__address span + span {
    margin-top: 0.35rem;
}

.contact-modal__link {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-modal__link:hover,
.contact-modal__link:focus {
    color: rgba(215, 38, 61, 0.92);
}

@media (max-width: 767.98px) {
    .contact-modal .modal-dialog {
        margin: 1rem;
    }

    .contact-modal .modal-header,
    .contact-modal .modal-body {
        padding: 1.75rem;
    }

    .contact-modal__card {
        min-height: 340px;
    }
}
