/* ======= WorkSkills Base Template Custom Styles ======= */

/* ======= PRIMARY COLOR SCHEME ======= */
.btn-primary {
    background-color: #6c55f9;
    border-color: #6c55f9;
}
.btn-primary:hover {
    background-color: #5a46e4;
    border-color: #5a46e4;
}
.btn-secondary {
    background-color: #ffb545;
    border-color: #ffb545;
}
.btn-secondary:hover {
    background-color: #ff9f25;
    border-color: #ff9f25;
}
.text-primary {
    color: #6c55f9 !important;
}
.text-secondary {
    color: #ffb545 !important;
}
.bg-primary {
    background-color: #6c55f9 !important;
}
.bg-secondary {
    background-color: #ffb545 !important;
}

/* ======= TOPBAR STYLES ======= */
.topbar {
    background: linear-gradient(135deg, #5a46e4 0%, #8365f7 100%);
    border-bottom: none;
    box-shadow: 0 1px 6px rgba(108, 85, 249, 0.15);
}
.topbar .row {
    padding-top: 0;
    padding-bottom: 0;
}
.topbar a.text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.85rem;
    padding-top: 3px;
    padding-bottom: 3px;
    transition: all 0.2s ease;
}
.topbar a.text-muted:hover {
    color: #ffffff !important;
    text-decoration: none;
}
.topbar .btn-square {
    width: 22px;
    height: 22px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    border: none;
    transition: all 0.2s ease;
}
.topbar .btn-square:hover {
    background: rgba(255, 255, 255, 0.25);
}
.topbar .btn-square i {
    font-size: 0.7rem;
    color: #fff;
}

/* Desktop Topbar Refinements */
@media (min-width: 1200px) {
    .desktop-topbar .container {
        padding-top: 0;
        padding-bottom: 0;
    }
    .desktop-topbar .py-1 {
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
    }
    .desktop-topbar .me-4 {
        margin-right: 0.75rem !important;
    }
    .desktop-topbar .me-3 {
        margin-right: 0.5rem !important;
    }
    .desktop-topbar .me-2 {
        margin-right: 0.25rem !important;
    }
    .desktop-topbar .fas {
        font-size: 0.7rem;
    }
}

/* Mobile Topbar */
.mobile-topbar {
    display: none;
    padding: 8px 10px;
    justify-content: space-between;
    background: linear-gradient(135deg, #5a46e4 0%, #8365f7 100%);
}
.mobile-topbar .contact-icons,
.mobile-topbar .social-icons {
    display: flex;
    gap: 12px;
}
.mobile-topbar .social-icons {
    gap: 8px;
}
.mobile-topbar a {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.12);
    transition: all 0.2s ease;
}
.mobile-topbar a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.25);
}
.mobile-topbar .social-icons a {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 26px;
    height: 26px;
    font-size: 12px;
}

/* Mobile Topbar Responsive */
@media (max-width: 1199px) {
    .topbar {
        padding: 5px 0;
    }
    .topbar .text-lg-start,
    .topbar .text-lg-end {
        text-align: center !important;
    }
    .topbar .justify-content-end {
        justify-content: center !important;
    }
}

@media (max-width: 767px) {
    .desktop-topbar {
        display: none;
    }
    .mobile-topbar {
        display: flex;
    }
}

/* ======= LOGO STYLES ======= */
.navbar-brand {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
    padding: 0;
    width: 100%;
    max-width: 210px;
}
.navbar-brand:hover {
    transform: translateY(-1px);
}
.logo-svg {
    width: 210px;
    height: 60px;
    transition: all 0.2s ease;
    object-fit: contain;
    display: block;
}

@media (max-width: 375px) {
    .navbar-brand {
        max-width: 240px;
    }
    .logo-svg {
        width: 240px;
        height: 48px;
    }
}

@media (max-width: 360px) {
    .navbar-brand {
        max-width: 250px;
    }
    .logo-svg {
        width: 260px;
        height: 48px;
    }
}

/* Chrome/WebKit Logo Optimizations */
@supports (-webkit-appearance: none) {
    @media (max-width: 991px) {
        .navbar-brand {
            max-width: 270px !important;
        }
        .logo-svg {
            width: 275px !important;
            height: 75px !important;
        }
    }
    
    @media (max-width: 575px) {
        .navbar-brand {
            max-width: 270px !important;
        }
        .logo-svg {
            width: 275px !important;
            height: 75px !important;
        }
    }
    
    @media (max-width: 360px) {
        .navbar-brand {
            max-width: 240px !important;
        }
        .logo-svg {
            width: 245px !important;
            height: 65px !important;
        }
    }
    
    /* Smaller phones like Galaxy S9 - bigger logo */
    @media (max-width: 340px) {
        .navbar-brand {
            max-width: 280px !important;
        }
        .logo-svg {
            width: 265px !important;
            height: 65px !important;
        }
    }
}

/* Galaxy S9 Chrome - Force bigger logo with pixel density */
@media screen and (max-width: 360px) and (-webkit-min-device-pixel-ratio: 4) {
    .navbar-brand {
        max-width: 280px !important;
    }
    .logo-svg {
        width: 240px !important;
        height: 48px !important;
    }
}

/* All small Chrome phones - backup rule */
@media screen and (max-width: 360px) and (-webkit-transform: translateZ(0)) {
    .navbar-brand {
        max-width: 280px !important;
    }
    .logo-svg {
        width: 240px !important;
        height: 48px !important;
    }
}

