/********** Template CSS - Finanza Premium Financial Theme **********/
:root {
    --primary: #1B4B8A;
    --secondary: #C9A547;
    --tertiary: #475569;
    --light: #EEF4FF;
    --dark: #071525;
    --accent: #0EA5E9;
}

body {
    font-family: 'Inter', 'Open Sans', sans-serif;
    color: #334155;
    line-height: 1.75;
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4 {
    font-family: 'Playfair Display', 'Jost', serif;
    letter-spacing: -0.01em;
}

h1,
.h1,
h2,
.h2,
.fw-bold {
    font-weight: 700 !important;
}

h3,
.h3,
h4,
.h4,
.fw-medium {
    font-weight: 600 !important;
}

h5,
.h5,
h6,
.h6,
.fw-semi-bold {
    font-weight: 500 !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Keyframe Animations ***/
@keyframes navSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@keyframes floatY {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(27, 75, 138, 0.30); }
    50%       { box-shadow: 0 6px 35px rgba(27, 75, 138, 0.65); }
}

@keyframes shimmerGold {
    0%, 100% { text-shadow: none; filter: brightness(1); }
    50%       { text-shadow: 0 0 20px rgba(201,165,71,0.6); filter: brightness(1.15); }
}

@keyframes pillPulse {
    0%, 100% { border-color: rgba(201,165,71,0.45) !important; }
    50%       { border-color: rgba(201,165,71,1) !important; box-shadow: 0 0 12px rgba(201,165,71,0.25); }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroZoom {
    from { transform: scale(1.06); }
    to   { transform: scale(1); }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/*** Navbar — always white, slides down on load ***/
.navbar-top {
    background: #ffffff !important;
    box-shadow: 0 2px 20px rgba(7, 21, 37, 0.08);
    animation: navSlideDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Elevate shadow when scrolled (class added by JS) */
.navbar-top.shadow {
    box-shadow: 0 4px 30px rgba(7, 21, 37, 0.14) !important;
}

/*** Button ***/
.btn {
    transition: all .3s ease;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1E6CD0 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(27, 75, 138, 0.3);
    color: #FFFFFF;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1E6CD0 0%, var(--primary) 100%);
    box-shadow: 0 6px 20px rgba(27, 75, 138, 0.45);
    transform: translateY(-1px);
    color: #FFFFFF;
    border: none;
}

.btn-outline-primary:hover {
    color: var(--light);
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.fixed-top {
    transition: .5s;
}

.top-bar {
    height: 45px;
    border-bottom: 1px solid rgba(27, 75, 138, .07);
    background: var(--dark);
}

.top-bar small,
.top-bar small a {
    color: rgba(255, 255, 255, 0.65) !important;
}

.top-bar .text-primary {
    color: var(--secondary) !important;
}

/* Gradient brand text */
.navbar-brand h1 {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Playfair Display', serif;
}

/* Section label pills — gold border accent */
.d-inline-block.border.rounded.text-primary {
    border-color: var(--secondary) !important;
    background: rgba(201, 165, 71, 0.06);
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    padding: 25px 15px;
    color: var(--tertiary);
    font-weight: 500;
    outline: none;
    letter-spacing: 0.01em;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(0, 0, 0, .07);
        background: #FFFFFF;
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
        border-top: 2px solid var(--secondary);
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: start;
    z-index: 1;
    background: linear-gradient(90deg, rgba(7, 21, 37, 0.90) 0%, rgba(7, 21, 37, 0.55) 55%, rgba(7, 21, 37, 0.10) 100%);
}

.carousel-caption .text-primary {
    color: var(--secondary) !important;
    border-color: rgba(201, 165, 71, 0.5) !important;
}

.carousel-control-prev,
.carousel-control-next {
    width: 3rem;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--secondary);
    border: 10px solid var(--secondary);
}

.carousel-control-prev-icon {
    border-radius: 0 3rem 3rem 0;
}

.carousel-control-next-icon {
    border-radius: 3rem 0 0 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }

    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background: linear-gradient(135deg, rgba(7, 21, 37, 0.93) 0%, rgba(27, 75, 138, 0.85) 100%), url(../img/header.svg) top center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-weight: 500;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--tertiary);
}


/*** Facts ***/
.facts {
    background: linear-gradient(135deg, rgba(7, 21, 37, .97), rgba(27, 75, 138, .95)), url(../img/bg.svg);
}

.facts .display-4 {
    color: var(--secondary) !important;
    font-family: 'Playfair Display', serif;
}


/*** Callback ***/
.callback {
    position: relative;
}

.callback::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 50%;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(7, 21, 37, .97), rgba(27, 75, 138, .95)), url(../img/bg.svg);
    z-index: -1;
}

