/* Global Styles */
:root {
    --primary-color: #4DB6CD;
    --primary-light: #7DD3E3;
    --secondary-color: #2B95AD;
    --dark-color: #1D6980;
    --light-color: #f8fafc;
    --text-color: #334155;
    --gray-color: #94a3b8;
    --light-gray: #e2e8f0;
    --gradient: linear-gradient(10deg, var(--primary-color), var(--secondary-color));
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --radius: 12px;
    --animation-duration: 1s;
    --animation-delay: 0.2s;
    --alert-color: #E76F51;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-touch-callout: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #fff;
    padding-top: 70px;
    padding-bottom: 70px;
}

img {
    max-width: 100%;
    display: block;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 700;
    line-height: 1.2;
}

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

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    overflow-x: hidden;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-button {
    background: var(--gradient);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.primary-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -5px rgba(77, 182, 205, 0.3);
}

.primary-button:hover:before {
    width: 100%;
}

.secondary-button {
    background: transparent;
    color: var(--dark-color);
    padding: 13px 27px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid var(--light-gray);
}

.secondary-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.outline-button {
    background: transparent;
    color: white;
    padding: 13px 27px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.outline-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.text-center {
    text-align: center;
}

.gradient-text {
    background: linear-gradient(45deg, #4DB6CD 0%, #ffecc0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    display: inline-block;
    background-color: rgba(77, 182, 205, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 40px;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--gray-color);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

.blur-shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(77, 182, 205, 0.2) 0%, rgba(43, 149, 173, 0.1) 50%, rgba(255, 255, 255, 0) 70%);
    z-index: 1;
}

.shape-1 {
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
}

.shape-2 {
    bottom: -50px;
    left: -200px;
    width: 500px;
    height: 500px;
    opacity: 0.5;
}

.shape-3 {
    top: -50px;
    right: -50px;
    width: 400px;
    height: 400px;
    opacity: 0.7;
}

/* Side Navigation Dots */
.side-nav {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.side-nav ul {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-nav ul li a {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--light-gray);
    position: relative;
}

.side-nav ul li a:hover,
.side-nav ul li a.active {
    background: var(--gradient);
}

.side-nav ul li a .tooltip {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: var(--dark-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.side-nav ul li a:hover .tooltip {
    opacity: 1;
    visibility: visible;
    right: 25px;
}

/* Header Styles */
header {
    padding: 30px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 12px 0;
    /* background: rgba(255, 255, 255, 0.95); */
    /* box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); */
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    font-size: 24px;
    color: var(--dark-color);
    display: flex;
}

.logo h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.main-nav ul {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.476);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.main-nav a {
    font-weight: 500;
    padding: 10px 18px;
    position: relative;
    border-radius: 30px;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.main-nav a::after {
    display: none;
}

.main-nav a:hover {
    background: rgba(77, 182, 205, 0.1);
}

.main-nav a.active {
    background: var(--gradient);
    padding: 6px 15px;
    color: white;
    box-shadow: 0 4px 15px rgba(77, 182, 205, 0.3);
    transform: translateY(-2px);
    animation: navPulse 2s infinite;
}

@keyframes navPulse {
    0% { box-shadow: 0 4px 12px rgba(77, 182, 205, 0.3); }
    50% { box-shadow: 0 4px 18px rgba(77, 182, 205, 0.5); }
    100% { box-shadow: 0 4px 12px rgba(77, 182, 205, 0.3); }
}

/* Improved hover effect */
.main-nav a:hover:not(.active) {
    background: rgba(77, 182, 205, 0.1);
    transform: translateY(-1px);
}

.logo-image {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    object-fit: contain;
    transition: var(--transition);
}

.logo-image:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .logo-image {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .logo-image {
        width: 28px;
        height: 28px;
        margin-right: 6px;
    }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.cta-button {
    background: var(--gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -5px rgba(77, 182, 205, 0.3);
}

/* Hero Section */
.hero {
    padding: 180px 0 120px;
    background: linear-gradient(135deg, #e0f5f9 0%, #d6f0f7 50%, #c9e9f2 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234DB6CD' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
    z-index: 0;
}

.hero-glow {
    position: absolute;
    top: -15%;
    right: -10%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(77, 182, 205, 0.15) 0%, rgba(43, 149, 173, 0.1) 30%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    opacity: 0.8;
    animation: pulse 8s ease-in-out infinite;
}

/* Second glow for enhanced effect */
.hero::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(77, 182, 205, 0.12) 0%, rgba(43, 149, 173, 0.08) 30%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    opacity: 0.7;
    animation: pulse 7s ease-in-out infinite reverse;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero-content {
    max-width: 600px;
    position: relative;
}

.badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 28px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pulse-animation {
    position: relative;
}

.pulse-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(77, 182, 205, 0.15);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    transform: scale(0.85);
    animation: badge-pulse 3s infinite;
}

@keyframes badge-pulse {
    0% { opacity: 0.7; transform: scale(0.85); }
    50% { opacity: 0; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(1.5); }
}

.badge span {
    font-weight: 600;
    font-size: 15px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.2px;
}

.hero-content h1 {
    font-size: 56px;
    margin-bottom: 28px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.gradient-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(45deg, rgba(77, 182, 205, 0.3), rgba(43, 149, 173, 0.1));
    filter: blur(3px);
    z-index: -1;
    border-radius: 4px;
}

.highlight-text {
    position: relative;
    z-index: 1;
    color: var(--dark-color);
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(77, 182, 205, 0.2);
    z-index: -1;
    border-radius: 6px;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 20px;
    margin-bottom: 45px;
}

.glow-button {
    position: relative;
    z-index: 1;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.glow-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-light));
    z-index: -1;
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-button:hover::before {
    opacity: 1;
    animation: rotate-gradient 2s linear infinite;
}

@keyframes rotate-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.outline-hover:hover {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

/* Update stats container */
.stats-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 28px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.stats-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
}

.stat .number {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    margin-bottom: 8px;
}

.stat .number::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

.stat .label {
    font-size: 15px;
    color: var(--gray-color);
    font-weight: 500;
}

/* Update floating cards */
.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    padding: 22px;
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: float 5s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 2;
}

.floating-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 25px 40px rgba(77, 182, 205, 0.2);
}

.card-icon {
    width: 52px;
    height: 52px;
    background: var(--gradient);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(77, 182, 205, 0.3);
}

.card-content h4 {
    font-size: 17px;
    margin-bottom: 4px;
    font-weight: 700;
}

.card-content p {
    font-size: 13px;
    color: var(--gray-color);
    letter-spacing: 0.2px;
}

.bounce-animation {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--gray-color);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--gray-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s ease infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

.scroll-text {
    font-size: 12px;
    font-weight: 500;
}

/* Services Section */
.services {
    padding: 120px 0;
    background-color: white;
    position: relative;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.1);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.card-tag {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-color);
}

.service-card .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 16px;
}

.service-card .icon i {
    font-size: 24px;
    color: white;
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.service-card p {
    color: var(--gray-color);
    margin-bottom: 24px;
}

.feature-list {
    margin-top: auto;
    margin-bottom: 24px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.feature-list li i {
    color: var(--primary-color);
    font-size: 14px;
}

.learn-more {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.learn-more i {
    transition: transform 0.3s ease;
}

.learn-more:hover i {
    transform: translateX(4px);
}

/* Portfolio Section */
.work {
    padding: 120px 0;
    background-color: var(--light-color);
    position: relative;
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 500;
    background-color: white;
    color: var(--text-color);
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient);
    color: white;
    border-color: transparent;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.portfolio-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    transition: transform 0.5s ease;
    height: 250px;
    width: 100%;
    object-fit: cover;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.overlay-content {
    color: white;
}

.overlay-content h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 4px;
}

.overlay-content span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 12px;
}

.view-project {
    display: inline-block;
    color: white;
    font-weight: 600;
    font-size: 14px;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--primary-color);
}

.view-project:hover {
    color: var(--primary-light);
}

/* Process Section */
.process {
    padding: 120px 0;
    background-color: white;
}

.process-steps {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process-connector {
    position: absolute;
    left: 35px;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    z-index: 1;
}

.process-step {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(77, 182, 205, 0.3);
}

.step-content {
    padding-top: 10px;
}

.step-content h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.step-content p {
    color: var(--gray-color);
}

/* Testimonials Section */
.testimonials {
    padding: 120px 0;
    background: linear-gradient(to bottom right, #f8fafc, #f0f9ff);
    position: relative;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 10px;
    margin: -20px -10px;
    scrollbar-width: none;
}

.testimonial-slider::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    min-width: 350px;
    flex: 1;
    border: 1px solid var(--light-gray);
}

.quote {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 24px;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
    color: var(--text-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-image img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.author-info span {
    font-size: 14px;
    color: var(--gray-color);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--light-gray);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--gradient);
    width: 30px;
    border-radius: 5px;
}

/* CTA Section */
.cta {
    padding: 120px 0;
    background: var(--gradient);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.cta-content .section-tag {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.cta-content h2 {
    font-size: 40px;
    color: white;
    margin-bottom: 20px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-bottom: 40px;
}

.cta-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-form input {
    flex: 1;
    padding: 16px 24px;
    border-radius: 50px;
    border: none;
    font-family: inherit;
    font-size: 16px;
    box-shadow: var(--shadow);
}

.cta-form .primary-button {
    background: var(--dark-color);
}

.or-divider {
    margin: 20px 0;
    position: relative;
    text-align: center;
}

.or-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

.or-divider::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

.or-divider span {
    background-color: transparent;
    color: white;
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 100px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo h2 {
    color: white;
    font-size: 30px;
    margin-bottom: 20px;
    display: flex;
}

.footer-logo h2 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.footer-logo p {
    color: var(--gray-color);
    max-width: 300px;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--gradient);
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.link-column h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.link-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--gradient);
    border-radius: 3px;
}

.link-column ul li {
    margin-bottom: 12px;
}

.link-column a {
    color: var(--gray-color);
    transition: var(--transition);
    display: inline-block;
}

.link-column a:hover {
    color: white;
    transform: translateX(5px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--gray-color);
}

.contact-info li i {
    color: var(--primary-light);
    margin-top: 5px;
    min-width: 16px;
    text-align: center;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: var(--gray-color);
    font-size: 14px;
}

.footer-links-bottom a {
    color: var(--gray-color);
    font-size: 14px;
    transition: var(--transition);
}

.footer-links-bottom a:hover {
    color: white;
}

.link-divider {
    margin: 0 10px;
    color: var(--gray-color);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .side-nav {
        display: none;
    }

    .hero-content h1 {
        font-size: 48px;
    }

    .magic-gallery-item {
        padding: 0 5vw;
    }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
        order: 1;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .stats-wrapper {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 15px 0;
        min-height: calc(100vh - 70px);
    }
    
    .hero-content h1 {
        font-size: 40px;
    }
    
    .stats-container {
        padding: 16px 20px;
    }
    
    .stat .number {
        font-size: 28px;
    }

    .contact-info {
        display: inline-block;
        text-align: left;
        max-width: 220px;
        margin: 0 auto;
    }
    
    .contact-info li {
        justify-content: flex-start;
        text-align: left;
    }

    /* Fix spacing for the footer to avoid overlap with mobile nav button */
    footer {
        margin-bottom: 90px; /* Increased margin to avoid overlap with side nav button */
    }
    
    /* Adjust position of the mobile side nav button */
    .mobile-side-nav-button {
        bottom: 25px;
        right: 25px;
        z-index: 1200; /* Ensure it's above all other elements */
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    body {
        padding-top: 60px;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .badge {
        margin-bottom: 20px;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
        margin-bottom: 30px;
    }
    
    .hero-cta button {
        width: 100%;
    }
    
    .stats-wrapper {
        flex-direction: column;
        gap: 24px;
    }
    
    .stats-container {
        padding: 24px 20px;
    }
    
    .stat {
        width: 100%;
    }
    
    .stat-divider {
        display: none;
    }
    
    .card-group {
        min-height: 280px;
    }
    
    .floating-card {
        padding: 15px;
        width: 80%;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .card-1 {
        top: 15%;
        left: 50%;
        animation-name: float-mobile;
    }
    
    .card-2 {
        bottom: 15%;
        left: 50%;
        animation-name: float-mobile;
    }
    
    @keyframes float-mobile {
        0%, 100% {
            transform: translateX(-50%) translateY(0);
        }
        50% {
            transform: translateX(-50%) translateY(-10px);
        }
    }
    
    .floating-card:hover {
        transform: translateX(-50%) translateY(-5px) !important;
    }
    
    .service-cards {
        grid-template-columns: 1fr;
    }
    
    .process-step {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    .process-connector {
        display: none;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .badge {
        padding: 6px 12px;
    }

    .badge span {
        font-size: 12px;
    }

    .hero-content p {
        font-size: 16px;
    }

    /* Enhanced mobile navigation */
    .cta-button {
        padding: 10px 16px;
        font-size: 13px;
    }

    .primary-button, .secondary-button, .outline-button {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Adjust testimonials */
    .testimonial-slider {
        padding: 0;
        margin: 0;
        overflow-x: visible;
        flex-direction: column;
        gap: 20px;
    }

    .testimonial-card {
        min-width: 100%;
        padding: 25px;
    }

    /* Simplify CTA */
    .cta {
        padding: 80px 0;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .cta-form input {
        padding: 12px 20px;
    }

    /* Adjust footer */
    footer {
        padding: 60px 0 30px;
    }
}

/* Handle notch devices and extremely small screens */
@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 28px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .service-card {
        padding: 20px 15px;
    }

    .service-card h3 {
        font-size: 20px;
    }

    .cta-content h2 {
        font-size: 24px;
    }
}

/* Scroll Animation Styles */
.reveal-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--animation-duration) ease, 
                transform var(--animation-duration) ease;
}

.reveal-animation.active {
    opacity: 1;
    transform: translateY(0);
}

.parallax-element {
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform;
}

.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.active {
    animation: staggerFadeIn 0.5s ease forwards;
}

@keyframes staggerFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity var(--animation-duration) ease, 
                transform var(--animation-duration) ease;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity var(--animation-duration) ease, 
                transform var(--animation-duration) ease;
}

.fade-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity var(--animation-duration) ease, 
                transform var(--animation-duration) ease;
}

.fade-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

.zoom-pan-image {
    transition: transform 4s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
}

.zoom-pan-image.active {
    transform: scale(1.05);
}

.rotating-element {
    transition: transform 30s linear infinite;
    will-change: transform;
}

.rotating-element.active {
    animation: rotate 30s linear infinite;
}

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

.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 1001;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--gradient);
    width: 0%;
    transition: width 0.2s ease;
}

.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: translateY(0);
    will-change: transform;
    z-index: 0;
}

.section-transition {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    z-index: 2;
}

.section-transition .container::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #fff);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.section-transition.active .container::before {
    opacity: 1;
}

.sticky-section {
    position: sticky;
    top: 80px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.horizontal-scroll-gallery {
    display: flex;
    width: max-content;
    will-change: transform;
    transition: transform 0.5s ease;
}

.horizontal-scroll-item {
    margin-right: 30px;
    width: 300px;
    flex-shrink: 0;
}

.scroll-magic-pin {
    position: relative;
    z-index: 2;
}

.text-split {
    overflow: hidden;
}

.text-split-inner {
    display: inline-block;
    transform: translateY(100%);
    transition: transform var(--animation-duration) cubic-bezier(0.19, 1, 0.22, 1);
}

.text-split.active .text-split-inner {
    transform: translateY(0);
}

.char-animation .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1),
                opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.char-animation.active .char {
    opacity: 1;
    transform: translateY(0);
}

.masked-image {
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.masked-image.active {
    clip-path: inset(0);
}

/* Update relevant sections to work with scroll animations */
.hero {
    position: relative;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, #f8fafc, #f0f9ff, #e0f2fe);
    z-index: -1;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray-color);
    font-size: 12px;
}

.scroll-indicator span {
    margin-bottom: 8px;
    opacity: 0.7;
}

.scroll-indicator-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--gray-color), transparent);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 1;
    }
    50% {
        height: 60px;
        opacity: 0.5;
    }
    100% {
        height: 60px;
        opacity: 0;
    }
}

