/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary-color: #362c79;
    /* Deep Purple */
    --secondary-color: #157b74;
    /* Teal Green */
    --accent-color: #ffb703;
    /* Subtle Accent if needed */
    --white: #ffffff;
    --light-grey: #f8f9fa;
    --dark-grey: #343a40;
    --text-color: #2c2c2c;

    /* Gradients */
    --brand-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* Spacing & Layout */
    --section-padding: 80px 0;
    --border-radius: 12px;
}

/* Reset & Base Styles */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Preloader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-grey);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 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;
}

.section-padding {
    padding: var(--section-padding);
}

/* Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

/* Premium Buttons */
.navbar-brand img {
    height: 55px;
    width: auto;
    /* Filter to turn white logo to Brand Primary Color (#362c79) */
    filter: brightness(0) saturate(100%) invert(16%) sepia(48%) saturate(2768%) hue-rotate(234deg) brightness(91%) contrast(93%);
    transition: all 0.3s ease;
}

.footer .navbar-brand img {
    /* Reset filter for dark footer (keep logo white) */
    filter: none;
    height: 50px;
    /* Slightly smaller for footer */
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.btn-premium {
    background: var(--brand-gradient);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(54, 44, 121, 0.2);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(54, 44, 121, 0.3);
    color: white;
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn-premium:hover::after {
    width: 300px;
    height: 300px;
}

.btn-outline-premium {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 28px;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-premium:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Floating Shapes Background */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    filter: blur(50px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    right: -100px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    bottom: -50px;
    left: -50px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, 50px) rotate(10deg);
    }
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Image Specifics */
.hero-img-wrapper {
    position: relative;
    z-index: 1;
    padding: 20px;
}

.hero-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: var(--brand-gradient);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.05;
    z-index: -1;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    50% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

.hero-main-img {
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.6s ease;
}

.hero-img-wrapper:hover .hero-main-img {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 1.2rem;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 2;
    min-width: 180px;
    animation: float-hero 5s ease-in-out infinite;
}

.hero-float-card.top-right {
    top: 10%;
    right: -10px;
    animation-delay: 0s;
}

.hero-float-card.bottom-left {
    bottom: 15%;
    left: -10px;
    animation-delay: 2.5s;
}

@keyframes float-hero {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Micro-animations */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* --- About Section --- */
.about-image-wrapper {
    position: relative;
    z-index: 1;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 60%;
    height: 70%;
    background: var(--brand-gradient);
    border-radius: 30px;
    opacity: 0.1;
    z-index: -1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    background: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* --- Services Section --- */
.service-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--brand-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(54, 44, 121, 0.1);
    border-color: transparent;
}

.service-card:hover::before {
    opacity: 0.05;
    /* Subtle tint on hover */
}

.service-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--light-grey);
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
}

.service-btn {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.service-card:hover .service-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Highlighted Service Styles */
.highlighted-service {
    border: 2px solid var(--primary-color);
    background: linear-gradient(160deg, #ffffff 0%, #f4f7fa 100%);
}

.highlighted-service:hover {
    border-color: var(--primary-color);
    /* Maintain border on hover */
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* --- Process Section --- */
.process-step {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1rem;
}

.process-icon-wrapper {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    font-size: 2rem;
    transition: all 0.4s ease;
}

.process-step:hover .process-icon-wrapper {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.1);
}

.process-line {
    position: absolute;
    top: 65px;
    /* Half of icon height + padding roughly */
    left: 0;
    width: 100%;
    height: 3px;
    background: #e9ecef;
    z-index: 0;
}

.process-line-fill {
    position: absolute;
    top: 65px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--brand-gradient);
    z-index: 0;
    transition: width 1.5s ease;
}

/* --- Projects Section --- */
.project-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 300px;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(54, 44, 121, 0.9), transparent);
    padding: 2rem 1.5rem 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

.project-card:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* --- Team Section --- */
.team-member {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    text-align: center;
    padding-bottom: 1.5rem;
}

.team-member:hover {
    transform: translateY(-10px);
}

.team-img-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.team-img {
    width: 100%;
    height: 350px;
    object-fit: contain;
    object-position: bottom;
}

.team-social {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    gap: 1rem;
    transition: bottom 0.3s ease;
}

.team-member:hover .team-social {
    bottom: 0;
}

.social-link {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}


/* --- Contact Section --- */
.contact-info-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: var(--primary-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(54, 44, 121, 0.1);
}

.map-container {
    height: 100%;
    min-height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* --- Footer --- */
.footer {
    background: #212529;
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--white);
    padding-left: 5px;
}

.social-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-circle:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* --- Floating WhatsApp --- */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}

.whatsapp-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    font-weight: 600;
    width: 140px;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.floating-whatsapp:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* --- Reviews Section --- */
.reviews-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0.5rem 2rem;
    /* Extra bottom padding for shadow/hover space */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
    cursor: grab;
}

.reviews-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Webkit */
}

.reviews-scroll-container:active {
    cursor: grabbing;
}