/* ======= NAVIGATION STYLES ======= */
.navbar {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    padding: 0.6rem 1rem;
    background-color: #fff;
}
.navbar .navbar-nav .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.7rem 1rem;
    color: #333;
    border-radius: 4px;
    margin: 0 2px;
    transition: all 0.2s ease;
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: #6c55f9 !important;
    background-color: rgba(108, 85, 249, 0.03);
}
.navbar .navbar-toggler {
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 1.2rem;
    color: #fff;
    background: #6c55f9;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(108, 85, 249, 0.25);
    transition: all 0.2s ease;
}
.navbar .navbar-toggler:hover {
    background: #5a46e4;
}
.navbar-nav .border-end.border-5.border-primary {
    border-color: #6c55f9 !important;
    position: relative;
}
.navbar-nav .border-end.border-5.border-primary::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background: #6c55f9;
    border-radius: 4px;
}

/* Navigation Button Styles */
.navbar .btn-primary,
.navbar .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    border: none;
}
.navbar .btn-primary {
    background: #6c55f9;
}
.navbar .btn-primary:hover {
    background: #5a46e4;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(108, 85, 249, 0.25);
}
.navbar .btn-secondary {
    background: #ffb545;
}
.navbar .btn-secondary:hover {
    background: #ff9f25;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 181, 69, 0.25);
}

/* Chrome/WebKit Mobile Menu Button */
@supports (-webkit-appearance: none) {
    @media (max-width: 991px) {
        .navbar .navbar-toggler {
            padding: 0.6rem 0.9rem !important;
            font-size: 1.3rem !important;
        }
        .navbar .navbar-toggler .fa-bars {
            font-size: 1.3rem !important;
        }
    }
}

/* ======= CAROUSEL STYLES ======= */
/* Desktop Carousel */
@media (min-width: 768px) {
    .carousel,
    .carousel-inner,
    .carousel-item {
        height: 500px;
    }
    .carousel-item img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
    .owl-carousel {
        height: 500px;
    }
    .owl-carousel .owl-stage-outer,
    .owl-carousel .owl-stage,
    .owl-carousel .owl-item {
        height: 100%;
    }
    .owl-carousel .owl-item img {
        height: 100%;
        object-fit: cover;
    }
}

/* Mobile Carousel */
@media (max-width: 767px) {
    .carousel,
    .carousel-inner,
    .carousel-item {
        height: 320px !important;
        position: relative;
    }
    .carousel-item img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        opacity: 1 !important;
        filter: none !important;
        z-index: 1;
    }
    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
        opacity: 0.8;
        z-index: 10;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none !important;
    }
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        display: block !important;
        width: 30px !important;
        height: 30px !important;
        background-size: 100% !important;
        filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.7)) !important;
    }
    .carousel-caption {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        text-align: center;
        z-index: 5;
        background: rgba(0,0,0,0.2);
    }
    .carousel-caption h5 {
        font-size: 1.4rem;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    }
    .carousel-caption p {
        font-size: 0.9rem;
        margin-bottom: 15px;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    }
    .carousel-caption .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        font-weight: bold;
        box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
        margin-top: 10px;
        z-index: 6;
        display: inline-block;
    }
    .carousel-indicators {
        z-index: 15;
        bottom: 10px;
    }
    .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #fff;
        opacity: 0.5;
    }
    .carousel-indicators .active {
        opacity: 1;
    }
}

/* ======= FOOTER STYLES ======= */
.footer {
    background: linear-gradient(rgba(24, 26, 45, 0.92), rgba(22, 24, 40, 0.95)), url("../cms/img/footer-img.jpg");
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
}
.footer .text-muted, 
.footer p {
    color: rgba(255, 255, 255, 0.75) !important;
}
.footer h4, 
.footer h5 {
    font-weight: 600;
    position: relative;
    display: inline-block;
}
.footer h4::after, 
.footer h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #6c55f9;
}
.footer .btn-square.btn-outline-light {
    transition: all 0.2s ease;
}
.footer .btn-square.btn-outline-light:hover {
    background: #6c55f9;
    border-color: #6c55f9;
}
.footer a.text-white-50 {
    transition: all 0.2s ease;
}
.footer a.text-white-50:hover {
    color: #ffffff !important;
    padding-left: 5px;
}
.footer .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.footer .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 0.2rem rgba(108, 85, 249, 0.25);
}
.footer .btn-primary {
    background: #6c55f9;
    border: none;
    transition: all 0.2s ease;
}
.footer .btn-primary:hover {
    background: #5a46e4;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}
.copyright {
    background-color: rgba(10, 12, 25, 0.8);
    padding: 0.5rem 0;
} 

/* GALAXY S21 FIREFOX ONLY - Specific Fix */
@media screen and (min-width: 412px) and (max-width: 430px) {
    @supports not (-webkit-appearance: none) {
        .navbar-brand {
            max-width: 180px !important;
        }
        .logo-svg {
            width: 180px !important;
            height: 45px !important;
        }
        .navbar .navbar-toggler {
            padding: 0.3rem 0.5rem !important;
            font-size: 1rem !important;
            width: 32px !important;
            height: 26px !important;
        }
        .navbar {
            padding: 0.4rem 0.8rem !important;
        }
        .navbar .container,
        .navbar .container-fluid {
            display: flex !important;
            flex-wrap: nowrap !important;
            align-items: center !important;
            justify-content: space-between !important;
        }
    }
}