/* =========================================================================
   Custom overrides — loaded after the theme CSS so it wins.
   Safe to keep across theme updates (theme files are never edited directly).
   ========================================================================= */

/* -------------------------------------------------------------------------
   Sector switch button (header + mobile)
   ------------------------------------------------------------------------- */
/* Keep the whole right-hand cluster on a single row and compact. */
.header-menu-select {
    flex-wrap: nowrap;
    gap: 8px;
}

@media (min-width: 992px) {
    .header-content {
        flex-wrap: nowrap;
    }
}

.header-sector-switch {
    margin-right: 0px;
}

.sector-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 11px;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    transition: all .3s ease;
}

.sector-switch-btn:hover {
    opacity: .85;
}

/* Smaller header CTA (Teklif Al / Track order). */
.tj-header-button .tj-header-btn {
    padding: 0px 15px;
    font-size: 14px;
    white-space: nowrap;
}

/* Smaller language flags. */
.header-language .languages img {
    width: 30px;
    height: 25px;
}

.header-language {
    margin-left: 6px;
    margin-right: 6px;
}

/* -------------------------------------------------------------------------
   Construction menu dropdown (Hizmetler ▾)
   ------------------------------------------------------------------------- */
.main-menu li.menu-item-has-children {
    position: relative;
}

.main-menu li.menu-item-has-children > a::after {
    content: "\f107"; /* fontawesome caret-down; harmless if font missing */
    font-family: "Font Awesome 6 Pro", "FontAwesome", sans-serif;
    font-weight: 900;
    margin-left: 6px;
    font-size: 12px;
}

.main-menu li.menu-item-has-children .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    padding: 10px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .3s ease;
    z-index: 999;
    text-align: left;
}

.main-menu li.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-menu li.menu-item-has-children .sub-menu li {
    display: block;
    padding: 0;
}

.main-menu li.menu-item-has-children .sub-menu li a {
    display: block;
    padding: 9px 22px;
    white-space: nowrap;
    color: #1a1a1a;
}

.main-menu li.menu-item-has-children .sub-menu li a:hover {
    background: rgba(0, 0, 0, .04);
}

/* -------------------------------------------------------------------------
   Menu overflow fix for long labels (notably ES) around the 1080px range.
   ES labels ("Sobre nosotros", "Nuestros servicios",
   "Compra-venta de vehículos") wrap the menu to a second row.
   ------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1300px) {
    .main-menu > li {
        padding-left: 0;
        padding-right: 0;
    }

    .main-menu > li > a {
        padding-left: 9px;
        padding-right: 9px;
        font-size: 14px;
        white-space: nowrap;
    }

    .header-menu-select {
        gap: 5px;
    }

    .header-sector-switch {
        margin-right: 5px;
    }

    .sector-switch-btn {
        padding: 5px 9px;
        font-size: 11px;
    }

    .header-language .languages img {
        width: 20px;
        height: 20px;
    }

    .tj-header-button .tj-header-btn {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
}

/* Tighter still just around the reported 1080px width. */
@media (min-width: 992px) and (max-width: 1120px) {
    .main-menu > li > a {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 13px;
    }

    .header-language {
        margin-left: 3px;
        margin-right: 3px;
    }

    .header-language .languages img {
        width: 18px;
        height: 18px;
    }

    .sector-switch-btn {
        padding: 4px 8px;
        font-size: 10px;
    }

    .sector-switch-btn i {
        display: none;
    }

    .tj-header-button .tj-header-btn {
        padding: 7px 10px;
        font-size: 11px;
    }

    .tj-header-button .tj-header-btn i {
        display: none;
    }
}

/* -------------------------------------------------------------------------
   Gateway (sector selection) screen
   ------------------------------------------------------------------------- */
.gateway-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.gateway-panels {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
}

.gateway-panel {
    position: relative;
    flex: 1 1 50%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: flex-basis .4s ease;
}

.gateway-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 15, .55);
    transition: background .4s ease;
}

.gateway-panel:hover::before {
    background: rgba(15, 15, 15, .35);
}

.gateway-panel__inner {
    position: relative;
    z-index: 2;
    padding: 30px;
    max-width: 460px;
}

.gateway-panel__inner h2 {
    color: #fff;
    font-size: 40px;
    margin-bottom: 14px;
}

.gateway-panel__inner p {
    color: rgba(255, 255, 255, .85);
    margin-bottom: 26px;
}

.gateway-logo {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 5;
}

.gateway-logo img {
    max-height: 60px;
}

@media (max-width: 767px) {
    .gateway-panel {
        flex-basis: 100%;
        min-height: 50vh;
    }

    .gateway-panel__inner h2 {
        font-size: 30px;
    }
}

/* Full-screen loader overlay shown right after a sector is chosen. */
.gateway-loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.gateway-loader.is-active {
    display: flex;
}

.gateway-loader .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(0, 0, 0, .12);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: gateway-spin .9s linear infinite;
}

@keyframes gateway-spin {
    to { transform: rotate(360deg); }
}
