/* Global Styles */
:root {
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 70px;
    --primary-color: #2563eb; /* Professional blue */
    --secondary-color: #64748b; /* Slate gray */
    --accent-color: #10b981; /* Green accent */
    --green-accent: #059669; /* Darker green */
    --green-light: #d1fae5; /* Light green background */
    --background-color: #f8fafc; /* Light gray background */
    --surface-color: #ffffff; /* Pure white cards */
    --text-color: #1e293b; /* Dark slate text */
    --muted-text-color: #64748b; /* Muted slate text */
    --border-color: #e2e8f0; /* Light border */
    --transition-speed: 0.3s;
}

body {
    background: var(--background-color);
    color: var(--text-color);
    transition: margin-left var(--transition-speed) ease;
    overflow-x: hidden;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1040;
    border: none;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.sidebar-toggle:hover {
    background: #1d4ed8;
    transform: scale(1.1);
}

/* Mobile Sidebar Toggle */
.mobile-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1060; /* Higher than sidebar */
    display: none;
    border: none;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.mobile-toggle:hover {
    background: #1d4ed8;
    transform: scale(1.1);
}

/* Layout & Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    z-index: 1050;
    transition: transform var(--transition-speed) ease;
    overflow-x: hidden;
    white-space: nowrap;
    transform: translateX(-100%); /* Change default state for mobile */
    background: var(--surface-color);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-right: 1.5px solid var(--border-color);
    color: var(--text-color);
}

.content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem;
    transition: all var(--transition-speed) ease;
}

/* Sidebar Collapse State */
.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

.sidebar-collapsed .content {
    margin-left: 0;
}

.nav-link {
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
    font-size: 0.95rem;
    background: transparent;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
}

.nav-link i {
    font-size: 1.1rem;
    min-width: 1.5rem;
}

.nav-text {
    margin-left: 0.25rem;
    font-size: 0.95rem;
}

/* Hero Section */
.hero {
    padding-top: 1.5rem !important;
    padding-bottom: 3.5rem !important;
    background: var(--surface-color);
    position: relative;
    overflow: hidden;
    margin-top: 0 !important;
}

/* Enhanced mobile hero background */
@media (max-width: 768px) {
    .hero {
        background: var(--surface-color);
        min-height: 80vh;
        display: flex;
        align-items: center;
        position: relative;
    }
    
    .hero .container {
        position: relative;
        z-index: 1;
    }
    
    .hero .col-lg-6:first-child {
        text-align: center;
        margin-bottom: 3rem;
    }
    
    .hero .col-lg-6:last-child {
        order: -1;
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .hero dotlottie-player {
        max-width: 300px !important;
        height: 250px !important;
        margin: 0 auto;
    }
}

/* Add decorative shapes for mobile hero */
@media (max-width: 768px) {
    .hero .container::before {
        content: '';
        position: absolute;
        width: 40px;
        height: 40px;
        background: var(--accent-color);
        border-radius: 50%;
        opacity: 0.15;
        top: 15%;
        right: 5%;
        animation: float 4s ease-in-out infinite;
        z-index: 0;
    }
    
    .hero .container::after {
        content: '';
        position: absolute;
        width: 25px;
        height: 25px;
        background: var(--primary-color);
        border-radius: 50%;
        opacity: 0.2;
        bottom: 20%;
        left: 8%;
        animation: float 5s ease-in-out infinite reverse;
        z-index: 0;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(120deg); }
    66% { transform: translateY(-8px) rotate(240deg); }
}

.hero .shape {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.05);
    z-index: 0;
}

/* Sections */
section {
    padding: 6rem 0;
    position: relative;
}

section:nth-child(even) {
    background-color: #ffffff;
}

section#home {
    padding-top: 0 !important;
}