.callback .bg-white {
    border-top: 3px solid var(--secondary) !important;
    box-shadow: 0 20px 60px rgba(7, 21, 37, 0.15);
}


/*** Feature ***/
.feature .feature-box,
.feature .feature-box * {
    transition: .4s ease;
}

.feature .feature-box {
    box-shadow: 0 4px 20px rgba(7, 21, 37, 0.06);
}

.feature .feature-box:hover {
    background: linear-gradient(135deg, var(--primary), #1E6CD0);
    border-color: var(--primary) !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(27, 75, 138, 0.25);
}

.feature .feature-box:hover * {
    color: #FFFFFF !important;
}


/*** Service ***/
.service .nav .nav-link {
    transition: all .4s ease;
}

.service .nav .nav-link.active {
    border-color: var(--primary) !important;
    background: linear-gradient(135deg, var(--primary), #1E6CD0);
}

.service .nav .nav-link.active h5 {
    color: #FFFFFF !important;
}

.service .nav .nav-link.active h5 i {
    color: #FFFFFF !important;
}


/*** Project ***/
.project-item,
.project-item .project-img {
    position: relative;
}

.project-item .project-img a {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(7, 21, 37, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    opacity: 0;
    transition: .4s;
}

.project-item:hover .project-img a {
    opacity: 1;
}

.project-item .project-title {
    position: absolute;
    top: 3rem;
    right: 0;
    bottom: 0;
    left: 3rem;
    border: 1px solid var(--light);
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    z-index: -1;
    transition: .4s;
}

.project-item:hover .project-title {
    background: linear-gradient(135deg, var(--primary), #1E6CD0);
    border-color: var(--primary);
}

.project-item .project-title h4 {
    transition: .4s;
}

.project-item:hover .project-title h4 {
    color: #FFFFFF;
}

.project-carousel .owl-nav {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.project-carousel .owl-nav .owl-prev,
.project-carousel .owl-nav .owl-next {
    margin: 0 12px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--light);
    border-radius: 45px;
    font-size: 22px;
    transition: .4s;
}

.project-carousel .owl-nav .owl-prev:hover,
.project-carousel .owl-nav .owl-next:hover {
    background: linear-gradient(135deg, var(--primary), #1E6CD0);
    color: var(--light);
}


/*** Team ***/
.team-item {
    position: relative;
    padding: 4rem 0;
}

.team-item img {
    position: relative;
    z-index: 2;
}

.team-item .team-text {
    position: absolute;
    top: 0;
    right: 3rem;
    bottom: 0;
    left: 3rem;
    padding: 15px;
    border: 1px solid var(--light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: .4s;
    z-index: 1;
}

.team-item:hover .team-text {
    background: linear-gradient(135deg, var(--primary), #1E6CD0);
    border-color: var(--primary);
}

.team-item .team-text h4 {
    transition: .4s;
}

.team-item:hover .team-text h4 {
    color: #FFFFFF;
}

.team-item .team-social .btn {
    background: var(--light);
    color: var(--primary);
}

.team-item:hover .team-social .btn {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.team-item .team-social .btn:hover {
    background: var(--secondary);
    color: var(--dark);
}


/*** Testimonial ***/
.testimonial-item {
    position: relative;
    text-align: center;
    padding-top: 30px;
}

.testimonial-item .testimonial-text {
    position: relative;
    text-align: center;
    box-shadow: 0 6px 25px rgba(7, 21, 37, 0.08);
}

.testimonial-item .testimonial-text .btn-square {
    position: absolute;
    width: 60px;
    height: 60px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), #1E6CD0);
    border: none;
}

.testimonial-item .testimonial-text .btn-square i {
    color: #FFFFFF;
}

.testimonial-item .testimonial-text::before {
    position: absolute;
    content: "";
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    border: 30px solid;
    border-color: var(--light) transparent transparent transparent;
}

.testimonial-item .testimonial-text::after {
    position: absolute;
    content: "";
    bottom: -59px;
    left: 50%;
    transform: translateX(-50%);
    border: 30px solid;
    border-color: #FFFFFF transparent transparent transparent;
}

.testimonial-carousel .owl-item img {
    margin: 0 auto;
    width: 100px;
    height: 100px;
    border: 3px solid var(--secondary);
}

.testimonial-carousel .owl-dots {
    margin-top: 25px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 30px;
    height: 30px;
    border: 1px solid var(--light);
    border-radius: 30px;
    transition: .4s;
}

.testimonial-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 16px;
    height: 16px;
    top: 6px;
    left: 6px;
    border-radius: 16px;
    background: var(--light);
    transition: .4s;
}

.testimonial-carousel .owl-dot.active {
    border-color: var(--secondary);
}

.testimonial-carousel .owl-dot.active::after {
    background: var(--secondary);
}


/*** Footer ***/
.footer {
    background: linear-gradient(135deg, #071525 0%, #0D2148 100%) !important;
    border-top: 3px solid var(--secondary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: rgba(255, 255, 255, 0.65);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
    color: var(--secondary);
}

.footer .btn.btn-link:hover {
    color: var(--secondary);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer h4 {
    color: #FFFFFF !important;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(201, 165, 71, 0.3);
    margin-bottom: 1.2rem !important;
}

.copyright {
    color: rgba(255, 255, 255, 0.55);
    background: #040D18;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright a {
    color: var(--secondary);
}

.copyright a:hover {
    color: #FFFFFF;
}


/*** Enhanced Animations ***/

/* Hero carousel image subtle zoom on active slide */
.carousel-item img {
    transform: scale(1.04);
    transition: transform 0s;
}
.carousel-item.active img {
    animation: heroZoom 7s ease-out forwards;
}

/* Navbar brand hover float */
.navbar-brand h1 {
    transition: transform 0.3s ease;
}
.navbar-brand:hover h1 {
    transform: scale(1.04);
}

/* Nav link animated underline */
.navbar .navbar-nav .nav-link {
    position: relative;
}
.navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 18px;
    left: 15px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}
@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link::after { display: none; }
}
.navbar .navbar-nav .nav-link:hover::after,
.navbar .navbar-nav .nav-link.active::after {
    width: calc(100% - 30px);
}

/* Section label pill border pulse */
.d-inline-block.border.rounded.text-primary {
    animation: pillPulse 2.8s ease-in-out infinite;
}

/* Primary button persistent glow pulse */
.btn-primary {
    animation: pulseGlow 2.5s ease-in-out infinite;
}
.btn-primary:hover {
    animation: none;
}

/* Feature box icon float on hover */
.feature-box:hover .fa {
    animation: floatY 0.8s ease-in-out;
    display: inline-block;
}

/* Feature box icon smooth scale */
.feature-box .fa {
    transition: transform 0.3s ease;
}
.feature-box:hover .fa {
    transform: scale(1.15);
}

/* Facts counter gold shimmer */
.facts .display-4 {
    animation: shimmerGold 3s ease-in-out infinite;
}

/* Facts icon float */
.facts .fa-3x {
    animation: floatY 3s ease-in-out infinite;
}
.facts .col-sm-6:nth-child(2) .fa-3x { animation-delay: 0.4s; }
.facts .col-sm-6:nth-child(3) .fa-3x { animation-delay: 0.8s; }
.facts .col-sm-6:nth-child(4) .fa-3x { animation-delay: 1.2s; }

/* Team social buttons pop on hover */
.team-social .btn {
    transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
}
.team-social .btn:hover {
    transform: translateY(-3px) scale(1.12);
}

/* Project carousel card lift */
.project-item {
    transition: transform 0.3s ease;
}
.project-item:hover {
    transform: translateY(-6px);
}

/* About tab pane fade entrance */
.tab-pane.show.active {
    animation: fadeSlideUp 0.35s ease both;
}

/* Service pill tab hover slide */
.service .nav .nav-link {
    position: relative;
    overflow: hidden;
}
.service .nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: var(--secondary);
    transition: height 0.3s ease;
    border-radius: 0 2px 2px 0;
}
.service .nav .nav-link:hover::before {
    height: 100%;
}
.service .nav .nav-link.active::before {
    height: 100%;
    background: rgba(255,255,255,0.4);
}

/* Callback section entrance animation */
.callback .bg-white {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.callback .bg-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(7, 21, 37, 0.2) !important;
}

/* Footer link hover slide */
.footer .btn.btn-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.25s ease, color 0.25s ease;
}
.footer .btn.btn-link:hover {
    padding-left: 6px;
}

/* Back to top button spin on hover */
.back-to-top {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.back-to-top:hover {
    transform: translateY(-4px) rotate(360deg);
    box-shadow: 0 8px 25px rgba(27,75,138,0.5);
}

/* ─── Hero section staggered animations ─────────────────────────────────── */

/* Keyframes */
@keyframes heroSlideLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(35px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroScaleIn {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes heroBadgeIn {
    from { opacity: 0; transform: translateX(-40px); letter-spacing: 0.15em; }
    to   { opacity: 1; transform: translateX(0);    letter-spacing: 0.04em; }
}

/* Default: all hero elements invisible (reset when slide is not active) */
.carousel-item .hero-badge,
.carousel-item .hero-title,
.carousel-item .hero-sub,
.carousel-item .hero-actions {
    opacity: 0;
    animation: none;
}

/* Active slide: staggered entrance — badge → title → subtitle → buttons */
.carousel-item.active .hero-badge {
    animation: heroBadgeIn 0.65s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.carousel-item.active .hero-title {
    animation: heroSlideLeft 0.75s 0.50s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.carousel-item.active .hero-sub {
    animation: heroFadeUp 0.65s 0.80s ease both;
}
.carousel-item.active .hero-actions {
    animation: heroFadeUp 0.65s 1.00s ease both;
}

/* Hero badge pill */
.hero-badge {
    display: inline-block;
    background: rgba(201, 165, 71, 0.18);
    border: 1px solid rgba(201, 165, 71, 0.6);
    color: #C9A547 !important;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 30px;
    margin-bottom: 1.2rem;
}

/* Hero headline */
.hero-title {
    color: #ffffff !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Hero subtitle */
.hero-sub {
    color: rgba(255, 255, 255, 0.88) !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
    max-width: 560px;
    line-height: 1.7;
}

/* Hero buttons gap on small screens */
.hero-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.hero-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Slide indicators active */
#header-carousel .carousel-indicators button.active {
    background: var(--secondary) !important;
    opacity: 1 !important;
    transform: scale(1.25);
    transition: transform 0.3s ease;
}

/* Staggered section label entrance */
.wow.fadeInUp .d-inline-block.border.rounded.text-primary,
.wow.fadeInLeft .d-inline-block.border.rounded.text-primary,
.wow.fadeInRight .d-inline-block.border.rounded.text-primary {
    animation-delay: inherit;
}

/* About section image overlay glow */
.col-lg-6.wow.fadeInLeft img {
    transition: box-shadow 0.4s ease;
}
.col-lg-6.wow.fadeInLeft img:hover {
    box-shadow: 0 20px 60px rgba(27,75,138,0.25);
}

/* Testimonial quote icon pulse */
.testimonial-text .btn-square {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Service tab active indicator */
.service .nav .nav-link.active h5 i {
    animation: floatY 1.5s ease-in-out infinite;
}
