/* Google Fonts Imported in Header */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --secondary-color: #64748b;
    --accent-color: #0d9488;
    --text-color: #0f172a;
    --light-bg: #f8fafc;
    --dark-bg: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    background: linear-gradient(-45deg, #fdfdfd 0%, #f1f5f9 25%, #fdfdfd 50%, #eff6ff 75%, #fdfdfd 100%);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Custom Navbar (Glassmorphism) */
.custom-navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    padding: 15px 0;
}

.custom-navbar.scrolled {
    padding: 10px 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.navbar-brand span {
    font-weight: 800;
    color: rgba(13, 110, 253, 1) !important;
}

.nav-link {
    font-weight: 500;
    color: #4a4a4a !important;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Primary Custom Button */
.custom-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    border: none;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white !important;
}

.custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
}

.mt-custom {
    margin-top: 80px;
}

/* Service / Feature Cards */
.feature-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05), rgba(0, 210, 255, 0.05));
    transition: all 0.4s ease;
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(13, 110, 253, 0.2);
}

.feature-card:hover::before {
    height: 100%;
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.feature-card:hover .icon-box {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* Gradient Texts */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer styling */
.footer {
    background-color: var(--light-bg);
}

.social-btn {
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.social-btn:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-3px);
}

/* Hero Section */
.hero-section {
    padding: 100px 0 60px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(13, 148, 136, 0.08) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.floating-img {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Section Padding */
.py-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Image wrappers */
.img-wrapper {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.3s ease;
}

.img-wrapper img {
    transition: transform 0.5s ease;
    width: 100%;
}

.img-wrapper:hover img {
    transform: scale(1.05);
}

.project-card {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 110, 253, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    color: white;
    text-align: center;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Contact Map */
.contact-map {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 400px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Page Header */
.page-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(255, 255, 255, 1) 100%);
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
}

/* Footer Updates */
.bg-darker {
    background-color: #15181c;
}

.footer-link:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.transition {
    transition: all 0.3s ease;
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

.footer {
    background-color: var(--dark-bg);
}

.footer .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.footer .btn-outline-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer form .form-control:focus {
    background-color: #212529 !important;
    color: #fff;
    border-color: var(--primary-color) !important;
}

/* Timeline */
.timeline {
    border-left: 2px solid var(--primary-color);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(13, 110, 253, 1);
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

/* Premium Footer Styling */
.footer-heading {
    color: rgba(13, 110, 253, 1) !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 1.1rem;
}

.footer-link {
    text-decoration: none;
    transition: transform 0.3s ease;
    display: inline-block;
    font-weight: 500;
}

.footer-link:hover {
    color: rgba(13, 110, 253, 1) !important;
    transform: translateX(5px);
}

.footer-contact-icon {
    width: 35px;
    height: 35px;
    background: rgba(13, 110, 253, 0.1);
    color: rgba(13, 110, 253, 1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-contact-icon:hover {
    background: rgba(13, 110, 253, 1);
    color: white;
    transform: scale(1.1);
}

@media (max-width: 767.98px) {
    .timeline {
        border-left: none;
        padding-left: 0 !important;
    }

    .timeline-item::before {
        display: none;
    }
}

/* Utilities */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.object-fit-cover {
    object-fit: cover;
}

.opacity-0 {
    opacity: 0;
}

.z-index-1 {
    z-index: 1;
}

.project-card:hover .opacity-0 {
    opacity: 1;
}

/* Animations and Slider */
.tech-slider {
    width: 100%;
    margin: auto;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.tech-slide-track {
    display: flex;
    width: calc(150px * 14);
    animation: scrollTech 25s linear infinite;
    align-items: center;
}

.tech-slide-track i {
    text-align: center;
    color: #2b3035;
    transition: transform 0.3s ease, color 0.3s ease;
}

.tech-slide-track i:hover {
    transform: scale(1.2);
    color: var(--primary-color);
}

@keyframes scrollTech {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-150px * 7));
    }
}

.bg-primary-dark {
    background-color: #0d1b2a !important;
}

.bg-primary-darker {
    background-color: #1e1b4b !important;
}

.premium-light-gradient {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
}

/* Responsive Classes & Base Fixes */
.history-img {
    height: 400px;
    object-fit: cover;
    width: 100%;
}
.contact-map-responsive {
    height: 450px;
}
html, body {
    overflow-x: hidden;
}

/* Large Displays (>= 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Laptops / Small Desktops */
@media (max-width: 1199.98px) {
    .display-4 { font-size: 3rem !important; }
    .display-5 { font-size: 2.2rem !important; }
    .history-img { height: 350px; }
}

/* Tablets & Small Laptops */
@media (max-width: 991.98px) {
    .py-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
    .hero-section { padding: 120px 0 50px; text-align: center; }
    .hero-section .text-start { text-align: center !important; }
    .hero-section .d-flex.gap-3 { justify-content: center; flex-wrap: wrap; }
    .page-header { padding: 100px 0 40px; }
    
    .navbar-brand img { width: 35px !important; height: 35px !important; }
    .navbar-brand { font-size: 1.2rem !important; }
    .brand-subtitle { font-size: 0.9rem !important; }
    
    .navbar-collapse {
        background: white; padding: 1rem; border-radius: 10px;
        box-shadow: var(--shadow-md); margin-top: 15px;
    }
    
    .display-4 { font-size: 2.5rem !important; }
    .display-5 { font-size: 1.8rem !important; }
    .history-img { height: 300px; }
    .contact-map-responsive { height: 350px; }
}

/* Mobile Devices */
@media (max-width: 767.98px) {
    .timeline { border-left: none; padding-left: 0 !important; }
    .timeline-item::before { display: none; }
    .footer { text-align: center !important; }
    .footer .social-icons { justify-content: center !important; }
    .footer .d-flex { justify-content: center !important; flex-wrap: wrap; }
    .footer .text-start { text-align: center !important; }
    .history-img { height: 250px; }
    .contact-map-responsive { height: 300px; }
    
    .py-section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .project-card img { height: 220px; }
}

/* Deep Mobile Optimization */
@media (max-width: 575.98px) {
    .navbar-brand { max-width: 85%; }
    .navbar-brand span {
        font-size: 0.95rem !important;
        white-space: normal;
        line-height: 1.2;
    }
    .navbar-brand img {
        width: 32px !important;
        height: 32px !important;
    }
    .brand-subtitle { font-size: 1rem !important; white-space: normal !important; line-height: 1.1; }
    .hero-section::after { display: none !important; }
    .display-4 { font-size: 2rem !important; word-wrap: break-word; }
    .display-5 { font-size: 1.6rem !important; word-wrap: break-word; }
    .img-wrapper img { height: auto !important; max-height: 250px; }
    .mb-5 { margin-bottom: 2rem !important; }
    .g-5 { --bs-gutter-y: 1.5rem; --bs-gutter-x: 0; padding-left: 0.75rem; padding-right: 0.75rem; }
    .pb-5 { padding-bottom: 1.5rem !important; }
    .pt-5 { padding-top: 1.5rem !important; }
}

/* Small Mobile (<= 400px) */
@media (max-width: 400px) {
    .display-4 { font-size: 1.6rem !important; }
    .display-5 { font-size: 1.4rem !important; }
    .display-6 { font-size: 1.2rem !important; }
    .btn { padding: 8px 16px !important; font-size: 0.9rem !important; }
    .custom-btn { padding: 8px 20px !important; }
    .history-img { height: 200px; }
    .contact-map-responsive { height: 250px; }
    .icon-box { width: 45px !important; height: 45px !important; font-size: 20px !important; }
    .p-5 { padding: 1.5rem !important; }
    .h1, h1 { font-size: 1.8rem; }
    .h2, h2 { font-size: 1.5rem; }
}