.review-card {
    flex: 0 0 auto;
    width: 350px;
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.review-stars {
    color: #ffc107;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.review-text {
    font-size: 0.95rem;
    color: var(--text-color);
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--light-grey);
    flex-shrink: 0;
}

.reviewer-details h6 {
    margin-bottom: 0;
    font-weight: 700;
    color: var(--primary-color);
}

.reviewer-details small {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

/* --- Responsive Design (Mobile) --- */
@media (max-width: 991px) {
    :root {
        --section-padding: 50px 0;
    }

    h1.display-3 {
        font-size: 2.8rem;
    }

    h2.display-5 {
        font-size: 2.2rem;
    }

    /* Navbar */
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
    }

    .navbar-toggler {
        background: rgba(255, 255, 255, 0.5);
    }

    /* Hero */
    #home {
        padding-top: 120px !important;
        text-align: center;
        height: auto !important;
        min-height: auto !important;
        padding-bottom: 60px;
    }

    .hero-img-wrapper {
        margin-top: 3rem;
    }

    .d-flex.gap-3.reveal {
        justify-content: center;
    }

    /* Process Line */
    .process-line,
    .process-line-fill {
        display: none;
    }


    /* Process Section Mobile Scroll */
    /* Process Section Mobile Single Row (Compact) */
    .mobile-scroll-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: hidden;
        /* No scroll */
        justify-content: space-between;
        padding-bottom: 0;
        gap: 4px;
    }

    .mobile-scroll-row::-webkit-scrollbar {
        display: none;
    }

    .mobile-scroll-row>.col-lg-3 {
        flex: 1;
        max-width: 25%;
        padding: 0 2px;
    }

    /* Compact Process Steps for Mobile */
    .mobile-scroll-row .process-step {
        padding: 0.5rem 0;
    }

    .mobile-scroll-row .process-icon-wrapper {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .mobile-scroll-row h5 {
        font-size: 0.7rem;
        margin-bottom: 0.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-scroll-row p.small {
        font-size: 0.55rem;
        line-height: 1.1;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }


    /* About Section */
    .about-image-wrapper {
        margin-bottom: 3rem;
        padding-right: 0 !important;
    }

    .about-image-wrapper img {
        height: auto !important;
        max-height: 400px;
    }
}

@media (max-width: 768px) {

    /* Typography */
    h1.display-3 {
        font-size: 2.2rem;
    }

    h2.display-5 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 1rem;
    }

    /* Hero Floating Elements */
    .hero-float-card {
        padding: 0.8rem 1rem;
        min-width: auto;
    }

    .hero-float-card h6 {
        font-size: 0.9rem;
    }

    .hero-float-card small {
        font-size: 0.7rem;
    }

    .hero-float-card.top-right {
        top: 0;
        right: 0;
    }

    .hero-float-card.bottom-left {
        bottom: 5%;
        left: 0;
    }

    .hero-main-img {
        transform: none !important;
        /* Disable 3D tilt on mobile for cleaner look */
    }

    /* Services */
    .service-card {
        padding: 2rem 1.5rem;
    }

    /* Reviews */
    .reviews-scroll-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .review-card {
        width: 85vw;
        min-width: 300px;
        max-width: 350px;
    }

    /* About Section Float */
    .glass-panel.position-absolute {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        margin: -50px auto 0 auto !important;
        left: 0;
        right: 0;
        transform: none !important;
    }

    /* Footer */
    .footer {
        text-align: center;
    }

    .social-circle {
        margin: 0 auto;
    }

    .footer .d-flex {
        justify-content: center;
    }
}

/* --- Mobile Hero Redesign (Immersive) --- */
@media (max-width: 991px) {
    #home {
        background-image: linear-gradient(rgba(54, 44, 121, 0.85), rgba(21, 123, 116, 0.85)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=800');
        background-size: cover;
        background-position: center;
        background-attachment: scroll;
        /* Fixed can be buggy on mobile */
        display: flex;
        align-items: center;
        padding-top: 100px !important;
        padding-bottom: 80px;
        min-height: 85vh !important;
        text-align: center;
    }

    /* Hide the stacked image wrapper */
    .hero-img-wrapper {
        display: none !important;
    }

    /* Adjust text colors for dark background */
    #home h1,
    #home p,
    #home .lead {
        color: #ffffff !important;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    #home .text-primary {
        color: #ffb703 !important;
        /* Gold/Yellow pop */
    }

    #home .text-secondary {
        color: #e0e0e0 !important;
    }

    #home .text-muted {
        color: rgba(255, 255, 255, 0.85) !important;
    }

    /* Adjust pill badge */
    #home .rounded-pill {
        background-color: rgba(255, 255, 255, 0.15) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
        color: #fff !important;
        backdrop-filter: blur(5px);
    }

    /* Adjust buttons */
    #home .btn-outline-premium {
        border-color: #fff;
        color: #fff;
    }

    #home .btn-outline-premium:hover {
        background-color: #fff;
        color: var(--primary-color);
    }
}