/* 
====================================================================
   ANAND FABRICATION - PROFESSIONAL PREMIUM STYLESHEET
   Theme: Industrial Sapphire & Platinum
   Standard: Modern Minimalist, No Pure Black/White
==================================================================== 
*/

/* ========================================= */
/* 1. ROOT VARIABLES & THEME CONFIGURATION   */
/* ========================================= */
:root {
    /* --- Color Palette --- */
    /* Primary: Trustworthy, Deep, Corporate */
    --clr-primary: #102a43;
    /* Deep Navy */
    --clr-primary-light: #243b55;
    /* Lighter Navy */

    /* Accent: Energetic, Highlights */
    --clr-accent: #d97706;
    /* Industrial Bronze/Amber */
    --clr-accent-glow: rgba(217, 119, 6, 0.4);

    /* Backgrounds: Avoiding Pure White */
    --bg-body: #f0f4f8;
    /* Cool Light Grey-Blue (Platinum) */
    --bg-surface: #ffffff;
    /* Pure surface for contrast */
    --bg-surface-alt: #e1e8ef;
    /* Slightly darker panel background */
    --bg-footer: #0f172a;
    /* Very Dark Blue-Grey */

    /* Typography Colors: Avoiding Pure Black */
    --text-main: #334e68;
    /* Slate Grey for headers */
    --text-body: #486581;
    /* Softer Slate for body text */
    --text-light: #f0f4f8;
    /* Off-white for dark backgrounds */

    /* --- Measurements & Effects --- */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;

    --shadow-soft: 0 4px 6px -1px rgba(16, 42, 67, 0.05), 0 2px 4px -1px rgba(16, 42, 67, 0.03);
    --shadow-card: 0 10px 15px -3px rgba(16, 42, 67, 0.08), 0 4px 6px -2px rgba(16, 42, 67, 0.04);
    --shadow-hover: 0 20px 25px -5px rgba(16, 42, 67, 0.1), 0 10px 10px -5px rgba(16, 42, 67, 0.04);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================= */
/* 2. RESET & BASE STYLES                   */
/* ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ========================================= */
/* 3. UTILITIES & COMPONENTS                */
/* ========================================= */
.section-padding {
    padding: 60px 0;
}

/* Custom Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 100%);
    color: var(--text-light);
    padding: 15px 40px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 42, 67, 0.2);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--clr-accent) 0%, #f59e0b 100%);
    z-index: -1;
    transition: var(--transition);
    opacity: 0;
}

.btn-primary-custom:hover::before {
    opacity: 1;
}

.btn-primary-custom:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(16, 42, 67, 0.3);
}

/* Section Titles */
.section-title {
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 2.75rem;
    color: var(--clr-primary);
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.125rem;
    color: var(--text-body);
    max-width: 600px;
    margin: 0 auto;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--clr-accent);
    margin: 20px auto 0;
    border-radius: var(--radius-pill);
}

/* ========================================= */
/* 4. NAVBAR STYLES                         */
/* ========================================= */
.navbar {
    background-color: rgba(240, 244, 248, 0.95) !important;
    /* Matches bg-body with opacity */
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    padding: 20px 0;
    transition: var(--transition);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--clr-primary) !important;
}

.navbar-brand span.text-primary-custom {
    color: var(--clr-accent) !important;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 600;
    margin: 0 10px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--clr-accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--clr-primary) !important;
}

/* ========================================= */
/* 5. HERO SECTION                          */
/* ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    margin-top: 0;
    /* Bootstrap fixed nav handles spacing */
    overflow: hidden;
}

.carousel-item {
    height: 100vh;
    background-color: var(--clr-primary);
    /* Fallback */
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    filter: brightness(0.9);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Modern Gradient Overlay: Dark Blue to transparent */
    background: linear-gradient(90deg, rgba(16, 42, 67, 0.95) 0%, rgba(16, 42, 67, 0.6) 50%, rgba(16, 42, 67, 0.1) 100%);
}

.hero-caption {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding-left: 20px;
    border-left: 5px solid var(--clr-accent);
}

.hero-caption h1 {
    color: #ffffff;
    /* Always white on dark hero bg */
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-caption p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.35rem;
    margin-bottom: 35px;
}

/* ========================================= */
/* 6. COMPETENCIES (Why Us) CARDS           */
/* ========================================= */
#competencies {
    background-color: var(--bg-body);
}

