/* Custom styles for navbar with GOLDEN ALLURE AGENCY */

/* Ensure navbar is always fixed with increased height for two-row layout */
#mainNav {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    background-color: #212529 !important;
    min-height: 90px !important;
    max-height: 90px !important;
    height: 90px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    display: flex;
    flex-direction: column;
    padding: 5px 0 0 0 !important;
    margin-bottom: 0 !important;
}

/* Ensure navbar never changes height */
#mainNav,
#mainNav.navbar-shrink {
    min-height: 90px !important;
    max-height: 90px !important;
    height: 90px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Navbar container - two rows */
.navbar .container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
    padding-left: 15px;
    padding-right: 15px;
    overflow: visible !important;
    max-width: 100% !important;
}

/* Header wrapper - top row: brand + phones */
.navbar-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 35px;
    margin-bottom: 12px;
}

/* Brand Name - GOLDEN ALLURE AGENCY in one line */
.navbar-brand {
    display: flex !important;
    align-items: center;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    flex-shrink: 0;
    height: auto;
}

.brand-name {
    white-space: nowrap;
    color: #fff;
}

.brand-golden {
    color: #ffc107;
}

/* Phone numbers container */
.navbar-phones {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.navbar-phones a {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-phones a:hover,
.navbar-phones a:focus,
.navbar-phones a:active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffc107 !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.navbar-phones a i {
    font-size: 15px;
    flex-shrink: 0;
}

/* Menu Center - bottom row, centered */
.navbar-menu-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 25px;
    margin-top: 10px;
}

.navbar-menu-center .nav {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.navbar-menu-center .nav-item {
    margin: 0;
    padding: 0;
}

.navbar-menu-center .nav-link {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px !important;
    border-radius: 3px;
    transition: all 0.3s ease;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.2;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar-menu-center .nav-link:hover,
.navbar-menu-center .nav-link:focus {
    background-color: rgba(255, 193, 7, 0.3);
    color: #ffc107 !important;
    text-decoration: none !important;
    border-color: #ffc107;
}

/* Mobile phones styling in dropdown */
.navbar-mobile-phones {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.navbar-mobile-phones a {
    display: flex;
    align-items: center;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 16px;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
    touch-action: manipulation;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 44px;
    width: 100%;
}

.navbar-mobile-phones a:hover,
.navbar-mobile-phones a:focus,
.navbar-mobile-phones a:active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffc107 !important;
    text-decoration: none !important;
    transform: translateX(5px);
}

.navbar-mobile-phones a i {
    margin-right: 10px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Navbar toggler for mobile */
.navbar-toggler {
    padding: 5px 10px;
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    z-index: 1032;
    pointer-events: auto;
    margin-left: 8px;
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

.navbar-toggler:focus,
.navbar-toggler:active {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Navbar collapse for mobile */
.navbar-collapse {
    width: 100% !important;
    flex-basis: 100% !important;
    margin-top: 5px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background-color: #212529 !important;
    border-radius: 4px;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1034;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    box-sizing: border-box !important;
}

@media (max-width: 991px) {
    .navbar-collapse {
        margin-left: -15px !important;
        margin-right: -15px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: calc(100% + 30px) !important;
        max-width: 100vw !important;
        left: -15px !important;
        right: auto !important;
    }
}

.navbar-collapse.show,
.navbar-collapse.collapsing {
    display: block !important;
    visibility: visible !important;
}

.navbar-collapse .nav {
    flex-direction: column;
    padding: 10px;
    margin: 0;
    list-style: none;
    width: 100%;
}

.navbar-collapse .nav-item {
    margin: 0;
    padding: 0;
    width: 100%;
}

.navbar-collapse .nav-link {
    padding: 12px 15px !important;
    margin: 2px 0;
    text-align: left;
    color: #fff !important;
    display: block !important;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.navbar-collapse .nav-link:hover,
.navbar-collapse .nav-link:focus {
    background-color: rgba(255, 193, 7, 0.3) !important;
    color: #ffc107 !important;
    text-decoration: none !important;
}

/* Desktop view */
@media (min-width: 992px) {
    .navbar-phones {
        display: flex !important;
    }
    
    .navbar-mobile-phones {
        display: none !important;
    }
    
    .navbar-toggler {
        display: none;
    }
    
    .navbar-menu-center {
        display: flex !important;
    }
}

/* Tablet and mobile view */
@media (max-width: 991px) {
    .navbar-header-wrapper {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
        height: auto;
        gap: 8px;
        position: relative;
        padding-right: 0;
        padding-left: 0;
        width: 100%;
    }
    
    /* Agency name - centered and larger */
    .navbar-brand {
        font-size: 14px;
        align-self: center;
        margin: 0 auto;
        padding: 4px 8px !important;
        line-height: 1.3;
        position: static;
        text-align: center;
        width: 100%;
    }
    
    /* Phone numbers - centered and larger */
    .navbar-phones {
        display: flex !important;
        gap: 8px;
        width: 100%;
        justify-content: center;
        align-items: center;
        margin-top: 0;
        flex-wrap: wrap;
        padding-right: 0;
        padding-left: 0;
    }
    
    .navbar-phones a {
        font-size: 14px;
        padding: 6px 12px;
        white-space: nowrap;
    }
    
    .navbar-phones a span.phone-number {
        display: inline;
    }
    
    .navbar-phones a i {
        font-size: 14px;
        margin-right: 4px;
    }
    
    .navbar-mobile-phones {
        display: none !important;
    }
    
    .navbar-menu-center {
        display: none !important;
    }
    
    /* Hide hamburger menu */
    .navbar-toggler {
        display: none !important;
    }
    
    /* Hide collapse menu */
    .navbar-collapse {
        display: none !important;
    }
    
    #mainNav {
        min-height: auto !important;
        max-height: none !important;
        height: auto !important;
        padding: 8px 0 !important;
    }
    
    .navbar .container {
        padding-top: 4px;
        padding-bottom: 4px;
        min-height: auto;
        height: auto;
        overflow: visible !important;
        position: relative;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 12px;
        padding: 3px 6px !important;
    }
    
    .navbar-phones a {
        font-size: 13px;
        padding: 5px 10px;
    }
    
    .navbar-phones a i {
        font-size: 13px;
    }
}

/* Ensure navbar stays on top of everything */
.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

/* Marquee container - part of fixed header */
.marquee-container {
    position: fixed !important;
    top: 90px !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1029;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.tg-banner {
    display: block;
    text-decoration: none !important;
    color: #fff;
    padding: 5px 0;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.tg-banner > .marquee-wrapper {
    width: 100%;
    overflow: hidden;
}

.tg-banner:hover {
    text-decoration: none !important;
}

.marquee-wrapper {
    display: flex;
    width: 200%;
    overflow: hidden;
    position: relative;
}

.marquee {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    width: 50%;
}

.marquee-wrapper .marquee:first-child {
    animation: marquee-scroll 30s linear infinite;
}

.marquee-wrapper .marquee:last-child {
    animation: marquee-scroll-second 30s linear infinite;
}

.tg-banner:hover .marquee-wrapper .marquee {
    animation-play-state: paused;
}

.tg-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.marquee span {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

/* Marquee animation - first element moves from 0 to -100% */
@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Marquee animation - second element starts from right (100%) and moves to 0 */
@keyframes marquee-scroll-second {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(0);
    }
}


/* Mobile responsive marquee */
@media (max-width: 991px) {
    /* Hide second marquee on mobile to prevent text overlap */
    .marquee-wrapper .marquee[aria-hidden="true"] {
        display: none !important;
    }
    
    .marquee-wrapper {
        width: 100% !important;
    }
    
    .marquee-wrapper .marquee:first-child {
        width: 100% !important;
        animation: marquee-scroll 30s linear infinite;
    }
}

@media (max-width: 576px) {
    .marquee span {
        font-size: 14px;
    }
    
    .tg-icon {
        width: 18px;
        height: 18px;
    }
    
    .marquee {
        gap: 8px;
    }
    
    .marquee-container {
        padding: 3px 0;
    }
    
    .tg-banner {
        padding: 3px 0;
    }
}

/* Remove body padding - masthead will start from top */
body {
    padding-top: 0 !important;
}

@media (max-width: 991px) {
    /* Position marquee right after navbar */
    .marquee-container {
        position: fixed !important;
        top: 75px !important; /* approximate height of navbar with centered content */
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }
    
    /* Remove body padding on mobile - masthead will start from top */
    body {
        padding-top: 0 !important;
    }
    
    /* Masthead starts from top on mobile, content needs padding */
    header.masthead {
        padding-top: 0 !important;
        min-height: 100vh !important;
        display: flex;
        align-items: center;
    }
    
    header.masthead .container {
        padding-top: 130px !important; /* navbar + marquee + отступ для видимости контента */
        width: 100%;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-bottom: 30px;
    }
    
    header.masthead .intro-text {
        margin-top: 0;
        padding-top: 0;
    }
    
    .marquee-container + header.masthead {
        padding-top: 0 !important;
    }
    
    #mainNav {
        margin-bottom: 0 !important;
        border-bottom: none !important;
    }
    
    /* Ensure no white space between navbar and marquee */
    #mainNav {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Hide collapse menu on mobile */
    .navbar-collapse {
        display: none !important;
    }
    
    .marquee-container {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* Masthead starts from top (top: 0), navbar and marquee overlay it */
header.masthead {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    position: relative;
    z-index: 1;
    background-color: transparent;
    top: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Content inside masthead needs padding to not be hidden under navbar and marquee */
header.masthead .container {
    padding-top: 130px; /* 90px navbar + 40px marquee */
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure no gap - masthead starts from top */
.marquee-container + header.masthead {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}


/* Remove any gap after marquee container */
.marquee-container::after {
    display: none !important;
    content: none !important;
}

/* Ensure phones are always clickable */
.navbar-phones a,
.navbar-mobile-phones a {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: default;
}

/* Prevent any overlay from blocking clicks */
.navbar-phones,
.navbar-mobile-phones {
    position: relative;
    z-index: 1031;
    pointer-events: auto;
}

/* Services section - add padding on mobile */
@media (max-width: 991px) {
    #services {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    #services .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100%;
        max-width: 100%;
    }
    
    #services .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    #services .col-md-4,
    #services .col-lg-12 {
        padding-left: 5px;
        padding-right: 5px;
    }
}

@media (max-width: 576px) {
    #services {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    #services .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    #services .col-md-4,
    #services .col-lg-12 {
        padding-left: 0;
        padding-right: 0;
    }
    
    #services p {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Floating Chat Button - Mobile Only */
.social-fab {
    display: none;
}

@media (max-width: 991px) {
    .social-fab {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 9999;
    }
    
    /* Анимация светящейся точки вокруг кнопки */
    .social-fab::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 75px;
        height: 75px;
        margin-top: -37.5px;
        margin-left: -37.5px;
        border-radius: 50%;
        border: 2px solid transparent;
        border-top-color: #ffc107;
        box-shadow: 
            0 0 15px rgba(255, 193, 7, 1),
            0 0 30px rgba(255, 193, 7, 0.8),
            0 0 45px rgba(255, 193, 7, 0.5);
        animation: rotateGlow 3s linear infinite;
        pointer-events: none;
        z-index: 0;
    }
    
    @keyframes rotateGlow {
        0% {
            transform: rotate(0deg) translateX(0);
            opacity: 1;
        }
        25% {
            opacity: 0.9;
        }
        50% {
            opacity: 0.8;
        }
        75% {
            opacity: 0.9;
        }
        100% {
            transform: rotate(360deg) translateX(0);
            opacity: 1;
        }
    }
    
    .social-fab input[type="checkbox"] {
        display: none;
    }
    
    .fab-main {
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
        position: relative;
        z-index: 10001;
    }
    
    .fab-main:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    }
    
    .fab-main svg {
        width: 28px;
        height: 28px;
    }
    
    .fab-icons {
        position: absolute;
        bottom: 70px;
        right: 0;
        display: flex;
        flex-direction: column;
        gap: 15px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s ease;
        pointer-events: none;
    }
    
    .social-fab input[type="checkbox"]:checked ~ .fab-icons {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    .social-fab input[type="checkbox"]:checked ~ .fab-main {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
        transform: rotate(45deg);
    }
    
    .fab-icon {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: all 0.3s ease;
        text-decoration: none;
        background: #fff;
        position: relative;
    }
    
    .fab-icon:hover {
        transform: scale(1.15);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    }
    
    .fab-icon svg {
        width: 24px;
        height: 24px;
        display: block;
    }
    
    /* Telegram icon styling */
    .fab-icon.telegram {
        background: #0088cc;
    }
    
    .fab-icon.telegram svg {
        width: 28px;
        height: 28px;
    }
    
    .fab-icon.max {
        background: #fff;
        padding: 2px;
    }
    
    .fab-max-img {
        width: calc(100% - 4px);
        height: calc(100% - 4px);
        max-width: 32px;
        max-height: 32px;
        object-fit: cover;
        border-radius: 50%;
        display: block;
        margin: auto;
    }
    
}

@media (max-width: 576px) {
    .social-fab {
        bottom: 15px;
        right: 15px;
    }
    
    .fab-main {
        width: 56px;
        height: 56px;
    }
    
    .fab-main svg {
        width: 26px;
        height: 26px;
    }
    
    .fab-icon {
        width: 48px;
        height: 48px;
    }
    
    .fab-icon svg {
        width: 22px;
        height: 22px;
    }
}

/* Footer Phone Numbers with Icons */
.footer-phones {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-phone-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Desktop version - phones in one row */
@media (min-width: 992px) {
    .footer-phones {
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 60px;
        flex-wrap: nowrap;
    }
    
    .footer-phone-item {
        flex-direction: row !important;
        align-items: center;
        gap: 15px;
        flex: 0 0 auto;
    }
    
    .footer-phone-number {
        margin-bottom: 0;
        white-space: nowrap;
    }
    
    .footer-phone-icons {
        flex-direction: row;
        gap: 10px;
    }
}

.footer-phone-number {
    font-size: 18px;
    font-weight: 600;
    color: #f0f9ff;
    margin-bottom: 8px;
}

.footer-phone-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.footer-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.footer-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.footer-icon-call {
    background-color: #28a745;
    color: #fff;
}

.footer-icon-call:hover {
    background-color: #218838;
    color: #fff;
}

.footer-icon-call i {
    font-size: 18px;
}

.footer-icon-telegram {
    background-color: #0088cc;
    color: #fff;
}

.footer-icon-telegram:hover {
    background-color: #006ba3;
}

.footer-icon-telegram svg {
    width: 20px;
    height: 20px;
}

.footer-icon-max {
    background: transparent;
    padding: 0;
    overflow: hidden;
}

.footer-icon-max:hover {
    filter: brightness(1.06);
    box-shadow: 0 4px 14px rgba(92, 78, 229, 0.45);
}

.footer-max-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile responsive footer phones */
@media (max-width: 767px) {
    .footer-phones {
        gap: 15px;
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    .footer-phone-number {
        font-size: 16px;
    }
    
    .footer-phone-icons {
        gap: 10px;
    }
    
    .footer-icon {
        width: 36px;
        height: 36px;
    }
    
    .footer-icon-call i {
        font-size: 16px;
    }
    
    .footer-icon-telegram svg {
        width: 18px;
        height: 18px;
    }
    
}