.services .service-card:nth-child(1) {
    transition-delay: 0.1s;
}

.services .service-card:nth-child(2) {
    transition-delay: 0.2s;
}

.services .service-card:nth-child(3) {
    transition-delay: 0.3s;
}

.work .portfolio-item:nth-child(1) {
    transition-delay: 0.1s;
}

.work .portfolio-item:nth-child(2) {
    transition-delay: 0.2s;
}

.work .portfolio-item:nth-child(3) {
    transition-delay: 0.3s;
}

.work .portfolio-item:nth-child(4) {
    transition-delay: 0.4s;
}

/* Update for sticky scroll magic */
.magic-section {
    position: relative;
    height: auto !important;
    background: white;
    padding: 80px 0;
    overflow: hidden;
}

.magic-content {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: visible !important;
}

.magic-gallery {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    transform: none !important;
    gap: 60px;
    transition: none !important;
    will-change: auto !important;
}

.magic-gallery-item {
    width: 100% !important;
    height: auto !important;
    min-height: unset !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 20px;
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-bottom: 20px;
}

/* New Mobile-Specific UI Elements */
.mobile-magic-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.mobile-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--light-gray);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-dot.active {
    background: var(--gradient);
    width: 24px;
    border-radius: 5px;
} 

/* Footer Logo Styles */
.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}


