/* Responsive styles for Veva Universe */

/* WordPress Menu integration with Bootstrap Navbar */
.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav .menu-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

.navbar-nav .menu-item a:hover,
.navbar-nav .menu-item.current-menu-item > a,
.navbar-nav .menu-item.current-page-item > a,
.navbar-nav .current-menu-parent > a,
.navbar-nav .current-menu-ancestor > a {
    color: #43b0d6 !important;
}

/* Mobile Sub-menu (Inline) */
.navbar-nav .sub-menu {
    list-style: none;
    padding-left: 20px;
    margin: 0;
    display: none;
}

.navbar-nav .menu-item-has-children:hover>.sub-menu,
.navbar-nav .menu-item-has-children:focus-within>.sub-menu {
    display: block;
}

@media (min-width: 768px) {
    .navbar-nav {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }

    .navbar-nav .menu-item-has-children {
        position: relative;
    }

    /* Add dropdown caret */
    .navbar-nav .menu-item-has-children>a::after {
        content: "";
        display: inline-block;
        margin-left: 0.4em;
        vertical-align: 0.255em;
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-bottom: 0;
        border-left: 0.3em solid transparent;
    }

    /* Absolute position for desktop dropdown */
    .navbar-nav .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 250px;
        background-color: #ffffff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        border-radius: 4px;
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        z-index: 1000;
    }

    /* Show dropdown on hover */
    .navbar-nav .menu-item-has-children:hover>.sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Style dropdown items */
    .navbar-nav .sub-menu .menu-item a {
        color: #333333;
        padding: 10px 20px;
        font-size: 0.9rem;
        transition: background-color 0.2s, color 0.2s;
    }

    .navbar-nav .sub-menu .menu-item a:hover {
        background-color: #f8f9fa;
        color: var(--color-heading);
    }

    /* Remove caret from sub-sub-menus if any */
    .navbar-nav .sub-menu .menu-item-has-children>a::after {
        border-top: 0.3em solid transparent;
        border-bottom: 0.3em solid transparent;
        border-left: 0.3em solid;
        vertical-align: middle;
        margin-left: auto;
        float: right;
        margin-top: 5px;
    }
}

@media (max-width: 991.98px) {

    /* Hide top bar contact info on smaller screens to save space, or re-stack them */
    .top-bar-contact {
        display: none !important;
    }

    .custom-logo {
        max-height: 60px;
        padding-bottom: 10px;
        margin: auto;
    }
}

/* Responsive adjustments for mobile devices */
@media (max-width: 767.98px) {
    .top-bar {
        text-align: center;
        padding-bottom: 0 !important;
    }

    .navbar-collapse {
        background-color: var(--color-heading);
        padding: 1rem;
        border-radius: 0 0 8px 8px;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .top-bar-contact {
        margin-top: 1rem;
        justify-content: center !important;
    }

    .contact-box {
        margin-bottom: 0.5rem;
    }

    .hero-carousel-item {
        height: 60vh !important;
        min-height: 400px !important;
    }

    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 1.8rem !important;
    }

    .hero-text {
        font-size: 1rem !important;
    }

    /* Footer & Floating Buttons Responsiveness */
    .site-footer {
        padding-top: 40px;
        text-align: center;
    }

    .site-footer .col-lg-3,
    .site-footer .col-md-6 {
        margin-bottom: 2rem !important;
    }

    .site-footer .text-start {
        text-align: center !important;
    }

    .footer-divider {
        margin: 1rem 0;
    }

    .floating-actions {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .float-btn {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    /* Features Section */
    .features-section {
        padding: 80px 0;
        margin-top: -30px;
        margin-bottom: -30px;
        clip-path: polygon(0 8vw, 100% 0, 100% calc(100% - 8vw), 0 100%);
    }

    .feature-col {
        padding: 0 15px;
        text-align: center;
    }

    .feature-title {
        justify-content: center;
    }

    .feature-bottom-line {
        margin: 0 auto;
    }

    /* Special Services Section */
    .special-services-section {
        padding: 100px 0 0;
        margin-top: -30px;
        margin-bottom: 30px;
    }

    .special-services-bg {
        clip-path: polygon(0 5vw, 100% 0, 100% 100%, 0 100%);
    }

    .section-title {
        font-size: 2rem;
    }

    .service-card {
        padding: 30px 20px !important;
    }

    /* CTA Section */
    .cta-section {
        padding: 80px 0 100px;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8vw), 0 100%);
    }

    .cta-title {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        padding: 0 20px;
    }

    /* About Us Section */
    .about-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .about-image-wrapper {
        margin-bottom: 40px;
        margin-right: 40px;
        /* Make room for the accent */
    }

    .about-image-accent {
        bottom: -20px;
        right: -20px;
    }

    .about-dotted-pattern {
        display: none;
        /* Hide on mobile to prevent overflow/messy text */
    }

    /* Single Service Page */
    .service-bottom-image-wrapper {
        max-width: 100%;
        margin-top: 2rem;
    }
    
    .service-bottom-image-bg {
        right: -5%;
        width: 60%;
        height: 60%;
    }
    
    .service-bottom-image-pattern {
        right: -10%;
        width: 100px;
        height: 100px;
    }
    
    /* Career Page */
    .career-shape-large {
        width: 100vw;
        height: 50%;
        clip-path: polygon(0 0, 100% 20%, 0 100%);
    }
}