.competency-card {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.competency-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, var(--clr-accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.competency-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.competency-card:hover::before {
    opacity: 1;
}

.comp-number {
    font-size: 4rem;
    font-weight: 800;
    color: #e2e8f0;
    /* Very light cool grey */
    position: absolute;
    top: 20px;
    right: 30px;
    line-height: 1;
    font-family: var(--font-heading);
}

.competency-card h4 {
    margin-top: 20px;
    color: var(--clr-primary);
}

/* ========================================= */
/* 7. VISION & VALUES SECTION               */
/* ========================================= */
#values {
    background-color: var(--bg-surface-alt);
    position: relative;
    /* Diagonal Section Cut */
    clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 95%);
    padding: 150px 0;
}

.vision-box {
    background-color: var(--bg-surface);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin-bottom: 20px;
    border-left: 4px solid var(--clr-primary);
    transition: var(--transition);
}

.vision-box:hover {
    border-left-color: var(--clr-accent);
    transform: translateX(10px);
}

/* Feature Boxes (Why Choose Us) */
/* Feature Boxes (Why Choose Us) */
.feature-box {
    background: var(--bg-surface);
    padding: 50px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
    /* Removed background-color change to keep text visible */
    border-bottom: 5px solid var(--clr-primary);
}

.feature-box i {
    color: var(--clr-accent);
    font-size: 3rem;
    margin-bottom: 25px;
    transition: var(--transition);
}

.feature-box:hover i {
    transform: scale(1.1);
    color: var(--clr-primary);
}

.feature-box h4 {
    color: var(--clr-primary);
}

.feature-box p {
    color: var(--text-body);
}

/* ========================================= */
/* 8. WORK SHOWCASE (3D CAROUSEL)           */
/* ========================================= */
#works {
    background-color: var(--bg-body);
}

.project-carousel-container {
    padding: 0 0 50px;
}

.project-carousel .carousel-item {
    height: 600px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-hover);
}

.project-carousel .carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-carousel .carousel-item:hover img {
    transform: scale(1.1);
}

.project-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(to top, rgba(16, 42, 67, 0.95), transparent);
    color: #ffffff;
    display: flex;
    align-items: flex-end;
}

.project-caption h3 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 8px;
    border-left: 4px solid var(--clr-accent);
    padding-left: 15px;
}

.project-caption p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    padding-left: 19px;
}

/* Carousel Indicators & Controls */
.carousel-indicators [data-bs-target] {
    background-color: var(--clr-primary);
    height: 4px;
    border-radius: 2px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--clr-primary);
    border-radius: 50%;
    padding: 25px;
    background-size: 20px;
}

/* ========================================= */
/* 9. CONTACT SECTION                       */
/* ========================================= */
#contact {
    background-color: var(--bg-body);
}

.contact-card {
    background: var(--bg-surface);
    padding: 50px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    border-bottom: 4px solid var(--clr-accent);
}

.contact-card i {
    color: var(--clr-primary);
    background: rgba(16, 42, 67, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 20px;
}

.contact-name {
    font-weight: 700;
    color: var(--clr-primary);
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.contact-number {
    color: var(--clr-accent);
    font-weight: 600;
    font-size: 1.2rem;
}

.contact-img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    object-position: top;
    border-radius: 50%;
    margin-bottom: 25px;
    background-color: #e0e0e0;
    /* Grey background */
    border: 3px solid rgba(16, 42, 67, 0.1);
}

.contact-form-wrapper {
    background-color: var(--bg-surface);
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    border-top: 5px solid var(--clr-primary);
}

.form-control {
    background-color: var(--bg-body);
    border: 1px solid transparent;
    padding: 18px;
    border-radius: var(--radius-sm);
    color: #000;
}

.form-control:focus {
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(16, 42, 67, 0.1);
    border-color: var(--clr-primary);
}

/* ========================================= */
/* 10. FOOTER                               */
/* ========================================= */
footer {
    background-color: var(--bg-footer);
    color: var(--text-light);
    padding: 80px 0 40px;
    text-align: center;
    position: relative;
    clip-path: polygon(0 15%, 100% 0, 100% 100%, 0% 100%);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.footer-text {
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto 30px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 8px;
    color: #ffffff;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--clr-accent);
    transform: rotate(360deg);
}

.footer-bottom {
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.5;
}

/* ========================================= */
/* 11. RESPONSIVE MEDIA QUERIES             */
/* ========================================= */
@media (max-width: 991px) {
    .section-title h2 {
        font-size: 2.25rem;
    }

    .hero-caption h1 {
        font-size: 3rem;
    }

    .project-carousel .carousel-item {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 0;
    }

    .btn-primary-custom {
        padding: 12px 25px;
    }

    .competency-card,
    .feature-box {
        margin-bottom: 20px;
    }

    #values {
        clip-path: none;
        padding-top: 80px;
    }

    footer {
        clip-path: none;
        padding-top: 60px;
    }
}

/* ========================================= */
/* PRELOADER STYLES                         */
/* ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--clr-primary);
    /* Deep Navy Background */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opactiy 0.8s ease-out, visibility 0.8s ease-out;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Spinner Circle */
.loader-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--clr-accent);
    /* Gold/Bronze */
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.loader-circle:before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 3px solid transparent;
    border-top-color: var(--text-light);
    /* Platinum/White */
    border-radius: 50%;
    animation: spin 2.5s linear infinite;
}

