/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #1e90ff;
    --primary-dark: #1873cc;
    --primary-light: #4da6ff;
    --secondary-color: #0d6efd;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(30, 144, 255, 0.1);
    --shadow-hover: 0 5px 25px rgba(30, 144, 255, 0.2);
}

/* ===== GENERAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

.material-icons {
    vertical-align: middle;
    font-size: 24px;
}

/* ===== DESKTOP NAVBAR ===== */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand .material-icons {
    font-size: 32px;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    color: var(--text-dark) !important;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

.navbar-nav .nav-link .material-icons {
    font-size: 20px;
}

/* Hide sidebar toggle on desktop */
.sidebar-toggle {
    display: none;
}

/* ===== SIDEBAR NAVIGATION (MOBILE) ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header .navbar-brand {
    margin: 0;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.sidebar-nav {
    list-style: none;
    padding: 1rem;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.5rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-dark) !important;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

.sidebar-nav .nav-link .material-icons {
    font-size: 24px;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== HERO SECTION ===== */
.hero-section {
    padding-top: 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
    position: relative;
}

.hero-content h1 {
    color: var(--text-dark);
}

.highlight {
    color: var(--primary-color);
    display: block;
}

.hero-buttons .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.875rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-buttons .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero-buttons .btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    padding: 0.875rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-buttons .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.hero-stats .stat-item h3 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-stats .stat-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.hero-illustration {
    position: relative;
    padding: 2rem;
}

.hero-illustration img {
    max-width: 100%;
    height: auto;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.tech-icons {
    position: relative;
}

.tech-icon {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.tech-icon img {
    width: 50px;
    height: 50px;
}

.tech-icon-1 {
    top: 20%;
    left: 10%;
    animation: float-1 4s ease-in-out infinite;
}

.tech-icon-2 {
    top: 50%;
    right: 15%;
    animation: float-2 5s ease-in-out infinite;
}

.tech-icon-3 {
    bottom: 15%;
    left: 20%;
    animation: float-3 4.5s ease-in-out infinite;
}

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, -15px) rotate(5deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-15px, 10px) rotate(-5deg); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(12px, 12px) rotate(3deg); }
}

.rotating {
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scroll-indicator .material-icons {
    font-size: 48px;
    color: var(--primary-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-15px); }
    60% { transform: translateX(-50%) translateY(-7px); }
}

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-delay {
    animation: fadeIn 1s ease-in 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s both;
}

.fade-in-delay-3 {
    animation: fadeIn 1s ease-in 0.9s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SERVICES SECTION ===== */
#services-preview {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon .material-icons {
    font-size: 40px;
    color: var(--white);
}

.service-card h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}

.footer h5 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer ul {
    padding: 0;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer ul li a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    color: var(--white);
}

.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 991px) {
    /* Show sidebar toggle button */
    .sidebar-toggle {
        display: block;
        border: none;
        background: none;
        padding: 0.5rem;
    }

    /* Hide desktop navbar menu */
    .navbar-collapse {
        display: none !important;
    }

    .navbar-brand {
        margin: 0 auto;
    }

    .hero-section {
        padding-top: 100px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    /* Make tech icons smaller and reposition for mobile */
    .tech-icon {
        width: 60px;
        height: 60px;
    }

    .tech-icon img {
        width: 35px;
        height: 35px;
    }

    .tech-icon-1 {
        top: 10%;
        left: 5%;
    }

    .tech-icon-2 {
        top: 40%;
        right: 5%;
    }

    .tech-icon-3 {
        bottom: 10%;
        left: 15%;
    }

    .hero-illustration {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .hero-stats .stat-item h3 {
        font-size: 2rem;
    }

    .hero-stats .stat-item p {
        font-size: 0.8rem;
    }

    .service-card {
        margin-bottom: 1rem;
    }

    .footer {
        text-align: center;
    }

    .footer .social-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }

    .hero-buttons .btn.me-3 {
        margin-right: 0 !important;
    }

    .sidebar {
        width: 260px;
        left: -260px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .hero-content .lead {
        font-size: 1rem;
    }

    .hero-stats .stat-item h3 {
        font-size: 1.75rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon .material-icons {
        font-size: 30px;
    }

    .service-card h4 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    /* Further adjust tech icons for very small screens */
    .tech-icon {
        width: 50px;
        height: 50px;
    }

    .tech-icon img {
        width: 30px;
        height: 30px;
    }

    .tech-icon-1 {
        top: 5%;
        left: 2%;
    }

    .tech-icon-2 {
        top: 35%;
        right: 2%;
    }

    .tech-icon-3 {
        bottom: 8%;
        left: 10%;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* ===== SMOOTH TRANSITIONS ===== */
a, button, .btn {
    transition: all 0.3s ease;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}