@media (max-width: 768px) {
    .footer-logo {
        align-items: center;
        text-align: center;
    }
    
    .footer-logo img {
        width: 150px;
        height: 150px;
    }
    
    .footer-logo h2 {
        font-size: 24px;
    }
}

/* Add back animations and card styles */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 0.6; }
}

.pulse-animation {
    position: relative;
}

.pulse-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(77, 182, 205, 0.15);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    transform: scale(0.85);
    animation: badge-pulse 3s infinite;
}

@keyframes badge-pulse {
    0% { opacity: 0.7; transform: scale(0.85); }
    50% { opacity: 0; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(1.5); }
}

.glow-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-light));
    z-index: -1;
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-button:hover::before {
    opacity: 1;
    animation: rotate-gradient 2s linear infinite;
}

@keyframes rotate-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.outline-hover:hover {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-group {
    position: relative;
    width: 100%;
    min-height: 350px;
}

.card-bg {
    position: absolute;
    width: 85%;
    height: 85%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-1 {
    top: 10%;
    left: 5%;
    z-index: 3;
    animation-delay: 0.5s;
}

.card-2 {
    bottom: 10%;
    right: 5%;
    z-index: 3;
    animation-delay: 1s;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0);
    }
}

.card-content h4 {
    font-size: 17px;
    margin-bottom: 4px;
    font-weight: 700;
}

