/* 
 * Insource Ai - Consolidated Stylesheet
 * Combines Bootstrap utilities, AOS animations, and custom styles
 * Only includes what's actually used on the site
 */

/* ==========================================================================
   CSS Variables (Brand Colors)
   ========================================================================== */
:root {
    --color-primary: #005f90;
    --color-primary-light: #87afd1;
    --color-accent: #f05c2a;
    --color-dark: #012d43;
    --color-light: #b9d5e6;
    --color-white: #fff;
    --color-text: #444444;
    --font-primary: "Open Sans", sans-serif;
    --font-heading: "Jost", sans-serif;
}

/* ==========================================================================
   Reset & Base (from Bootstrap)
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--color-dark);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-light);
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

img, video {
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Bootstrap Grid (minimal)
   ========================================================================== */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.row > * {
    padding-right: 15px;
    padding-left: 15px;
}

.col-lg-6 {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 992px) {
    .col-lg-6 { width: 50%; }
}

/* ==========================================================================
   Bootstrap Utilities (only what's used)
   ========================================================================== */
.d-flex { display: flex; }
.d-none { display: none; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }

.fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

.pt-4 { padding-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }

@media (min-width: 992px) {
    .pt-lg-0 { padding-top: 0; }
    .order-lg-1 { order: 1; }
    .order-lg-2 { order: 2; }
}

.order-1 { order: 1; }
.order-2 { order: 2; }

/* ==========================================================================
   AOS Animations (only fade-up and zoom-in with delay 200)
   ========================================================================== */
[data-aos] {
    transition-property: opacity, transform;
    transition-duration: 0.4s;
    transition-timing-function: ease;
}

[data-aos][data-aos-delay="200"] {
    transition-delay: 0;
}

[data-aos][data-aos-delay="200"].aos-animate {
    transition-delay: 0.2s;
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translate3d(0, 50px, 0);
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

[data-aos="zoom-in"] {
    opacity: 0;
    transform: scale(0.8);
}

[data-aos="zoom-in"].aos-animate {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   Preloader
   ========================================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    overflow: hidden;
    background: var(--color-primary);
    transition: opacity 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    pointer-events: none;
}

#preloader:before {
    content: "";
    position: fixed;
    top: calc(50% - 30px);
    left: calc(50% - 30px);
    border: 6px solid var(--color-primary);
    border-top-color: var(--color-white);
    border-bottom-color: var(--color-white);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   Header
   ========================================================================== */
#header {
    transition: all 0.5s;
    z-index: 997;
    padding: 15px 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-dark);
}

#header .logo {
    font-size: 35px;
    margin: 0;
    padding: 0;
    line-height: 1;
    font-weight: 500;
}

#header .logo a {
    color: var(--color-dark);
}

#header .logo .brand-name {
    color: var(--color-primary);
    font-weight: bold;
}

#header .logo .brand-dot {
    color: var(--color-primary-light);
}

#header .logo .brand-ai {
    color: var(--color-accent);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 90%;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    padding: 0;
}

.navbar ul {
    display: flex;
    align-items: center;
}

.navbar li {
    position: relative;
}

.navbar a,
.navbar a:focus {
    display: flex;
    align-items: center;
    padding: 10px 0 10px 30px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-dark);
    transition: 0.3s;
}

.navbar a:hover,
.navbar .active,
.navbar li:hover > a {
    color: #47b2e4;
}

.mobile-nav-toggle {
    color: var(--color-dark);
    font-size: 28px;
    cursor: pointer;
    display: none;
    line-height: 0;
    transition: 0.5s;
}

@media (max-width: 991px) {
    .mobile-nav-toggle {
        display: block;
    }

    .navbar {
        display: none;
    }

    .navbar.navbar-mobile {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-dark);
        padding: 15px;
    }

    .navbar.navbar-mobile ul {
        flex-direction: column;
        align-items: center;
    }

    .navbar.navbar-mobile a {
        padding: 10px 0;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
#hero {
    width: 100%;
    min-height: 100vh;
    background: var(--color-light);
    display: flex;
    align-items: center;
    padding: 120px 0 60px 0;
}

#hero .container {
    padding-top: 20px;
}

#hero .row {
    align-items: center;
}

#hero h1 {
    margin: 0 0 10px 0;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
}

#hero h1 .text-primary {
    color: var(--color-primary);
}

#hero h1 .text-accent {
    color: var(--color-accent);
}

#hero h2 {
    color: var(--color-white);
    margin-bottom: 50px;
    font-size: 22px;
    max-width: 90%;
    line-height: 1.5;
}

#hero .hero-img {
    text-align: right;
}

#hero video {
    max-width: 100%;
    border-radius: 8px;
}

@media (max-width: 991px) {
    #hero {
        text-align: center;
        padding: 140px 0 60px 0;
    }

    #hero .hero-img {
        text-align: center;
        margin-top: 40px;
    }

    #hero video {
        max-width: 80%;
    }

    #hero h2 {
        max-width: 100%;
        margin: 0 auto 30px auto;
    }
}

@media (max-width: 768px) {
    #hero h1 {
        font-size: 32px;
        line-height: 1.2;
    }

    #hero h2 {
        font-size: 18px;
    }

    #hero video {
        max-width: 90%;
    }
}

/* ==========================================================================
   Section Styles
   ========================================================================== */
section {
    padding: 0;
    overflow: hidden;
}

/* Unified container padding for all content pages */
.about .container,
.services .container,
.projects .container,
.contact .container {
    padding: 120px 5% 80px 5%;
}

/* Unified h2 styles for all content pages */
.about h2,
.services h2,
.projects h2,
.contact h2 {
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 30px 0;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.about h2 {
    color: var(--color-primary-light);
}

.about h3 {
    color: var(--color-primary-light);
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.about p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.about .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px 0;
}

.about .stat-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.about .stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent);
    display: block;
}

.about .stat-label {
    font-size: 1rem;
    color: var(--color-primary-light);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services {
    background-color: var(--color-primary-light);
}

.services h2 {
    color: var(--color-primary);
}

.services h3 {
    color: var(--color-primary);
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.services p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-dark);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects {
    background-color: var(--color-white);
}

.projects h2 {
    color: var(--color-primary);
}

.projects .section-subtitle {
    color: var(--color-text);
    font-size: 1.1rem;
    text-align: center;
    margin: -20px 0 50px 0;
}

.project-category {
    margin-bottom: 50px;
}

.project-category h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary-light);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    display: block;
    background: var(--color-white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--color-primary-light);
    color: inherit;
}

a.project-card {
    cursor: pointer;
}

div.project-card {
    cursor: default;
}

.project-card h4 {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.project-card .project-type {
    display: inline-block;
    background: var(--color-light);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.project-card p {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-card .project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-card .feature-tag {
    background: #f5f5f5;
    color: #666;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    background-color: var(--color-white);
}

.contact h2 {
    color: var(--color-primary);
}

.contact h3 {
    color: var(--color-primary-light);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.contact p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-primary);
}

.contact a {
    color: var(--color-primary);
}

.contact a:hover {
    color: var(--color-accent);
}

.contact .locations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.contact .location-item h4 {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.contact .location-item p {
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* ==========================================================================
   Footer (if needed)
   ========================================================================== */
footer {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

footer a {
    color: var(--color-primary-light);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .about .container,
    .services .container,
    .projects .container,
    .contact .container {
        padding: 100px 5% 60px 5%;
    }

    .about h2,
    .services h2,
    .projects h2,
    .contact h2 {
        font-size: 26px;
    }

    .about .stats {
        justify-content: center;
    }

    .about .stat-number {
        font-size: 2.5rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}