.loader-circle:after {
    content: '';
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 24px;
    border: 3px solid transparent;
    border-top-color: var(--clr-primary-light);
    /* Light Navy */
    border-radius: 50%;
    animation: spin 3.5s linear infinite;
}

/* Logo Text Animation */
.loader-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-light);
    letter-spacing: 1px;
    animation: pulse 2s ease-in-out infinite;
    z-index: 2;
    text-align: center;
    line-height: 1.3;
}

.loader-logo span {
    color: var(--clr-accent);
}

/* Loading Line */
.loader-line-mask {
    position: absolute;
    bottom: -30px;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-line {
    width: 0%;
    height: 100%;
    background: var(--clr-accent);
    animation: loadingLine 2.5s ease-in-out infinite;
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes loadingLine {
    0% {
        width: 0%;
        transform: translateX(0);
    }

    50% {
        width: 100%;
        transform: translateX(0);
    }

    100% {
        width: 0%;
        transform: translateX(100%);
    }
}

/* Client Logos */
.client-logo {
    max-height: 50px;
    width: auto;
    max-width: 100%;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.client-box:hover .client-logo {
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Logo Optimization */
.nav-logo {
    /* Filter to convert any color (specifically white/black) to Theme Navy #102a43 */
    filter: brightness(0) saturate(100%) invert(13%) sepia(35%) saturate(967%) hue-rotate(169deg) brightness(96%) contrast(96%);
    transition: var(--transition);
}

.nav-logo:hover {
    /* Filter for Theme Accent (Gold/Bronze) on hover */
    filter: brightness(0) saturate(100%) invert(48%) sepia(97%) saturate(1353%) hue-rotate(2deg) brightness(96%) contrast(92%);
    transform: scale(1.02);
}

/* ========================================= */
/* MOBILE OPTIMIZATIONS (Max-width: 576px) */
/* ========================================= */
@media (max-width: 576px) {

    /* Tighter Spacing */
    .section-padding {
        padding: 40px 0;
    }

    /* Typography Scaling */
    .section-title h2 {
        font-size: 1.75rem;
    }

    .hero-caption h1 {
        font-size: 2rem;
    }

    .hero-caption p {
        font-size: 1rem;
    }

    /* Navbar Adjustments */
    .navbar-brand img {
        height: 50px !important;
    }

    .navbar-collapse {
        background: #fff;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
    }

    .nav-link {
        padding: 10px 0;
        text-align: center;
    }

    .btn-primary-custom {
        width: 100%;
        display: block;
        text-align: center;
        margin-top: 10px;
    }

    /* Component Adjustments */
    .project-carousel .carousel-item {
        height: 300px;
    }

    .feature-box {
        padding: 20px !important;
    }

    footer {
        text-align: center;
    }
}

/* STRICT OVERFLOW FIX */
html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Vision Carousel Styles */
.vision-indicators {
    position: static;
    /* Position relative to flow, not absolute bottom */
    margin: 0 0 20px 0;
}

.vision-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-body);
    opacity: 0.3;
    border: none;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.vision-indicators .active {
    background-color: var(--clr-accent);
    opacity: 1;
    transform: scale(1.2);
}

/* Vision Cards */
.bg-primary-soft {
    background-color: rgba(10, 25, 47, 0.1);
}

.bg-accent-soft {
    background-color: rgba(212, 175, 55, 0.1);
}

.hover-lift-lg {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift-lg:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important;
}

.text-xs {
    font-size: 0.75rem;
}

/* Force Cards to maintain White/Dark aesthetic even when Body goes Dark Mode */
.card {
    background-color: #ffffff !important;
    color: #334e68 !important;
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card .card-title {
    color: #102a43 !important;
}

.card p,
.card .card-text {
    color: #486581 !important;
}

/* Force Navbar Text to stay Dark (don't invert on scroll) */
.navbar-brand,
.nav-link {
    color: #102a43 !important;
    /* Always Deep Navy */
}

.nav-link:hover {
    color: #0044cc !important;
    /* Royal Blue on Hover */
}

/* Added Utilities */
.bg-surface {
    background-color: var(--bg-surface) !important;
}

.bg-surface-alt {
    background-color: var(--bg-surface-alt) !important;
}