/* Agency Minimal Theme */
* {
    box-sizing: border-box;
}

:root {
    --primary-color: #002387;
    /* Deep Purple/Blue */
    --secondary-color: #F4364C;
    /* Red/Pink Accent */
    --tertiary-color: #F5485C;
    /* Lighter Red/Pink */
    --accent-color: #FFE75D;
    /* Yellow Accent */
    --light-bg: #f8f9fa;
    --text-color: #333;
    --font-heading: 'Lato', sans-serif;
    --font-body: 'Lato', sans-serif;
}

html,
body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Mega Menu */
.mega-menu {
    position: static;
}

.mega-menu .dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    padding: 30px;
    border: none;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-top: 0;
}

/* Desktop Hover */
@media (min-width: 992px) {
    .navbar .nav-item:hover .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }
}

/* Custom Link Styles */
.navbar-nav .nav-link {
    font-weight: 700;
    font-size: 1.1rem;
    /* +10% increase */
}

/* Active Nav Item */
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show>.nav-link,
.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--secondary-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* Button Overrides */
.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    transition: all 0.3s ease;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff;
}

/* Hero Carousel */
.hero-slide {
    height: 100vh;
    /* Occupy full viewport height */
    min-height: 600px;
}

.object-fit-cover {
    object-fit: cover;
}

/* Adjust Carousel Caption to be more like a Hero Overlay */
.carousel-caption {
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: 0;
}

.btn-agency {
    padding: 12px 30px;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary-agency {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary-agency:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

/* Abstract Shape Background - Centered via offsets to avoid transform conflicts with AOS */
.abstract-shape-bg {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background-image: url('../img/home/recommend-bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
    /* Smooth transition for any after-aos effects */
    transition: opacity 0.5s ease;
}

/* Custom Floating Animation */
.floating-element {
    animation: floatingBackground 6s ease-in-out infinite;
}

@keyframes floatingBackground {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Why Choose Us Section */
.w-50px {
    width: 50px;
}

.feature-card {
    background-color: #FEF9E7 !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.custom-shape-divider-bottom-1680000000 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.custom-shape-divider-bottom-1680000000 svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.custom-shape-divider-bottom-1680000000 .shape-fill {
    fill: #FFFFFF;
}

/* Quote CTA Section */
.cta-quote-section {
    min-height: 130vh;
    background-image: url('../img/home/calculator-bg.jpg');
    /* Placeholder */
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

.cta-quote-section .bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.9) 100%);
    z-index: 1;
}

.z-index-2 {
    position: relative;
    z-index: 2;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    font-weight: bold;
    border: none;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    color: white;
    transform: translateY(-2px);
}

.clients-recommend-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.about-listoprint-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.quality-guarantee-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.client-logos-section {
    background-image: url('../img/home/clients-bg.png');
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    min-height: 120vh;
    display: flex;
    align-items: center;
    padding-bottom: 0;
    margin-bottom: 0;
}

.client-logo {
    max-width: 120px;
    height: auto;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.client-logos-section .row>div {
    margin-bottom: 0 !important;
}

.client-logos-section .container {
    padding-bottom: 0 !important;
}

/* Mobile Optimization */
@media (max-width: 768px) {

    /* Hero Section */
    .hero-slide {
        height: auto;
        aspect-ratio: 2 / 3;
        min-height: auto;
    }

    /* Typography Adjustments */
    .display-3 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    h2.display-5 span {
        display: block;
    }

    /* Section Height Resets */
    .clients-recommend-section,
    .about-listoprint-section,
    .quality-guarantee-section,
    .client-logos-section {
        min-height: auto !important;
        height: auto !important;
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
        display: block;
        /* Remove flex display to stack content naturally */
    }

    .cta-quote-section {
        min-height: auto !important;
        height: auto !important;
        padding-bottom: 3rem !important;
    }

    /* Hide heavy decorative backgrounds on mobile to save bandwidth */
    .abstract-shape-bg {
        display: none !important;
    }

    /* Reset transforms and widths for images in sections */
    .clients-recommend-section img,
    .about-listoprint-section img {
        transform: none !important;
        width: 100% !important;
        margin-top: 2rem;
    }

    /* Fix Quality Guarantee Section specific styling */
    .quality-guarantee-section .col-lg-6[style*="width: 40%"] {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* General Text Alignment */
    .clients-recommend-section .col-lg-6,
    .about-listoprint-section .col-lg-6,
    .quality-guarantee-section .col-lg-6 {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    /* Client Logos adjustments */
    .client-logos-section .container {
        padding-bottom: 0 !important;
    }

    /* Ensure footer margin override works if needed */
    footer {
        margin-top: 0 !important;
    }

    /* Mega Menu Adjustments */
    .mega-menu .dropdown-menu {
        padding: 15px;
    }

    /* Button sizes */
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {

    /* Robust selector for Quality Guarantee text column */
    .quality-guarantee-section .row>.col-lg-6 {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Ensure Navbar is always on top and stable */
.navbar {
    z-index: 9999 !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

/* Force Toggler Visibility on Mobile */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        border: none !important;
        outline: none !important;
        padding: 6px 10px !important;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2c255%2c255%2c1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        width: 1.5em !important;
        height: 1.5em !important;
        display: block !important;
    }
}