/* Work Section */
.work-card {
    border: none;
    border-radius: 1rem;
    overflow: visible;
    transition: all var(--transition-speed) ease;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.work-card img {
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.work-card .btn {
    flex: 1;
    white-space: nowrap;
    border-radius: 0.5rem;
}

.service-card {
    padding: 2rem;
    border-radius: 1rem;
    background: var(--surface-color);
    transition: all var(--transition-speed) ease;
    border: none;
    height: 100%;
    min-height: 280px; /* Set minimum height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.service-card i {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.service-card h4 {
    margin-bottom: 1rem;
}

.service-card p {
    /* Show all text, no truncation */
    display: block;
    overflow: visible;
    text-overflow: unset;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
    max-width: none;
    margin: 0 auto;
    white-space: normal;
}

.service-card:hover {
    /* Remove drop shadow, add green border */
    box-shadow: none;
    border: 2px solid var(--accent-color);
    background: var(--green-light);
}

@media (max-width: 768px) {
    .service-card {
        min-height: 240px; /* Slightly smaller on mobile */
    }
}

/* Make Services section icons green */
#services .service-card i,
#services i.fas,
#services i.fa-laptop-code,
#services i.fa-paint-brush {
    color: var(--accent-color) !important;
}

/* Skills Section */
.skill-item {
    text-align: center;
    padding: 1.5rem;
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    display: inline-block;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

/* Remove skill icon spin animation */
.skill-item.spin-animation > i.skill-icon,
.skill-item.spin-animation .skill-icon,
.skill-item:hover .skill-icon {
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

@keyframes spinIcon {}
@keyframes smoothSpin {}

/* Explicitly prevent ANY animation on text */
.skill-item h5,
.skill-item p,
.skill-item span {
    transform: none !important;
    animation: none !important;
    transition: none !important;
    backface-visibility: visible !important;
    will-change: auto !important;
    perspective: none !important;
}

/* Remove ALL transforms from skill-item container */
.skill-item {
    transform: none !important;
    backface-visibility: visible !important;
    perspective: none !important;
    will-change: auto !important;
}

/* Testimonials Section */
.testimonial-card {
    background: var(--surface-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: none;
    transition: all var(--transition-speed) ease;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card:hover {
    /* Remove drop shadow, add border */
    box-shadow: none;
    border: 2px solid var(--primary-color);
    transform: translateY(-5px);
}

/* Contact Section */
.contact-form {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: none !important;
    border: 2px solid var(--border-color);
}

.form-control {
    padding: 0.8rem;
    border-radius: 0.5rem;
    background: var(--surface-color);
    color: var(--text-color);
    border: 1.5px solid var(--border-color);
}

.form-control:focus {
    box-shadow: 0 0 0 0.15rem var(--primary-color, #a277ff);
    border-color: var(--primary-color);
    background: var(--surface-color);
    color: var(--text-color);
}

.form-control::placeholder {
    color: var(--muted-text-color) !important;
    opacity: 1 !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* HOVER EFFECTS: Use professional blue/slate */

/* Nav link hover and active */
.nav-link:hover,
.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Buttons */
.btn-primary:hover,
.btn-outline-primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: white !important;
}

/* Card hover (work, service, testimonial, package) */
.service-card:hover,
.work-card:hover,
.testimonial-card:hover,
.package-card:hover {
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1) !important;
}

/* Footer links hover */
footer a:hover, .footer-content a:hover {
    color: var(--primary-color) !important;
}

/* Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-down {
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.6s ease;
}

.fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

/* Animation Active States */
.fade-up.active,
.fade-down.active,
.fade-left.active,
.fade-right.active {
    opacity: 1;
    transform: translate(0);
}

/* Add new animation classes */
.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rotate-in {
    opacity: 0;
    transform: rotate(-10deg);
    transition: all 0.6s ease;
}

/* Animation active states */
.slide-in-left.active,
.slide-in-right.active,
.zoom-in.active,
.rotate-in.active {
    opacity: 1;
    transform: translate(0) scale(1) rotate(0);
}

/* Sidebar animation styles */
.sidebar {
    transform: translateX(-100%); /* Change default state for mobile */
}

/* Desktop sidebar state */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
    }

    .sidebar .nav-item {
        opacity: 0;
        transform: translateX(-30px);
        transition: all 0.3s ease;
    }

    .sidebar .nav-item.active {
        opacity: 1;
        transform: translateX(0);
    }

    /* Fix footer position relative to sidebar */
    .footer-content {
        margin-left: var(--sidebar-width);
        transition: margin-left var(--transition-speed) ease;
    }

    .sidebar-collapsed .footer-content {
        margin-left: 0;
    }
}

/* Mobile sidebar animation */
.sidebar.active {
    transform: translateX(0);
}

/* Sidebar items animation - only trigger on mobile when active */
@media (max-width: 768px) {
    .sidebar .nav-item {
        opacity: 0;
        transform: translateX(-30px);
        transition: all 0.3s ease;
    }

    .sidebar.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    /* Use transform instead of left for better performance */
    .sidebar {
        left: 0;
        transform: translateX(-280px);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar .nav-item {
        /* Optimize item animations */
        will-change: transform, opacity;
        transform: translateX(-20px);
        /* Reduce transition properties */
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
}

/* Add staggered delays for nav items */
.sidebar .nav-item:nth-child(1) { transition-delay: 0.1s; }
.sidebar .nav-item:nth-child(2) { transition-delay: 0.2s; }
.sidebar .nav-item:nth-child(3) { transition-delay: 0.3s; }
.sidebar .nav-item:nth-child(4) { transition-delay: 0.4s; }
.sidebar .nav-item:nth-child(5) { transition-delay: 0.5s; }
.sidebar .nav-item:nth-child(6) { transition-delay: 0.6s; }
.sidebar .nav-item:nth-child(7) { transition-delay: 0.7s; }

/* Update sidebar and navbar brand styles */
.sidebar .navbar-brand {
    width: 100%;
    text-align: center;
    opacity: 1; /* Keep brand visible */
    transform: none; /* Remove transform */
    transition: none; /* Remove transition */
}

.sidebar .navbar-brand img {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    display: block;
    opacity: 1;
    transform: none;
}

.sidebar .navbar-brand h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

/* Update mobile styles */
@media (max-width: 768px) {
    /* Reset sidebar position */
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        position: fixed;
        left: 0;
    }

    /* Center main content */
    .content {
        margin-left: 0;
        padding: 1rem;
        width: 100vw;
        position: relative;
        left: 0;
        right: 0;
    }

    /* Fix container alignment */
    .container {
        padding-left: 15px;
        padding-right: 15px;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }

    /* Reset body */
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
        margin: 0;
        padding: 0;
    }

    /* Fix row margins */
    .row {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Add specific fixes for footer on mobile */
@media (max-width: 768px) {
    .footer-content {
        margin-left: 0;
        width: 100%;
    }
    
    footer .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Update existing section animations */
.testimonial-card {
    transform-origin: center;
}

.service-card i {
    transition: all 0.3s ease;
}

.service-card:hover i {
    transform: scale(1.2);
}

.skill-item {
    transform-origin: center;
}

.skill-icon {
    transition: all 0.3s ease;
}

.skill-item:hover .skill-icon {
    transform: rotate(360deg);
}

/* Section Animations */
.section-heading {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.section-heading.active {
    opacity: 1;
    transform: translateY(0);
}

.section-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
    transition-delay: 0.2s;
}

.section-text.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 70px;
    }
    
    .nav-text,
    .navbar-brand h5 {
        display: none;
    }
    
    .content {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Adjust container padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }

    .hero .row {
        margin: 0;
    }

    /* Adjust section padding */
    .py-7 {
        padding: 4rem 0;
    }
    
    .sidebar {
        width: 280px; /* Wider on mobile for better readability */
        transform: translateX(-100%);
        z-index: 1060; /* Increase z-index to be above content */
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .nav-text,
    .navbar-brand h5 {
        display: block;
    }

    .content {
        margin-left: 0;
        width: 100%;
        position: relative;
        z-index: 1040;
    }

    /* Show nav text on mobile when sidebar is active */
    .sidebar.active .nav-text,
    .sidebar.active .navbar-brand h5 {
        display: block;
    }

    /* Fix nav layout */
    .nav-link {
        display: flex;
        align-items: center;
        padding: 1rem;
    }

    .nav-link i {
        margin-right: 1rem;
    }

    footer .container-fluid {
        padding-left: 1rem;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .work-card {
        margin-bottom: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Add new breakpoint for extra small devices */
@media (max-width: 576px) {
    .hero .d-flex.gap-3 {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem !important;
    }

    .hero .btn-lg {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .hero dotlottie-player {
        max-width: 280px !important;
        height: 220px !important;
    }
    
    .hero .col-lg-6:first-child {
        padding: 0 1rem;
    }

    .work-card .d-flex.gap-2 {
        flex-direction: column;
    }

    .work-card .btn {
        width: 100%;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body .row {
        flex-direction: column;
    }

    .modal-body .col-md-8,
    .modal-body .col-md-4 {
        width: 100%;
    }

    .modal-body img {
        margin-bottom: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .display-3 {
        font-size: calc(1.525rem + 3vw);
    }

    .display-5 {
        font-size: calc(1.425rem + 2.1vw);
    }

    .py-7 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* Add styles for very small devices */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 2rem;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
    }

    .sidebar {
        width: 100%;
    }
}

/* Add section-specific delays */
#work .slide-in-left,
#work .slide-in-right {
    transition-delay: 0.1s;
}

#services .slide-in-left,
#services .slide-in-right {
    transition-delay: 0.2s;
}

#skills .slide-in-left,
#skills .slide-in-right {
    transition-delay: 0.3s;
}

/* Enhanced zoom animation for headings */
.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.zoom-in.active {
    opacity: 1;
    transform: scale(1);
}

/* Adjust heading animation delays */
section h2.zoom-in {
    transition-delay: 0.2s;
}

section p.fade-up {
    transition-delay: 0.4s;
}

/* Contact form animations */
.slide-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered form field animations */
.contact-form .fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.contact-form .fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

.contact-form .fade-up:nth-child(1) { transition-delay: 0.2s; }
.contact-form .fade-up:nth-child(2) { transition-delay: 0.3s; }
.contact-form .fade-up:nth-child(3) { transition-delay: 0.4s; }
.contact-form .fade-up:nth-child(4) { transition-delay: 0.5s; }
.contact-form .fade-up:nth-child(5) { transition-delay: 0.6s; }

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    /* Fix content alignment */
    .content {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
        overflow-x: hidden;
    }
    
    /* Adjust container padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }

    /* Fix hero section */
    .hero {
        padding: 4rem 0;
    }

    .hero .row {
        margin: 0;
    }

    /* Adjust section padding */
    .py-7 {
        padding: 4rem 0;
    }
    
    /* Fix card layouts */
    .work-card, 
    .service-card, 
    .skill-item {
        margin-bottom: 1rem;
    }

    /* Fix button groups */
    .d-flex.gap-2 {
        flex-wrap: wrap;
    }

    .d-flex.gap-2 .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Fix modals */
    .modal-dialog {
        margin: 0.5rem;
    }

    /* Fix footer */
    .footer-content {
        margin-left: 0;
        padding: 0 15px;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    /* Adjust text sizes */
    .display-3 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    /* Fix button spacing */
    .hero .d-flex.gap-3 {
        flex-direction: column;
    }

    .hero .btn {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Fix grid spacing */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .col-md-4,
    .col-lg-6,
    .col-md-6 {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Fix sidebar on mobile */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
        z-index: 1060;
    }

    .sidebar.active {
        left: 0;
        box-shadow: 0 0 15px rgba(0,0,0,0.2);
    }

    .mobile-toggle {
        display: flex;
        z-index: 1061;
    }

    .sidebar-toggle {
        display: none;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
    }

    /* Fix main content wrapper */
    main.content {
        width: 100%;
        position: relative;
        left: 0;
        transition: transform var(--transition-speed) ease;
        padding-top: 0 !important;
    }

    /* Fix mobile nav text */
    .nav-text {
        display: inline-block;
        margin-left: 1rem;
    }
}

/* Optimize sidebar transitions */
.sidebar {
    transition: transform var(--transition-speed) ease;
    /* Remove unnecessary transitions */
    will-change: transform;
    /* Use hardware acceleration */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Optimize mobile transitions */
@media (max-width: 768px) {
    .sidebar {
        /* Use transform instead of left for better performance */
        left: 0;
        transform: translateX(-280px);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar .nav-item {
        /* Optimize item animations */
        will-change: transform, opacity;
        transform: translateX(-20px);
        /* Reduce transition properties */
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
}

/* Add these modal fixes */
@media (max-width: 768px) {
    /* Fix modal backdrop */
    .modal-backdrop {
        opacity: 0 !important;
    }

    /* Improve modal styling on mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    }

    /* Ensure close button is visible */
    .btn-close {
        position: absolute;
        right: 3.5rem !important; /* Move further left from the edge */
        top: 1rem;
        z-index: 1070 !important; /* Above sidebar toggle */
        background-color: white;
        padding: 0.5rem;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        opacity: 1;
    }

    /* Keep modal content readable */
    .modal {
        background: rgba(255,255,255,0.95);
    }
}

/* Add mobile skill icon animations */
@media (max-width: 768px) {
    .skill-icon {
        transition: none;
    }

    .spin-animation {
        animation: spinIcon 1s ease-in-out;
    }

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

/* Skills Section - Unified Smooth Animation */
.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    display: inline-block;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

/* Remove all media queries for skill animations */
.skill-item.spin-animation .skill-icon {
    animation: smoothSpin 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes smoothSpin {
    from { 
        transform: rotate(0deg) translateZ(0);
    }
    to { 
        transform: rotate(360deg) translateZ(0);
    }
}

/* Remove hover styles and simplify skill-item */
.skill-item {
    text-align: center;
    padding: 1.5rem;
    backface-visibility: hidden;
}

/* Skills Section - Update Animation Target */
.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    display: inline-block;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.skill-item.spin-animation .skill-icon {
    animation: spinIcon 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spinIcon {
    from { 
        transform: rotate(0deg) translateZ(0);
    }
    to { 
        transform: rotate(360deg) translateZ(0);
    }
}

/* Keep text stable */
.skill-item h5 {
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

/* Move sidebar social links up and make always visible */
.sidebar .social-links {
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

/* Remove mt-auto from sidebar social links if present */
.sidebar .mt-auto {
    margin-top: 0 !important;
}

/* Make sidebar nav buttons, icons, and text smaller */
.sidebar .navbar-brand img {
    width: 36px;
    height: 36px;
}
.sidebar .navbar-brand h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
}
.nav-link i {
    font-size: 1.1rem;
    min-width: 1.5rem;
}
.nav-text {
    margin-left: 0.25rem;
    font-size: 0.95rem;
}
.sidebar .social-links a {
    font-size: 1.2rem;
    margin: 0 0.25rem;
    padding: 0.25rem;
    transition: color var(--transition-speed) ease;
}

.sidebar .social-links a:hover {
    color: var(--accent-color) !important;
}
.sidebar .social-links {
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 577px) and (max-width: 991px) {
  .hero .d-flex.gap-3 {
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: flex-start;
  }
  .hero .btn-lg {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .hero .col-lg-6 {
    margin-bottom: 2rem;
  }
  .hero .position-relative {
    margin-top: 1.5rem;
  }
}

@media (max-width: 991px) {
  .hero .col-lg-6 + .col-lg-6 {
    margin-top: 2rem;
  }
  .hero img.img-fluid {
    margin-top: 1rem;
    margin-bottom: 0;
    display: block;
    max-width: 100%;
    height: auto;
  }
}

@media (min-width: 992px) {
  .sidebar {
    overflow-y: initial !important;
    scrollbar-width: none !important;
  }
  .sidebar::-webkit-scrollbar {
    display: none !important;
  }
}

/* Prevent horizontal scroll on all screens */
html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}
main.content, .content, .container {
    overflow-x: hidden;
}

/* Fix modal close button overlap with sidebar toggle on mobile */
@media (max-width: 768px) {
    .btn-close {
        right: 3.5rem !important; /* Move further left from the edge */
        z-index: 1070 !important; /* Above sidebar toggle */
    }
    .mobile-toggle {
        z-index: 1060;
    }
}

/* Brand Packages Section Card Styles */
.package-card {
    background: #fff;
    border-radius: 1rem;
    border: 1.5px solid #f0f0f0;
    box-shadow: none;
    padding: 2rem 1.5rem 2.5rem 1.5rem;
    margin-bottom: 2rem;
    transition: border-color 0.3s, transform 0.3s, background 0.3s;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.package-card h4 {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.package-card .price {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.package-card ul {
    padding-left: 0;
    list-style: none;
    margin-bottom: 0;
    font-size: 1rem;
    color: #444;
    text-align: left;
    width: 100%;
}

.package-card ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.2em;
    position: relative;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ececec;
}

.package-card ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.package-card ul li:before {
    content: '\2022';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1.1em;
    top: 0.1em;
}

.package-card:hover {
    box-shadow: none;
    background: #fff;
    border: 2px solid var(--primary-color);
    transform: translateY(-3px) scale(1.01);
}

@media (max-width: 991px) {
    .package-card {
        min-height: 380px;
        padding: 1.5rem 1rem 2rem 1rem;
    }
}

@media (max-width: 576px) {
    .package-card {
        min-height: unset;
        padding: 1.2rem 0.5rem 1.5rem 0.5rem;
    }
    .package-card h4 {
        font-size: 1.1rem;
    }
    .package-card .price {
        font-size: 1.1rem;
    }
    .package-card ul {
        font-size: 0.95rem;
    }
}

#about, #about .container, #about .row {
    overflow-x: hidden !important;
}
#about .row.align-items-center,
#contact .row.justify-content-center {
    overflow: hidden !important;
    position: relative;
}

/* Remove drop shadow and add outline to About image */
#about img.img-fluid {
    box-shadow: none !important;
    border: 2px solid var(--primary-color);
    background: var(--surface-color);
}

/* Remove drop shadow and add outline to Contact form */
.contact-form {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: none !important;
    border: 2px solid var(--border-color);
}

/* Footer social links alignment fix for desktop */
@media (min-width: 992px) {
  footer .col-lg-3:last-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
  }
  footer .social-links {
    justify-content: flex-start !important;
    margin-left: 0 !important;
  }
}

/* Update button and heading colors */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--background-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--background-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
}

.section-heading {
    color: var(--primary-color);
}

/* Update card and section backgrounds */
section, .service-card, .work-card, .testimonial-card {
    background: var(--surface-color);
}

/* Update border color for cards */
.service-card, .work-card, .testimonial-card {
    border: 1.5px solid var(--border-color);
}

/* Remove drop shadows from all cards */
.service-card, .work-card, .testimonial-card {
    box-shadow: none !important;
}

/* Add border on hover for cards */
.service-card:hover, .work-card:hover, .testimonial-card:hover {
    border: 2px solid var(--primary-color);
}

/* Update sidebar background */
.sidebar {
    background: var(--surface-color);
}

/* Update footer background */
footer.bg-white {
    background: var(--surface-color) !important;
}

/* Misc */
hr, .border-top {
    border-color: var(--border-color) !important;
}

::-webkit-scrollbar {
    width: 8px;
    background: var(--background-color);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Ensure proper contrast for all backgrounds */
body, main.content, section, .container, .content {
    background: var(--background-color) !important;
    color: var(--text-color) !important;
}

.bg-white, .surface-color, .service-card, .work-card, .testimonial-card, .contact-form {
    background: var(--surface-color) !important;
    color: var(--text-color) !important;
}

/* Headings and section titles */
h1, h2, h3, h4, h5, h6, .section-heading, .display-3, .display-5 {
    color: var(--primary-color) !important;
}

/* Muted text with proper contrast for light theme */
.section-text, .lead, .text-muted, .service-card .text-muted, .work-card .text-muted, .testimonial-card .text-muted {
    color: var(--muted-text-color) !important;
    opacity: 1 !important;
}

/* Sidebar and nav */
.sidebar, .sidebar .navbar-brand h5, .sidebar .nav-link {
    background: var(--surface-color) !important;
    color: var(--text-color) !important;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Footer */
footer.bg-white, .footer-content {
    background: var(--surface-color) !important;
    color: var(--muted-text-color) !important;
}
footer h5, footer h6 {
    color: var(--primary-color) !important;
}
footer a, .footer-content a {
    color: var(--primary-color) !important;
}
footer a:hover, .footer-content a:hover {
    color: #1d4ed8 !important;
}
/* Add custom styles for sidebar nav links left alignment on desktop */
@media (min-width: 992px) {
  .sidebar .nav {
    align-items: flex-start !important;
    text-align: left !important;
  }
  .sidebar .nav .nav-link {
    justify-content: flex-start !important;
    text-align: left !important;
  }
  .sidebar .nav .nav-text {
    display: inline-block;
    margin-left: 8px;
    text-align: left;
  }
}


/* Remove Bootstrap text utility overrides */
.text-dark, .text-light, .text-white, .text-black, .text-secondary {
    color: inherit !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}
.btn-primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: white !important;
}
.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Inputs */
.form-control {
    background: var(--surface-color) !important;
    color: var(--text-color) !important;
    border: 1.5px solid var(--border-color) !important;
}
.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.25) !important;
    background: var(--surface-color) !important;
    color: var(--text-color) !important;
}

/* About image outline */
#about img.img-fluid {
    box-shadow: none !important;
    border: 2px solid var(--primary-color) !important;
}

.row.g-4, .row.justify-content-center, .row.mb-5, .container, .row {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Portfolio Preview buttons professional blue */
.work-card .btn.btn-outline-secondary,
.btn-outline-secondary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}
.work-card .btn.btn-outline-secondary:hover,
.btn-outline-secondary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: white !important;
}

/* Green Accent Styling */
.badge.bg-primary {
    background-color: var(--accent-color) !important;
}

.hero .badge {
    background-color: var(--accent-color) !important;
    border: none;
}

/* Add green accents to icons in contact section */
.contact-form .fas,
#contact .fas {
    color: var(--accent-color);
}

/* Green accent for active nav items */
.nav-link.active {
    background-color: var(--green-light) !important;
    color: var(--green-accent) !important;
    border-left: 3px solid var(--accent-color);
}

/* Subtle green touches */
.border-top {
    border-color: var(--green-light) !important;
}

/* Heart icon in footer */
.fa-heart {
    color: var(--accent-color) !important;
}

/* Contact form submit button green accent */
#contact .btn-primary,
.contact-form .btn-primary {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
}

#contact .btn-primary:hover,
.contact-form .btn-primary:hover {
    background-color: var(--green-accent) !important;
    border-color: var(--green-accent) !important;
    transform: translateY(-2px);
}

/* Form focus states with green accent */
.form-control:focus {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25) !important;
}