/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
 
::-webkit-scrollbar-thumb {
    background: #b1b1b1; 
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ed1c24; 
}

/* Base styles tweak */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    /* font-family: 'Inter', sans-serif; Removed for Bootstrap default */
    color: #1f2937; /* gray-800 */
    background-color: #f9fafb; /* gray-50 */
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.active {
    max-height: 500px;
    opacity: 1;
    overflow-y: auto;
}

/* Mobile Submenu Toggle */
#mobileProjectsSub {
    display: none;
    transition: all 0.3s ease;
}

#mobileProjectsSub.show {
    display: block !important;
}

/* Animation Classes */
.anim-fade-up, 
.anim-slide-left, 
.anim-slide-right,
.anim-stat-item {
    opacity: 0;
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.anim-fade-up {
    transform: translateY(30px);
}

.anim-slide-right {
    transform: translateX(-20px);
}

.anim-slide-left {
    transform: translateX(20px);
}

.anim-stat-item {
    transform: translateY(20px);
}

.is-visible {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

/* --- BOOTSTRAP OVERRIDES & TAILWIND REPLACEMENTS --- */

:root {
    --sir-red: #ed1c24;
    --sir-blue: #2e3192;
    --sir-dark: #1a1c52;
    --sir-light: #f5f6fa;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

a {
    text-decoration: none;
}

/* Colors */
.text-sir-red { color: var(--sir-red) !important; }
.bg-sir-red { background-color: var(--sir-red) !important; }
.text-sir-blue { color: var(--sir-blue) !important; }
.bg-sir-blue { background-color: var(--sir-blue) !important; }
.text-sir-dark { color: var(--sir-dark) !important; }
.bg-sir-dark { background-color: var(--sir-dark) !important; }
.bg-sir-light { background-color: var(--sir-light) !important; }

.bg-gray-50 { background-color: var(--gray-50) !important; }
.bg-gray-100 { background-color: var(--gray-100) !important; }
.bg-gray-900 { background-color: var(--gray-900) !important; }

.text-gray-300 { color: #d1d5db !important; }
.text-gray-400 { color: #9ca3af !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-gray-600 { color: #4b5563 !important; }
.text-gray-800 { color: #1f2937 !important; }
.text-gray-900 { color: #111827 !important; }

/* Font Sizes (Approximate Tailwind equivalents) */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }

/* Font Weight */
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }

/* Spacing & Sizes */
.h-20 { height: 5rem; }
.w-20 { width: 5rem; }
.w-40 { width: 10rem; }
.h-40 { height: 10rem; }
.h-16 { height: 4rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.min-h-screen { min-height: 100vh; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Border Radius */
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-3xl { border-radius: 1.5rem !important; }
.rounded-full { border-radius: 9999px !important; }

/* Effects */
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.opacity-10 { opacity: 0.1; }
.opacity-20 { opacity: 0.2; }
.opacity-30 { opacity: 0.3; }
.opacity-60 { opacity: 0.6; }
.opacity-90 { opacity: 0.9; }

/* Transitions & Transforms */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

.hover-translate-y-05:hover { transform: translateY(-0.125rem); }
.hover-translate-y-1:hover { transform: translateY(-0.25rem); }
.hover-translate-y-2:hover { transform: translateY(-0.5rem); }
.group:hover .group-hover-scale-105 { transform: scale(1.05); }
.group:hover .group-hover-scale-110 { transform: scale(1.10); }

/* Gradients used in index.html */
.bg-gradient-hero {
    background: linear-gradient(to bottom right, #f9fafb, #ffffff);
}
.bg-gradient-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

/* Custom Object fit */
.object-cover { object-fit: cover; }

/* Custom Hover Effects */
.hover-shadow-red:hover { box-shadow: 0 10px 15px -3px rgba(237, 28, 36, 0.3), 0 4px 6px -2px rgba(237, 28, 36, 0.1); }
.hover-shadow-blue:hover { box-shadow: 0 10px 15px -3px rgba(46, 49, 146, 0.3), 0 4px 6px -2px rgba(46, 49, 146, 0.1); }

/* Line Clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Nav Specific */
.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--sir-red);
    transition: all 0.3s;
}

/* Transform Utilities that might be missing */
.translate-x-1-4 { transform: translateX(25%); }
.-translate-x-1-4 { transform: translateX(-25%); }
.skew-x-12 { transform: skewX(12deg); }
.-skew-x-12 { transform: skewX(-12deg); }

/* Z-Index */
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Overwrite Bootstrap Container Padding if needed */
.container {
    padding-left: 1.5rem; /* px-6 equivalent */
    padding-right: 1.5rem;
}

/* Blur */
.blur-3xl { filter: blur(64px); }
.blur-2xl { filter: blur(40px); }

/* Grid Cols */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* However, we will try to use bootstrap grid classes (row-cols) where possible */

/* Tracking */
.tracking-wider { letter-spacing: 0.05em; }
.tracking-wide { letter-spacing: 0.025em; }

/* Alpha Colors */
.bg-white-90 { background-color: rgba(255, 255, 255, 0.9); }
.bg-white-95 { background-color: rgba(255, 255, 255, 0.95); }
.bg-white-5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white-10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-sir-blue-5 { background-color: rgba(46, 49, 146, 0.05); }
.bg-sir-blue-10 { background-color: rgba(46, 49, 146, 0.1); }
.bg-sir-blue-60 { background-color: rgba(46, 49, 146, 0.6); }
.bg-sir-blue-40 { background-color: rgba(46, 49, 146, 0.4); }
.bg-sir-red-5 { background-color: rgba(237, 28, 36, 0.05); }
.bg-sir-red-10 { background-color: rgba(237, 28, 36, 0.1); }
.bg-sir-red-60 { background-color: rgba(237, 28, 36, 0.6); }
.bg-sir-red-40 { background-color: rgba(237, 28, 36, 0.4); }
.bg-gray-800-60 { background-color: rgba(31, 41, 55, 0.6); }
.bg-gray-800-40 { background-color: rgba(31, 41, 55, 0.4); }

/* Border Opacity */
.border-sir-blue-10 { border-color: rgba(46, 49, 146, 0.1) !important; }
.border-sir-blue-20 { border-color: rgba(46, 49, 146, 0.2) !important; }
.border-white-10 { border-color: rgba(255, 255, 255, 0.1) !important; }

/* Divide */
.divide-x > * + * { border-left-width: 1px; border-left-style: solid; }
.divide-white-10 > * + * { border-color: rgba(255, 255, 255, 0.1); }

/* Gradient Directions */
.bg-gradient-to-br { background: linear-gradient(to bottom right, var(--gray-50), #ffffff); }
.bg-gradient-to-tr { background: linear-gradient(to top right, var(--sir-blue), var(--sir-red)); }
.bg-gradient-to-t { background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); }




/* Helper classes for JS injected content (References) */
.grayscale { filter: grayscale(100%); }
.hover-grayscale-0:hover { filter: grayscale(0%); }
.opacity-70 { opacity: 0.7; }
.hover-opacity-100:hover { opacity: 1; }
.max-h-full { max-height: 100%; }
.max-w-full { max-width: 100%; }
.h-32 { height: 8rem; }

/* ========================================
   PRELOADER STYLES
======================================== */
#preloader {
    pointer-events: all;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

.preloader-dot {
    width: 10px;
    height: 10px;
    background-color: var(--sir-blue);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.preloader-dot:nth-child(1) { animation-delay: 0s; }
.preloader-dot:nth-child(2) { animation-delay: 0.2s; background-color: var(--sir-red); }
.preloader-dot:nth-child(3) { animation-delay: 0.4s; }

/* ========================================
   SCROLL TO TOP BUTTON
======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--sir-blue) 0%, var(--sir-dark) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 49, 146, 0.3);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, var(--sir-red) 0%, #b91c1c 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(237, 28, 36, 0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
}

/* ========================================
   PAGE TRANSITION ANIMATION
======================================== */
.page-transition {
    animation: fadeInUp 0.6s ease-out;
}

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

/* ========================================
   MOBILE RESPONSIVE ADJUSTMENTS
======================================== */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* ========================================
   TIMELINE STYLES
======================================== */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--sir-blue) 0%, var(--sir-red) 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 50%;
    padding: 0 40px;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--sir-blue);
    border-radius: 50%;
    z-index: 10;
    transition: all 0.3s ease;
}

.timeline-item:nth-child(odd)::before {
    right: -10px;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
}

.timeline-item:nth-child(even)::before {
    border-color: var(--sir-red);
}

.timeline-item:hover::before {
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(46, 49, 146, 0.4);
}

.timeline-item:nth-child(even):hover::before {
    box-shadow: 0 0 20px rgba(237, 28, 36, 0.4);
}

.timeline-content {
    background: white;
    padding: 25px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: white;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: white;
}

.timeline-year {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.timeline-item:nth-child(odd) .timeline-year {
    background: linear-gradient(135deg, var(--sir-blue) 0%, #1a4d8c 100%);
    color: white;
}

.timeline-item:nth-child(even) .timeline-year {
    background: linear-gradient(135deg, var(--sir-red) 0%, #b91c1c 100%);
    color: white;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.timeline-desc {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}


/* Timeline Mobile Responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 60px;
        padding-right: 20px;
    }

    .timeline-item::before {
        left: 10px !important;
        right: auto !important;
    }

    .timeline-content::before {
        left: -20px !important;
        right: auto !important;
        border-left-color: transparent !important;
        border-right-color: white !important;
    }
}