.card-content p {
    font-size: 13px;
    color: var(--gray-color);
    letter-spacing: 0.2px;
}

.bounce-animation {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray-color);
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
    margin-top: 8px;
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 1;
    }
    50% {
        height: 60px;
        opacity: 0.5;
    }
    100% {
        height: 60px;
        opacity: 0;
    }
}

/* Updated mobile styles for floating cards */
@media (max-width: 768px) {
    .hero-visual {
        height: 300px;
        margin-bottom: 30px;
    }
    
    .card-group {
        min-height: 300px;
    }
    
    .card-bg {
        width: 90%;
        height: 90%;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
}

@media (max-width: 576px) {
    .card-group {
        min-height: 280px;
    }
    
    .floating-card {
        padding: 15px;
        width: 80%;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .card-1 {
        top: 15%;
        left: 50%;
        animation-name: float-mobile;
    }
    
    .card-2 {
        bottom: 15%;
        left: 50%;
        animation-name: float-mobile;
    }
    
    @keyframes float-mobile {
        0%, 100% {
            transform: translateX(-50%) translateY(0);
        }
        50% {
            transform: translateX(-50%) translateY(-10px);
        }
    }
    
    .floating-card:hover {
        transform: translateX(-50%) translateY(-5px) !important;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .stat .number {
        font-size: 24px;
    }
    
    .stat .label {
        font-size: 13px;
    }
}

/* Mobile navigation bar */
.mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--gradient);
    backdrop-filter: blur(10px);
    display: none;
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.mobile-nav-links {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-link {
    color: white;
    text-align: center;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.mobile-nav-link i {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-nav-link.active {
    opacity: 1;
}

@media (max-width: 768px) {
    .mobile-nav-bar {
        display: block;
    }
    
    /* Add padding to the bottom to account for the mobile nav bar */
    body {
        padding-bottom: 70px;
    }
    
    /* Ensure content doesn't get hidden behind the mobile nav */
    footer {
        margin-bottom: 70px;
    }
}

/* Update for Safari mobile browser */
@media screen and (max-width: 576px) {
    /* Specific style for Safari browser */
    _::-webkit-full-page-media, _:future, :root .mobile-nav-bar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    header {
        padding: 15px 0;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--gradient);
        backdrop-filter: blur(10px);
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease;
        z-index: 10;
    }
    
    .main-nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        background: transparent;
        border: none;
        padding: 0;
    }
    
    .main-nav a {
        display: block;
        padding: 12px 20px;
        color: white;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .main-nav a.active {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav a:hover:not(.active) {
        background: rgba(255, 255, 255, 0.15);
    }
    
    .menu-toggle span {
        background-color: white;
    }
}

/* Update meta theme color in html */
@media (max-width: 576px) {
    .main-nav {
        top: 60px;
    }
}

/* Mobile Side Nav Button */
.mobile-side-nav-button {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient);
    box-shadow: 0 4px 15px rgba(77, 182, 205, 0.4);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-side-nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(77, 182, 205, 0.5);
}

.mobile-side-nav-button i {
    transition: transform 0.3s ease;
}

.mobile-side-nav-button.active i {
    transform: rotate(135deg);
}

@media (max-width: 768px) {
    .mobile-side-nav-button {
        display: flex;
    }
    
    /* Add padding to account for the button */
    body {
        padding-bottom: 100px;
    }
    
    /* Fix the hero padding on mobile */
    .hero {
        padding: 130px 0 80px;
        min-height: calc(100vh - 70px);
    }
    
    /* Ensure better spacing on mobile */
    body {
        padding-top: 70px;
    }
    
    /* Fix the header padding on mobile */
    header {
        padding: 15px 0;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1100;
    }
}

/* Fix for mobile notches and status bars */
@supports (padding-top: env(safe-area-inset-top)) {
    header {
        padding-top: calc(15px + env(safe-area-inset-top));
    }
    
    body {
        padding-top: calc(70px + env(safe-area-inset-top));
    }
}

/* Fix for iPhone safe areas */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-side-nav-button {
        bottom: calc(30px + env(safe-area-inset-bottom));
    }
}

/* Mobile Side Nav Menu */
.mobile-side-nav-menu {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 999;
    max-width: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-side-nav-menu.active {
    max-width: 250px;
    max-height: 400px;
    opacity: 1;
}

.mobile-side-nav-content {
    padding: 10px;
}

.mobile-side-nav-content ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-side-nav-content ul li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 16px;
    border-radius: 12px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.mobile-side-nav-content ul li a:hover,
.mobile-side-nav-content ul li a.active {
    background: var(--gradient);
    color: white;
}

.mobile-side-nav-content ul li a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* Backdrop for side nav menu */
.mobile-side-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-side-nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent side scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

* {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-touch-callout: none;
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    a, button, .mobile-side-nav-button, .menu-toggle {
        touch-action: manipulation;
        cursor: pointer;
    }
    
    /* Increase touch target size for better usability */
    .main-nav a, 
    .mobile-side-nav-content a,
    .primary-button,
    .secondary-button,
    .outline-button {
        min-height: 44px; /* Apple's recommended minimum size */
    }
    
    /* Fix any potential overflow issues */
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Ensure images don't cause horizontal scrolling */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Fix horizontal scrolling issues */
.hero, 
.services, 
.work, 
.process, 
.cta, 
.testimonials,
.magic-section,
footer {
    overflow-x: hidden;
    width: 100%;
}

/* Magic gallery fix for mobile */
@media (max-width: 768px) {
    .magic-gallery {
        transform: none !important;
        width: 100% !important;
        display: block;
    }
    
    .magic-gallery-item {
        width: 100% !important;
        height: auto !important;
    }
}

/* Improved footer mobile responsiveness */
@media (max-width: 768px) {
    footer {
        padding: 60px 0 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-logo {
        align-items: center;
        text-align: center;
    }
    
    .footer-logo p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .link-column h3 {
        text-align: center;
    }
    
    .link-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .contact-info li {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 2fr;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    footer {
        padding: 50px 0 30px;
    }
    
    .footer-logo img {
        width: 120px;
        height: 120px;
    }
    
    .link-column h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .contact-info li {
        font-size: 14px;
    }
}

/* Enhanced Digital Experience Cards for Mobile */
@media (max-width: 768px) {
    .magic-section {
        height: auto !important;
        min-height: unset !important;
        padding: 80px 0;
    }
    
    .magic-content {
        position: relative !important;
        height: auto !important;
        min-height: unset !important;
        overflow: visible !important;
    }
    
    .magic-gallery {
        width: 100% !important;
        flex-direction: column !important;
        gap: 60px !important;
        padding-bottom: 30px !important;
        transform: none !important;
        display: flex !important;
    }
    
    .magic-gallery-item {
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        padding: 20px !important;
        margin-bottom: 30px !important;
    }
    
    .magic-gallery-item:nth-child(2) {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .magic-gallery-item .fade-in-left,
    .magic-gallery-item .fade-in-right {
        width: 100% !important;
    }
    
    .magic-gallery-item .masked-image {
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }
    
    .magic-gallery-item h2 {
        font-size: 28px !important;
        margin-bottom: 15px !important;
        text-align: center !important;
    }
    
    .magic-gallery-item p {
        text-align: center !important;
    }
    
    .magic-gallery-item .feature-list {
        margin: 20px auto !important;
        max-width: 280px !important;
    }
}

@media (max-width: 576px) {
    .magic-section {
        padding: 60px 0 !important;
    }
    
    .magic-gallery-item {
        padding: 15px !important;
    }
    
    .magic-gallery-item h2 {
        font-size: 24px !important;
    }
    
    .magic-gallery-item .section-header h2 {
        font-size: 24px !important;
    }
    
    .magic-gallery-item .section-header p {
        font-size: 16px !important;
    }
}

/* Feature list mobile styles for Digital Experience section */
@media (max-width: 768px) {
    .magic-gallery-item .feature-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin: 20px auto;
    }
    
    .magic-gallery-item .feature-list .stagger-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
        background: rgba(77, 182, 205, 0.08);
        padding: 10px 16px;
        border-radius: 8px;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .magic-gallery-item .feature-list .stagger-item i {
        color: var(--primary-color);
        font-size: 16px;
    }
}

/* Specific styling for the Digital Experience second gallery item */
.magic-gallery-item:nth-child(2) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.magic-gallery-item .fade-in-left,
.magic-gallery-item .fade-in-right {
    opacity: 1 !important;
    transform: none !important;
    width: 100%;
}

.magic-gallery-item .masked-image {
    opacity: 1 !important;
    clip-path: none !important;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Ensure mobile responsive layout */
@media (max-width: 768px) {
    .magic-gallery-item:nth-child(2) {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .magic-gallery-item h2 {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .magic-gallery-item p {
        text-align: center;
        margin-bottom: 25px;
    }
}
