:root {
    --primary-blue: #2563eb;
    --primary-purple: #7c3aed;
    --secondary-cyan: #06b6d4;
    --dark-gray: #1e293b;
    --medium-gray: #334155;
    --light-gray: #64748b;
    --bg-light: #f8fafc;
    --soft-white: #fefefe;
    --gradient-primary: linear-gradient(135deg, #2563eb, #7c3aed);
    --gradient-secondary: linear-gradient(135deg, #06b6d4, #2563eb);
    --gradient-dark: linear-gradient(135deg, #1e293b, #334155);
    --glass-bg: rgba(254, 254, 254, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: var(--soft-white);
    overflow-x: hidden;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    border-bottom: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
  background: white !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.header.scrolled .logo-text,
.header.scrolled .nav-links a {
  color: var(--medium-gray) !important;
}

.header.scrolled .mobile-menu span {
  background: var(--medium-gray) !important;
}

.header.scrolled .cta-button {
  border-color: var(--primary-blue) !important;
  color: black !important;
}

.header.scrolled .cta-button:hover {
  background: var(--primary-blue) !important;
  color: white !important;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: var(--soft-white);
    position: relative;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
}

.logo-icon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.5);
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    background: var(--secondary-cyan);
    border-radius: 50%;
    opacity: 0.7;
    animation: pulse 3s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

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

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: white;
    transition: all 0.3s ease;
}

.header.scrolled .logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    flex-wrap: nowrap;        
    overflow-x: auto;
    list-style: none;
    gap: 2.5rem;
    transition: all 0.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-links li {
  white-space: nowrap;      /* prevent individual link text from wrapping */
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;  /* Keep this for the underline animation */
    padding: 0.5rem 0;
    display: inline-block;  /* This fixes the Chrome arrow issue */
}

.nav-links a:hover {
    color: var(--primary-blue);
    transform: translateY(-1px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    background: transparent;
    color: white;
    padding: 0.8rem 1.8rem;
    border: 2px solid white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 2rem;
    margin-bottom: 0;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('img/backgrounds/hero-bg-main.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Mobile fix for hero background - NO BLACK SPACES */
/* Shows maximum image while maintaining full coverage */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-bg {
        /* Slightly less zoom than cover to show more image */
        background-size: cover !important;
        background-position: center 25% !important; /* Show upper-middle portion */
        background-repeat: no-repeat !important;
        /* Remove background color to prevent black spaces */
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 90vh; /* Slightly shorter to show more image */
    }
    
    .hero-bg {
        /* Full coverage with strategic positioning */
        background-size: cover !important;
        background-position: center 20% !important; /* Adjust to show important part */
        background-repeat: no-repeat !important;
    }
}

@media (max-width: 375px) {
    .hero {
        min-height: 85vh; /* Even shorter for small phones */
    }
    
    .hero-bg {
        background-size: cover !important;
        background-position: center top !important; /* Focus on top portion */
        background-repeat: no-repeat !important;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: #ffffff;
    animation: slideUp 0.8s ease-out 0.4s both;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.hero h1 .hero-highlight {
  display: inline-block;
  margin-left: 0.25em;
}

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

.hero-highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    margin-left: 0.25em;
    font-weight: 600;
}

.hero-highlight::after {
    display: none;
}

@keyframes expand {
    from { width: 0; }
    to { width: 100%; }
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 4rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 0.8s ease-out 0.6s both;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    animation: slideUp 0.8s ease-out 0.8s both;
}

.btn-primary {
    background: transparent;
    color: var(--soft-white);
    padding: 1.2rem 2.8rem;
    border: 2px solid var(--soft-white);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--soft-white);
    color: var(--dark-gray);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--medium-gray);
    padding: 1.2rem 2.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--glass-border);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: var(--medium-gray);
    color: var(--soft-white);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(51, 65, 85, 0.3);
}

.services {
    padding: 2.5rem 2rem;
    background-image: url('img/backgrounds/services-bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    min-height: 300px;
    width: 100%;
    display: block;
    margin-top: 0;
}

/* Mobile fix - remove fixed attachment which causes issues on iOS */
@media (max-width: 1024px) {
    .services {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
    }
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(20, 20, 20, 0.65));
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 10;
}

.work-design-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 0.325rem;
}

.line-element {
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.line-element:nth-child(1) {
    width: 40px;
}

.line-element:nth-child(2) {
    width: 80px;
}

.line-element:nth-child(3) {
    width: 60px;
}

@keyframes lineGlow {
    0% {
        opacity: 0.7;
        transform: scaleX(1);
    }
    100% {
        opacity: 1;
        transform: scaleX(1.1);
    }
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary-cyan);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.15);
}

.services .section-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    line-height: 1.2;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.section-underline {
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 0 auto;
    margin-top: -12px;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 3.2rem;
    font-weight: 800;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--light-gray);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.service-card {
    text-align: center;
    padding: 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.service-card:hover {
    transform: translateY(-8px);
}

.service-icon-wrapper {
    width: 75px;
    height: 75px;
    margin: 0 auto 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon {
    width: 60px;
    height: 60px;
    color: white;
    stroke: white;
    fill: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.9;
}

.service-card:hover .service-icon {
    transform: scale(1.15);
    opacity: 1;
    filter: drop-shadow(0 10px 20px rgba(255, 255, 255, 0.3));
}

.service-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: white;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    position: relative;
    z-index: 3;
    line-height: 1.3;
    opacity: 0.95;
}

.service-card p {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    font-size: 0.85rem;
    position: relative;
    z-index: 3;
    max-width: 260px;
    margin: 0 auto;
}

.service-card:hover p {
    color: rgba(255, 255, 255, 0.95);
}

/* Icon hover effects */
.service-card:nth-child(1):hover .service-icon {
    filter: drop-shadow(0 10px 25px rgba(37, 99, 235, 0.4));
}

.service-card:nth-child(2):hover .service-icon {
    filter: drop-shadow(0 10px 25px rgba(37, 99, 235, 0.4));
}

.service-card:nth-child(3):hover .service-icon {
    filter: drop-shadow(0 10px 25px rgba(6, 182, 212, 0.4));
}

.service-card:nth-child(4):hover .service-icon {
    filter: drop-shadow(0 10px 25px rgba(124, 58, 237, 0.4));
}

.service-card:nth-child(5):hover .service-icon {
    filter: drop-shadow(0 10px 25px rgba(37, 99, 235, 0.4));
}

.service-card:nth-child(6):hover .service-icon {
    filter: drop-shadow(0 10px 25px rgba(6, 182, 212, 0.4));
}

.service-list {
    list-style: none;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 3;
}

.service-list li {
    color: var(--medium-gray);
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-size: 1.2rem;
    font-weight: 700;
}

.service-card:hover .service-list li {
    color: var(--dark-gray);
    transform: translateX(5px);
}

.service-price {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 3;
}

/* Pricing Section */
.pricing {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    position: relative;
}

.pricing .section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.pricing .section-underline {
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 0 auto;
    margin-bottom: 2rem;
}

.pricing .section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    align-items: stretch;
}

.pricing-card {
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 0;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}

.pricing-card.featured {
    border: 2px solid var(--primary-blue);
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(124, 58, 237, 0.02) 100%);
}

.featured-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 5px 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 15px;
}

.pricing-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.pricing-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 5px 15px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
    border-radius: 15px;
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    position: relative;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    flex-grow: 1;
}

.pricing-features li {
    padding: 0.8rem 0;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-btn {
    display: inline-block;
    padding: 12px 40px;
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 25px;
    margin-top: auto;
}

.pricing-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.pricing-btn.featured-btn {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-blue);
}

.pricing-btn.featured-btn:hover {
    background: var(--gradient-secondary);
    border-color: var(--secondary-cyan);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4);
}

.pricing-footer {
    text-align: center;
    margin-top: 3rem;
    color: #666;
    font-size: 0.95rem;
}

.pricing-footer p {
    margin: 0.5rem 0;
}

.portfolio {
    padding: 4rem 2rem 5rem 2rem;
    background: #F9F9F9;
    position: relative;
}

.portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

/* Updated Portfolio Section Title - matches Transparent Pricing */
.portfolio .section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Filter Tabs - Hidden on all devices */
.filter-tabs {
    display: none !important; /* Hidden on all devices */
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

@media (max-width: 1024px) {
    /* Hamburger menu for tablets and below */
    .nav {
        padding: 1rem;
    }
    
    .cta-button {
        display: none;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(254, 254, 254, 0.98) !important;
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 20px 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        transition: all 0.3s ease-in-out;
    }
    
    .nav-links li {
        margin: 0.8rem 0;
    }
    
    .nav-links a {
        color: var(--medium-gray) !important;
        font-size: 1rem;
    }
    
    .nav-links a:hover {
        color: var(--primary-blue) !important;
    }
    
    .nav-links a::after {
        background: var(--gradient-primary) !important;
    }
    
    .nav-links.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    .mobile-menu {
        display: flex;
    }
}

@media (max-width: 768px) {
    /* Filter tabs for mobile */
    .filter-tabs {
        gap: 8px;
        margin-top: 25px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .filter-tab {
        padding: 8px 16px;
        font-size: 11px;
        letter-spacing: 1px;
    }
    
    /* Additional force for single column on mobile */
    .portfolio-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-auto-columns: 1fr !important;
    }
    
    .portfolio-grid .portfolio-item {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 350px !important;
        margin: 0 auto !important;
    }
}

.filter-tab {
    padding: 10px 24px;
    border: 2px solid rgba(37, 99, 235, 0.2);
    background: white;
    color: var(--primary-blue);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 25px;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    touch-action: manipulation; /* Improve touch responsiveness */
    user-select: none; /* Prevent text selection on double tap */
}

.filter-tab:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    border-color: var(--primary-blue);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.filter-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 100px;
    gap: 16px;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    grid-auto-flow: row;
    min-height: 500px;
}

/* Ensure items pack tightly when filtering */
.portfolio-grid.filtering {
    grid-auto-flow: dense;
}

/* When filtered, use dense packing to avoid gaps */
@media (min-width: 1025px) {
    .portfolio-grid.filtered {
        grid-auto-flow: dense !important;
    }
    
    /* Reset only the column positioning for filtered items */
    .portfolio-grid.filtered .portfolio-item {
        grid-column: auto !important;
    }
    
    /* Override the specific column positioning but keep row spans */
    .portfolio-grid.filtered .portfolio-item:nth-child(1),
    .portfolio-grid.filtered .portfolio-item:nth-child(2),
    .portfolio-grid.filtered .portfolio-item:nth-child(3),
    .portfolio-grid.filtered .portfolio-item:nth-child(4),
    .portfolio-grid.filtered .portfolio-item:nth-child(5),
    .portfolio-grid.filtered .portfolio-item:nth-child(6) {
        grid-column: auto !important;
        /* Don't reset grid-row to maintain item heights */
    }
}

.portfolio-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
    cursor: default; /* Changed from pointer since the item itself isn't clickable */
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Custom grid positioning for desktop only */
@media (min-width: 1025px) {
    /* Ensure consistent description height on desktop */
    .overlay-description {
        min-height: 34px;
        max-height: 34px;
    }
    
    /* Ensure titles don't wrap on desktop */
    .overlay-title {
        white-space: nowrap;
        font-size: 20px;
    }
    
    /* Column 1: Taste of Banjul (tall), Semega (short) */
    .portfolio-item:nth-child(1) {
        grid-column: 1;
        grid-row: 1 / 4;
    }
    .portfolio-item:nth-child(5) {
        grid-column: 1;
        grid-row: 4 / 6;
    }

    /* Column 2: Roots Health (short), El Mansour (tall) */
    .portfolio-item:nth-child(6) {
        grid-column: 2;
        grid-row: 1 / 3;
    }
    .portfolio-item:nth-child(4) {
        grid-column: 2;
        grid-row: 3 / 6;
    }

    /* Column 3: Kalajula's Beauty (tall), Al Haqq (short) */
    .portfolio-item:nth-child(2) {
        grid-column: 3;
        grid-row: 1 / 4;
    }
    .portfolio-item:nth-child(3) {
        grid-column: 3;
        grid-row: 4 / 6;
    }
}

.portfolio-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.portfolio-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

/* Logo display in portfolio items */
.portfolio-image.logo-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem;
}

.portfolio-image.logo-dark {
    background: linear-gradient(135deg, #1e293b 0%, #102A44 100%);
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Case Study Label - Removed */

/* Hover Overlay */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.50);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    pointer-events: none; /* Allow touch events to pass through when hidden */
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item.touch-active .portfolio-overlay {
    opacity: 1;
    pointer-events: auto; /* Enable pointer events when visible */
}

/* Mobile-specific touch handling */
@media (hover: none) and (pointer: coarse) {
    /* This targets touch devices specifically */
    .portfolio-overlay {
        /* Always make overlay interactive on touch devices */
        pointer-events: auto;
    }
    
    .portfolio-item {
        cursor: pointer;
    }
}

.overlay-category {
    color: white;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.portfolio-item:hover .overlay-category,
.portfolio-item:hover .overlay-title,
.portfolio-item:hover .overlay-description {
    color: white !important;
    transform: translateY(0);
}

.overlay-title {
    color: white;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
    white-space: nowrap;
    padding: 0 10px;
}

.portfolio-item:hover .overlay-title {
    transform: translateY(0);
}

.overlay-description {
    color: white;
    font-size: 12px;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.4;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
    min-height: 34px; /* Minimum height for consistency */
    max-height: 34px; /* Maximum height to prevent overflow */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.portfolio-item:hover .overlay-description {
    transform: translateY(0);
}

.view-project-btn {
    padding: 9.6px 24px;
    background: transparent;
    color: white;
    border: 2px solid white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.25s, background 0.3s ease;
    border-radius: 25px;
    text-decoration: none; /* Ensure link styling is clean */
    display: inline-block; /* Ensure proper button appearance */
}

.portfolio-item:hover .view-project-btn {
    transform: translateY(0);
}

.view-project-btn:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

/* Case Study Modal */
.case-study-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.4s ease;
    padding: 20px;
}

.case-study-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    max-width: 840px;
    width: 90%;
    max-height: 90vh;
    margin: 20px auto;
    animation: slideUpModal 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header {
    position: relative;
    padding: 25px;
    background: #111;
    color: white;
    flex-shrink: 0;
    z-index: 2;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid white;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.close-modal:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-blue);
    color: white;
    transform: rotate(90deg);
}

.modal-project-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    color: white;
}

.modal-project-category {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-body {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 120px);
}

.case-study-section {
    margin-bottom: 60px;
}

.case-study-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111;
}

.case-study-section p {
    font-size: 16px;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 15px;
}

.project-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.project-images img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 30px 0;
}

@media (max-width: 768px) {
    /* Reset portfolio grid for mobile */
    .portfolio {
        padding: 3rem 1rem 4rem 1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: 280px;
        gap: 24px;
        justify-items: center;
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
        grid-auto-flow: row !important;
    }
    
    /* Reset all portfolio items to single column and center */
    .portfolio-item {
        width: 100%;
        max-width: 350px;
        grid-column: 1 !important;
        grid-row: span 1 !important;
        cursor: pointer; /* Show it's clickable on mobile */
        -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
        touch-action: manipulation; /* Faster touch response */
    }
    
    .portfolio-item:nth-child(1),
    .portfolio-item:nth-child(2),
    .portfolio-item:nth-child(3),
    .portfolio-item:nth-child(4),
    .portfolio-item:nth-child(5),
    .portfolio-item:nth-child(6) {
        grid-column: 1 !important;
        grid-row: span 1 !important;
    }
    
    /* Portfolio overlay adjustments for mobile */
    .portfolio-overlay {
        padding: 15px;
        background: rgba(0, 0, 0, 0.85); /* Darker overlay for better contrast on mobile */
    }
    
    /* Add tap indicator for mobile */
    .portfolio-item::after {
        content: "Tap to view";
        position: absolute;
        bottom: 10px;
        right: 10px;
        background: rgba(37, 99, 235, 0.9);
        color: white;
        padding: 4px 10px;
        border-radius: 15px;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        opacity: 0.8;
        z-index: 2;
        pointer-events: none;
    }
    
    .portfolio-item.touch-active::after {
        display: none; /* Hide when overlay is active */
    }
    
    .overlay-title {
        font-size: 18px;
        white-space: nowrap;
    }
    
    .overlay-description {
        font-size: 11px;
        line-height: 1.3;
        min-height: 28px;
        max-height: 28px;
    }
    
    .view-project-btn {
        padding: 12px 28px; /* Larger touch target */
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
        margin-top: 12px;
        min-width: 120px; /* Ensure minimum size */
        min-height: 44px; /* Minimum touch target height */
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        letter-spacing: 1.2px;
    }
    
    /* Continue with other mobile styles */
    /* Modal responsive styles */
    .case-study-modal {
        padding: 0;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .modal-body {
        padding: 30px 20px;
        max-height: calc(100vh - 100px);
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-project-title {
        font-size: 28px;
        padding-right: 50px;
    }
    
    .case-study-section h3 {
        font-size: 20px;
    }
    
    .case-study-section p {
        font-size: 14px;
    }
    
    .project-stats {
        padding: 20px;
        gap: 15px;
    }
    
    .project-images {
        grid-template-columns: 1fr;
    }
    
    .tech-stack {
        gap: 8px;
    }
    
    .tech-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .project-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px;
    }
}

/* Additional mobile fixes for very small screens */
@media (max-width: 480px) {
    /* Hero on small mobile */
    .hero {
        min-height: 70vh;
    }
    
    .hero-bg {
        background-size: cover;
        background-position: center;
    }
    
    /* Services on small mobile */
    .services {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: top center !important;
    }
    
    /* Testimonials on small mobile */
    .testimonials-bg img {
        object-fit: cover;
        object-position: center;
    }
}

@media (max-width: 480px) {
    /* Modal mobile styles */
    .modal-body {
        padding: 20px 15px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .close-modal {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }
    
    .modal-project-title {
        font-size: 24px;
    }
    
    .modal-project-category {
        font-size: 12px;
    }
    
    .case-study-section {
        margin-bottom: 40px;
    }
    
    .case-study-section h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .project-stats {
        padding: 15px;
        gap: 10px;
    }
    
    .project-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
    }
    
    .stat-item .stat-number {
        font-size: 28px;
    }
    
    .stat-item .stat-label {
        font-size: 12px;
    }
}

.stat-item {
    text-align: center;
    min-width: 0;
    padding: 10px;
}

.stat-item .stat-number {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    color: #2563eb;
    margin-bottom: 5px;
    display: block;
    white-space: normal;
    word-break: break-word;
}

.stat-item .stat-label {
    font-size: clamp(11px, 2vw, 14px);
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: normal;
    line-height: 1.2;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tech-tag {
    padding: 8px 16px;
    background: #e5e7eb;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ensure all content inside modal body is responsive */
.modal-body * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-body img {
    height: auto !important;
    max-width: 100% !important;
}

.modal-body div[style*="grid"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
}

/* Prevent horizontal overflow in case study content */
.case-study-section {
    overflow-x: hidden;
}

.case-study-section > div {
    max-width: 100%;
    overflow-x: auto;
}

.portfolio-content {
    padding: 2.5rem;
}

.portfolio-item h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.portfolio-item p {
    color: var(--light-gray);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-blue);
    color: var(--soft-white);
    transform: translateY(-2px);
}

.testimonials {
    padding: 3.84rem 2rem;
    position: relative;
    overflow: hidden;
    background: #333;
    min-height: 600px;
}

.testimonials-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

/* Light overlay for text readability */
.testimonials-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Light dark overlay for text contrast */
    z-index: 2;
}

.testimonials-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* filter: brightness(0.3); - Removed dark filter */
}

/* Mobile fix for testimonials background */
@media (max-width: 768px) {
    .testimonials-bg img {
        /* Use contain on mobile to ensure full image visibility */
        object-fit: cover;
        object-position: center center;
        /* Ensure minimum height for background */
        min-height: 100%;
        width: auto;
        min-width: 100%;
    }
}

.testimonials::before {
    display: none;
}

.testimonials .container {
    position: relative;
    z-index: 3;
    max-width: 1400px;
}

.testimonials-content-wrapper {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 4rem;
    align-items: center;
}

/* Why Choose Section (Left Side) */
.why-choose-content {
    padding: 2rem;
}

.why-choose-title {
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.why-underline {
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    margin-bottom: 2rem;
}

/* Collapsible Items */
.collapsible-items {
    margin-top: 1.5rem;
}

.collapsible-item {
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.collapsible-header {
    width: 100%;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid rgba(37, 99, 235, 0.1);
    color: var(--dark-gray);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.collapsible-header:hover {
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.2);
}

.collapsible-item.active .collapsible-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-color: rgba(37, 99, 235, 0.3);
    color: var(--primary-blue);
}

.toggle-icon {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
}

.collapsible-content {
    display: none;
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 0 0 8px 8px;
}

.collapsible-content p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Testimonials Section (Right Side) */
.testimonials-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.testimonials-content .section-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.testimonial-featured {
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 0;
    position: relative;
}

.quote-icon {
    font-size: 4rem;
    color: white;
    opacity: 0.8;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}

.featured-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: white;
    margin-bottom: 2rem;
    font-style: normal;
    font-weight: 400;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.featured-author {
    margin-bottom: 2rem;
}

.author-name {
    color: white;
    font-size: 1rem;
    font-style: italic;
    opacity: 0.9;
    font-weight: 500;
}

.testimonial-avatars {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.avatar-item {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
    border: 3px solid transparent;
}

.avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-item.active {
    opacity: 1;
    border: 3px solid white;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.avatar-item:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.featured-text,
.author-name {
    transition: opacity 0.3s ease;
}

/* Remove old testimonial styles */
.testimonials-grid,
.testimonial-card,
.testimonial-stars,
.testimonial-text,
.testimonial-author,
.author-avatar,
.author-info,
.testimonial-location,
.testimonial-metric,
.metric-number,
.metric-label,
.trust-indicators,
.trust-item,
.trust-number,
.trust-label {
    display: none;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
    position: relative;
    z-index: 2;
}

.testimonial-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.testimonial-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    border-color: rgba(37, 99, 235, 0.2);
}

.testimonial-stars {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

.star {
    font-size: 1.2rem;
    color: #fbbf24;
    transition: all 0.3s ease;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--medium-gray);
    margin-bottom: 2rem;
    font-style: italic;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 3rem;
    color: rgba(37, 99, 235, 0.2);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.3rem;
}

.author-info p {
    font-size: 0.95rem;
    color: var(--light-gray);
    margin-bottom: 0.2rem;
}

.testimonial-location {
    font-size: 0.85rem;
    color: var(--primary-blue);
    font-weight: 600;
}

.testimonial-metric {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
}

.metric-number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--medium-gray);
    font-weight: 600;
}

.trust-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    position: relative;
    z-index: 2;
}

.trust-item {
    text-align: center;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.trust-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.trust-label {
    color: var(--medium-gray);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.about-highlight {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.booking {
    padding: 8rem 2rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--soft-white) 100%);
}

.booking-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.booking-info h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--dark-gray);
}

.booking-benefits {
    margin-top: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.benefit-item:hover {
    transform: translateX(10px);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
    color: white;
}

.benefit-item:hover .benefit-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.4);
}

.benefit-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--dark-gray);
}

.benefit-item p {
    color: var(--light-gray);
    line-height: 1.7;
    font-size: 1.05rem;
}

.booking-form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.booking-form {
    background: var(--soft-white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.contact {
    padding: 8rem 2rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--soft-white) 100%);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    animation: float 25s ease-in-out infinite;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
    position: relative;
    z-index: 2;
}

.contact-info h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
}

.contact-info p {
    color: var(--light-gray);
    margin-bottom: 3rem;
    font-size: 1.2rem;
    line-height: 1.8;
}

.contact-details {
    margin-top: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
    color: white;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.4);
}

/* Social Media Links Styling */






.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--soft-white);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


.footer-social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.footer-social-link:hover::before {
    left: 100%;
}

.footer-social-link:hover {
    transform: translateY(-3px) scale(1.1);
}

.footer-social-link:hover svg {
    transform: scale(1.1);
}

.contact-form-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 3rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-form {
    position: relative;
    z-index: 2;
}

.contact-form h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--dark-gray);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-intro {
    color: var(--light-gray);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-size: 1.05rem;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.contact-form .form-group {
    margin-bottom: 2rem;
}

.contact-form .form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 1rem;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid rgba(37, 99, 235, 0.1);
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--soft-white);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.contact-form .form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-submit-btn {
    background: var(--gradient-primary);
    color: var(--soft-white);
    padding: 1.4rem 3rem;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.contact-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.4);
}

.contact-submit-btn .btn-text {
    position: relative;
    z-index: 2;
}

.contact-submit-btn .btn-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.contact-submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

/* Form Status Messages - Success/Error Feedback */
.form-status {
    margin-top: 1.5rem;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-status-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: #16a34a;
}

.form-status-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

/* Disabled submit button state */
.contact-submit-btn:disabled {
    cursor: not-allowed !important;
    transform: none !important;
}

.contact-submit-btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.form-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--light-gray);
    margin-top: 1.5rem;
    line-height: 1.6;
    font-style: italic;
    opacity: 0.8;
}

.footer {
    background: var(--gradient-dark);
    color: var(--soft-white);
    padding: 5rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.footer-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 1rem;
    display: block;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.footer-section a:hover {
    color: var(--primary-blue);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 2;
}

.social-icons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;    /* adjust vertical spacing if needed */
  align-items: center;
}
.footer-social-link img {
  display: block;
  width: 35px;
  height: 35px;
  transition: transform 0.3s ease;
}

.footer-social-link:hover img {
  transform: scale(1.1);
}
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.8s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.8s ease forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (min-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 130px;
        gap: 24px;
    }
}

@media (max-width: 1024px) {
    .testimonials-content-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .why-choose-content {
        text-align: center;
    }
    
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem 2rem;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
    
    .cta-button {
        padding: 0.7rem 1.4rem;
        font-size: 0.9rem;
    }

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

    .section-title {
        font-size: 2.8rem;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .testimonial-card.featured {
        grid-column: span 1;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet-specific portfolio adjustments */
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    .cta-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 120px;
        gap: 20px;
        padding: 0 1rem;
        grid-auto-flow: row;
    }
    
    /* Reposition items for 2-column layout on tablet with uniform size */
    .portfolio-item {
        grid-row: span 3 !important;
        min-height: 360px;
        height: 100%;
    }
    
    .portfolio-item:nth-child(odd) {
        grid-column: 1;
    }
    .portfolio-item:nth-child(even) {
        grid-column: 2;
    }
    
    .case-study-label {
        bottom: 10px;
        left: 10px;
        padding: 5px 10px;
        font-size: 10px;
    }
    
    /* Adjust overlay for tablet to ensure VIEW PROJECT button is visible */
    .portfolio-overlay {
        padding: 15px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
    }
    
    .overlay-category {
        font-size: 8px;
        margin-bottom: 4px;
    }
    
    .overlay-title {
        font-size: 18px;
        margin-bottom: 6px;
        white-space: nowrap;
    }
    
    .overlay-description {
        font-size: 11px;
        margin-bottom: 10px;
        line-height: 1.3;
        min-height: 28px;
        max-height: 28px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .view-project-btn {
        padding: 8px 20px;
        font-size: 11px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    /* Services background mobile fix */
    .services {
        background-attachment: scroll !important; /* Force scroll on mobile */
        background-size: cover !important;
        background-position: center center !important;
        min-height: auto;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .service-icon-wrapper {
        width: 55px;
        height: 55px;
    }
    
    .service-icon {
        width: 45px;
        height: 45px;
    }
    
    .testimonials {
        padding: 3.2rem 1rem;
        min-height: auto; /* Allow content to define height */
        background-color: #333; /* Fallback color if image fails */
    }
    
    /* Ensure testimonials background is visible */
    .testimonials-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }
    
    .testimonials-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .why-choose-title {
        font-size: 2rem;
    }
    
    .why-choose-text,
    .why-choose-tagline {
        font-size: 1.1rem;
    }
    
    .testimonials .section-title {
        font-size: 1.8rem;
    }
    
    .quote-icon {
        font-size: 3rem;
    }
    
    .featured-text {
        font-size: 1.1rem;
    }
    
    .testimonial-avatars {
        gap: 1rem;
    }
    
    .avatar-item {
        width: 60px;
        height: 60px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .pricing-card {
        padding: 2rem;
        height: auto;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .pricing-amount {
        font-size: 2.2rem;
    }
    
    .nav {
        padding: 1rem;
    }
    
    .cta-button {
        display: none;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(254, 254, 254, 0.98) !important;
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 20px 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
        transition: all 0.3s ease-in-out;
    }
    
    .nav-links li {
        margin: 0.8rem 0;
    }
    
    .nav-links a {
        color: var(--medium-gray) !important;
        font-size: 1rem;
    }
    
    .nav-links a:hover {
        color: var(--primary-blue) !important;
    }
    
    .nav-links a::after {
        background: var(--gradient-primary) !important;
    }
    
    .nav-links.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    .mobile-menu {
        display: flex;
    }
    
    .hero {
        padding: 6rem 1rem 4rem;
        min-height: 70vh;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
    }
    
    .service-card h3 {
        font-size: 0.9rem;
    }
    
    .service-card p {
        font-size: 0.8rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .about-content,
    .contact-content,
    .booking-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .consultation-form .form-row,
    .project-form .form-row,
    .contact-form .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .booking-form,
    .booking-calendar {
        padding: 2rem;
    }
    
    .calendly-embed {
        margin-bottom: 2rem;
    }
    
    .calendly-inline-widget {
        height: 600px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .about-text h2 {
        font-size: 2.2rem;
    }

    .testimonials {
        padding: 6rem 1rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    .trust-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .trust-number {
        font-size: 2rem;
    }

    .social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Additional small mobile adjustments */
    .portfolio-grid {
        gap: 20px;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .portfolio-item {
        max-width: 100%;
    }
    
    .portfolio-overlay {
        padding: 12px;
    }
    
    .overlay-category {
        font-size: 8px;
    }
    
    .overlay-title {
        font-size: 16px;
        white-space: nowrap;
    }
    
    .overlay-description {
        font-size: 10px;
        min-height: 26px;
        max-height: 26px;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .service-icon-wrapper {
        width: 90px;
        height: 90px;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-card,
    .portfolio-item {
        margin-bottom: 1.5rem;
    }
    
    .contact-form,
    .contact-form-container,
    .booking-form,
    .booking-calendar {
        padding: 1.5rem;
    }
    
    .calendly-inline-widget {
        height: 500px !important;
    }
    
    .project-details-form {
        padding-top: 1.5rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .faq-category {
        padding: 2rem;
    }

    .faq-question {
        font-size: 1rem;
    }

    .services {
        padding: 2rem 1rem;
    }

    .portfolio {
        padding: 6rem 1rem;
    }

    .about {
        padding: 6rem 1rem;
    }

    .booking {
        padding: 6rem 1rem;
    }

    .faq {
        padding: 6rem 1rem;
    }

    .faq-category {
        padding: 1.5rem;
    }

    .contact {
        padding: 6rem 1rem;
    }

    .faq {
        padding: 6rem 1rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .faq {
        padding: 6rem 1rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .metric-number {
        font-size: 1.5rem;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
    }
    
    .trust-indicators {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .trust-item {
        padding: 1.5rem;
    }

    .social-links {
        gap: 0.5rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
    }

    .social-link svg {
        width: 20px;
        height: 20px;
    }
}
/* reset the icon links back to flex, and kill their bottom‑margin */
.social-icons .footer-social-link {
  display: flex !important;
  margin-bottom: 0 !important;
}

/* tighten up the group if you want them closer to the heading */
.social-icons {
  margin-top: 0;  /* or whatever small value you prefer */
}

/* FAQ Page Styles */
.hero-section {
    padding: 10rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--soft-white) 100%);
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.hero-section p {
    font-size: 1.3rem;
    color: var(--light-gray);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.faq {
    padding: 3.2rem 2rem 6.4rem;
    background: var(--soft-white);
    position: relative;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 2;
}

.faq-category {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 2.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.faq-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.faq-category h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--dark-gray);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-item {
    border-bottom: 1px solid rgba(100, 116, 139, 0.1);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1rem 0;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 1.1rem;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-blue);
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    color: var(--light-gray);
    line-height: 1.7;
    font-size: 1rem;
    padding: 0.5rem 0 1rem 0;
    margin: 0;
}

.cta-section {
    padding: 4.8rem 2rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--soft-white) 100%);
    text-align: center;
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
    position: relative;
    z-index: 2;
}

.cta-section p {
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.nav-links a::after {
    content: '' !important;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Remove any before pseudo-elements that might contain arrows */
.nav-links a::before {
    display: none !important;
}

/* Specifically target contact link if needed */
.nav-links a[href="#contact"]::before,
.nav-links a[href="#contact"]::after {
    display: none !important;
    content: none !important;
}

/* Remove arrows from any dropdown or special navigation items */
.nav-links .dropdown-toggle::after,
.nav-links .has-dropdown::after,
.nav-links [class*="arrow"]::after {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;  /* Increased for better touch target */
    height: 56px;  /* Increased for better touch target */
    background: var(--gradient-primary);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease;  /* Faster transition */
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    -webkit-tap-highlight-color: transparent;  /* Remove tap highlight on mobile */
    touch-action: manipulation;  /* Improve touch responsiveness */
}

.back-to-top-tooltip {
    position: absolute;
    bottom: 110%;
    right: 50%;
    transform: translateX(50%);
    background: rgba(30, 41, 59, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.back-to-top-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(30, 41, 59, 0.95);
}

.back-to-top:hover .back-to-top-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(-5px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: fadeInPulse 0.5s ease;
}

@keyframes fadeInPulse {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    50% {
        transform: translateY(0) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.back-to-top:focus {
    outline: 2px solid white;
    outline-offset: 3px;
}

.back-to-top:focus:not(:focus-visible) {
    outline: none;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

.back-to-top svg {
    color: white;
    animation: bounce 2s infinite;
}

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

/* Responsive adjustments for back to top button */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;  /* Minimum 48px for touch targets */
        height: 50px;  /* Minimum 48px for touch targets */
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    /* Hide tooltip on mobile */
    .back-to-top-tooltip {
        display: none;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 18px;
        right: 18px;
        width: 48px;  /* Maintain minimum touch target size */
        height: 48px;  /* Maintain minimum touch target size */
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}
/* =========================
   Modal Enhancements (visual-only)
   Scope: .case-study-modal *
   ========================= */
.case-study-modal .modal-content {
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(2, 6, 23, 0.35);
  overflow: hidden;
}

.case-study-modal .modal-header {
  background: linear-gradient(180deg, rgba(241,245,249,0.6), rgba(255,255,255,0));
  backdrop-filter: blur(6px);
}

.case-study-modal .modal-project-title {
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.case-study-modal .modal-project-tags {
  gap: 0.4rem;
}

.case-study-modal .modal-tag {
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(2,6,23,0.04);
}

.case-study-modal .modal-tag.primary {
  border-color: #bfdbfe;
  box-shadow: 0 1px 0 rgba(30,64,175,0.06);
}

/* Section styling for readability */
.case-study-modal .modal-body {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.case-study-modal .modal-body .case-study-section {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 1.25rem 1.25rem;
  margin: 1rem 0;
  box-shadow: 0 6px 24px rgba(2, 6, 23, 0.06);
}

.case-study-modal .modal-body .case-study-section h3 {
  position: relative;
  margin-bottom: 0.5rem;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.25;
  color: #0f172a;
}

.case-study-modal .modal-body .case-study-section h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  opacity: 0.9;
}

.case-study-modal .modal-body .case-study-section p {
  color: #475569;
  font-size: 0.975rem;
}

/* Fancy list bullets inside modal content */
.case-study-modal .modal-body ul {
  list-style: none;
  margin: 0.5rem 0 0.75rem 0;
  padding-left: 0;
}

.case-study-modal .modal-body ul li {
  position: relative;
  padding-left: 1.5rem;
  margin: 0.4rem 0;
  color: #334155;
}

.case-study-modal .modal-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Inline stat chips (non-breaking, compact) */
.case-study-modal .modal-body .project-stats {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.case-study-modal .modal-body .stat-item {
  border-right: 1px dashed rgba(2, 6, 23, 0.06);
  padding: 0 0.75rem;
}

.case-study-modal .modal-body .stat-item:last-child {
  border-right: none;
}

.case-study-modal .modal-body .stat-number {
  font-weight: 800;
}

.case-study-modal .modal-body .stat-label {
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* Images within modal */
.case-study-modal .modal-body img {
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.12);
}

/* Subtle enter/exit motion */
.case-study-modal.active .modal-content {
  animation: modalPop 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modalPop {
  from { transform: translateY(10px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .case-study-modal .modal-body .case-study-section {
    padding: 1rem 1rem;
  }
  .case-study-modal .modal-body .project-stats {
    gap: 0.5rem;
  }
}

/* Modal content enhancements: highlight lists (scoped) */
.case-study-modal .modal-highlights {
  margin: 0.5rem 0 1rem 0;
  padding-left: 1.1rem;
}
.case-study-modal .modal-highlights li {
  margin: 0.3rem 0;
  line-height: 1.4;
}

/* Modal images layout (scoped) */
.case-study-modal .project-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: start;
}
.case-study-modal .project-images img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Snippet under project title (non-invasive) */
.portfolio-overlay .overlay-snippet {
  margin: 6px 0 12px;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--medium-gray);
  max-width: 40ch;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ==============================================
   PORTFOLIO CAROUSEL STYLES (3D COVERFLOW)
   ============================================== */

/* Carousel Container - Enhanced for 3D Effect with cross-browser support */
.portfolio-carousel {
  /* Swiper arrow glyph size override */
  --swiper-navigation-size: 15px;
  max-width: 1400px;
  margin: 3rem auto;
  padding: 60px 0;
  position: relative;
  overflow: visible !important;
  /* Cross-browser perspective */
  -webkit-perspective: 1500px;
  -moz-perspective: 1500px;
  perspective: 1500px;
  /* Smooth rendering on all browsers */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Swiper Wrapper - 3D transform context with cross-browser support */
.portfolio-carousel .swiper-wrapper {
  -webkit-perspective-origin: center;
  perspective-origin: center;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

/* Individual Slides - 3D Effect with cross-browser optimization */
.portfolio-carousel .swiper-slide {
  width: 800px;
  max-width: 90vw;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  -webkit-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  -moz-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden;
  /* GPU acceleration for all browsers */
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform, opacity;
}

/* Active/Center Slide Enhancement */
.portfolio-carousel .swiper-slide-active {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  z-index: 10;
  -webkit-transform: scale(1.05);
  -moz-transform: scale(1.05);
  transform: scale(1.05);
}

/* Side Slides - Depth effect */
.portfolio-carousel .swiper-slide:not(.swiper-slide-active) {
  opacity: 0.7;
  -webkit-filter: brightness(0.85);
  filter: brightness(0.85);
}

/* Slide Content Base */
.portfolio-slide-content {
  position: relative;
  width: 100%;
  background: var(--bg-light);
}

/* Desktop View: Landing Page Screenshots - Used on ALL devices */
.desktop-view {
  display: block !important;
}

.mobile-view {
  display: none !important; /* Never show mobile view - use desktop images everywhere */
}

.portfolio-screenshot {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  /* Cross-browser image optimization */
  image-rendering: -webkit-optimize-contrast; /* Safari */
  image-rendering: -moz-crisp-edges; /* Firefox */
  image-rendering: crisp-edges; /* Standard */
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  backface-visibility: hidden;
  /* GPU acceleration */
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  transform: translateZ(0);
}

/* Lazy Loading Preloader - Hidden (images load fast with WebP) */
.swiper-lazy-preloader {
  display: none !important;
}

/* Portfolio Slide Overlay - Bottom 20% with Buttons Only */
.portfolio-slide-overlay {
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  height: 20%; /* Maximum 20% of image space */
  min-height: 70px; /* Just enough for buttons */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 70%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  padding: 0.75rem 1.5rem;
}

.portfolio-slide-content:hover .portfolio-slide-overlay {
  opacity: 1;
  pointer-events: auto;
}

.overlay-content {
  text-align: center;
  color: white;
  max-width: 100%;
  width: 100%;
}

/* Hide all text - show only buttons */
.overlay-category {
  display: none;
}

.overlay-title {
  display: none;
}

.overlay-description {
  display: none;
}

/* CTA Buttons - Only Content in Overlay */
.cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-case-study,
.btn-visit-site {
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-case-study {
  background: transparent;
  color: white;
  border-color: white;
}

.btn-case-study:hover {
  background: white;
  color: var(--primary-blue);
  transform: translateY(-2px);
}

.btn-visit-site {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.btn-visit-site:hover {
  background: var(--primary-purple);
  border-color: var(--primary-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Navigation Arrows - Original Circle Size, Small Arrows */
.swiper-button-prev,
.swiper-button-next {
  color: var(--primary-blue);
  background: white;
  width: 48px !important; /* Original size restored */
  height: 48px !important; /* Original size restored */
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important; /* Remove any default padding */
}

/* Arrow Icons - Extra small size */
.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 4px; /* Half-size arrow icons */
  font-weight: 900;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: var(--primary-blue);
  color: white;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Pagination Dots */
.swiper-pagination {
  bottom: 20px !important;
}

.swiper-pagination-bullet {
  background: var(--light-gray);
  opacity: 0.5;
  width: 10px;
  height: 10px;
  margin: 0 6px !important;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  background: var(--primary-blue);
  opacity: 1;
  width: 28px;
  border-radius: 5px;
  transform: scale(1.1);
}

/* Mobile Logo Cards (Hidden on Desktop) */
.portfolio-logo-card {
  width: 100%;
  min-height: 450px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 3rem 2rem;
}

.project-logo {
  max-width: 65%;
  max-height: 160px;
  object-fit: contain;
  margin-bottom: 2.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.mobile-overlay {
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
}

.mobile-overlay .overlay-category {
  display: inline-block;
  background: var(--primary-blue);
  color: white;
  padding: 5px 14px;
  border-radius: 18px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.mobile-overlay .overlay-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: white;
}

.cta-buttons-mobile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-case-study-mobile,
.btn-visit-site-mobile {
  padding: 12px 22px;
  border-radius: 8px;
  width: 100%;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-case-study-mobile {
  background: white;
  color: var(--primary-blue);
  border-color: white;
}

.btn-case-study-mobile:hover,
.btn-case-study-mobile:active {
  background: transparent;
  color: white;
  border-color: white;
}

.btn-visit-site-mobile {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.btn-visit-site-mobile:hover,
.btn-visit-site-mobile:active {
  background: var(--primary-purple);
  border-color: var(--primary-purple);
}

/* View All Projects Button */
.portfolio-cta {
  text-align: center;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.btn-view-all-projects {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background: var(--gradient-primary);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-view-all-projects:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
}

.btn-view-all-projects i {
  transition: transform 0.3s ease;
}

.btn-view-all-projects:hover i {
  transform: translateX(5px);
}

/* Tablet Adjustments (769px - 1024px) - Optimized for Performance */
@media (min-width: 769px) and (max-width: 1024px) {
  .portfolio-carousel {
    max-width: 1000px;
    margin: 2.5rem auto;
    padding: 50px 0;
    /* Cross-browser perspective */
    -webkit-perspective: 1500px;
    -moz-perspective: 1500px;
    perspective: 1500px;
  }

  .portfolio-carousel .swiper-slide {
    width: 650px;
    max-width: 80vw;
    will-change: transform, opacity;
    /* Cross-browser GPU acceleration */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* Ensure desktop view on tablets */
  .desktop-view {
    display: block !important;
  }

  .mobile-view {
    display: none !important;
  }

  .portfolio-screenshot {
    border-radius: 8px;
  }

  .overlay-title {
    font-size: 1.75rem;
  }

  .overlay-description {
    font-size: 1rem;
  }

  .swiper-button-prev,
  .swiper-button-next {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
  }

  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 7px;
    line-height: 1;
  }
}

/* Mobile Responsive (≤768px) - Optimized for Performance */
@media (max-width: 768px) {
  /* Use desktop view on mobile - show same images */
  .desktop-view {
    display: block !important;
  }

  .mobile-view {
    display: none !important;
  }

  .portfolio-carousel {
    max-width: 100%;
    margin: 2rem auto;
    padding: 40px 12px;
    border-radius: 0;
    /* Full perspective on mobile with cross-browser support */
    -webkit-perspective: 1500px;
    -moz-perspective: 1500px;
    perspective: 1500px;
    overflow: visible !important;
  }

  .portfolio-carousel .swiper-slide {
    width: 85vw;
    max-width: 100%;
    will-change: transform, opacity;
    /* Cross-browser GPU acceleration */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* Full 3D effects on mobile with cross-browser support */
  .portfolio-carousel .swiper-slide-active {
    -webkit-transform: scale(1.05) translateZ(0);
    -moz-transform: scale(1.05) translateZ(0);
    transform: scale(1.05) translateZ(0);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  }

  .portfolio-carousel .swiper-slide:not(.swiper-slide-active) {
    opacity: 0.7;
    -webkit-filter: brightness(0.85);
    filter: brightness(0.85);
  }

  /* Optimize images for mobile - cross-browser */
  .portfolio-screenshot {
    border-radius: 6px;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  .portfolio-logo-card {
    min-height: 420px;
    padding: 2.5rem 1.5rem;
  }

  .project-logo {
    max-width: 70%;
    max-height: 140px;
    margin-bottom: 2rem;
  }

  .mobile-overlay {
    padding: 1.5rem 1.25rem;
  }

  .mobile-overlay .overlay-title {
    font-size: 1.35rem;
  }

  .swiper-button-prev,
  .swiper-button-next {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
  }

  .swiper-button-prev::after,
  .swiper-button-next::after {
    font-size: 4px;
    line-height: 1;
  }

  .swiper-pagination {
    bottom: 15px !important;
  }

  .btn-view-all-projects {
    font-size: 1rem;
    padding: 14px 28px;
  }

  /* Ensure overlay always shows on mobile - buttons only - Optimized */
  .portfolio-slide-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
    pointer-events: auto;
    align-items: center;
    padding: 0.5rem 1rem;
    min-height: 60px;
    will-change: opacity; /* Performance optimization */
    transform: translateZ(0); /* Force GPU acceleration */
  }

  .overlay-content {
    max-width: 100%;
  }

  .cta-buttons {
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }

  .btn-case-study,
  .btn-visit-site {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
  }

  .btn-case-study i,
  .btn-visit-site i {
    display: none; /* Hide icons on mobile to save space */
  }

  /* Smooth scrolling for mobile */
  .portfolio-carousel .swiper-wrapper {
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .swiper-slide {
    transition: none;
  }

  .btn-case-study,
  .btn-visit-site,
  .btn-case-study-mobile,
  .btn-visit-site-mobile,
  .btn-view-all-projects {
    transition: none;
  }

  .swiper-lazy-preloader {
    animation: none;
  }
}

/* ==============================================
   PORTFOLIO PAGE STYLES
   ============================================== */

/* Portfolio Page Header - Hero-style with 50vh height */
.portfolio-page-header {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('img/backgrounds/services-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  text-align: center;
  color: white;
  position: relative;
  padding: 0 2rem;
  overflow: hidden;
}

/* Dark overlay (matches hero section) */
.portfolio-page-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
  pointer-events: none;
}

.portfolio-page-header .container {
  position: relative;
  z-index: 2;
}

.portfolio-page-header .page-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fefefe, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
}

.portfolio-page-header .page-subtitle {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.95;
  line-height: 1.8;
  position: relative;
  z-index: 2;
}

/* Portfolio Page Section */
.portfolio-page {
  padding: 80px 2rem;
  background: var(--bg-light);
}

/* Portfolio Page Grid */
.portfolio-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Portfolio Card */
.portfolio-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Card Image */
.card-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  position: relative;
  background: var(--bg-light);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .card-image img {
  transform: scale(1.08);
}

/* Card Content */
.card-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  display: inline-block;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--primary-blue);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card-excerpt {
  font-size: 1rem;
  color: var(--medium-gray);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: auto;
}

.btn-case-study {
  flex: 1;
  padding: 12px 20px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-case-study:hover {
  background: var(--primary-purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-visit-link {
  width: 44px;
  height: 44px;
  background: var(--bg-light);
  color: var(--primary-blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.btn-visit-link:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-2px);
}

.btn-visit-link.btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Case Study Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  background: white;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  z-index: 10000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close {
  position: sticky;
  top: 1rem;
  right: 1rem;
  float: right;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  z-index: 10001;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

.modal-body {
  padding: 3rem;
  clear: both;
}

/* Case Study Content Styles */
.case-study {
  color: var(--dark-gray);
}

.case-study-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--bg-light);
}

.case-study-category {
  display: inline-block;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--primary-blue);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.case-study-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

.case-study-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: var(--medium-gray);
  margin-bottom: 1rem;
}

.case-study-meta i {
  margin-right: 0.5rem;
  color: var(--primary-blue);
}

.case-study-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: var(--bg-light);
  color: var(--medium-gray);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.case-study-images {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.case-study-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.case-study-section {
  margin-bottom: 2.5rem;
}

.case-study-section h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

.case-study-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--medium-gray);
  margin-bottom: 1rem;
}

.case-study-section ul {
  list-style: none;
  padding: 0;
}

.case-study-section ul li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--medium-gray);
  padding: 0.5rem 0;
  padding-left: 2rem;
  position: relative;
}

.case-study-section ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: 700;
  font-size: 1.2rem;
}

.results-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-left: 0;
}

.results-list li::before {
  content: "";
  position: static;
}

.results-list i {
  color: #10b981;
  font-size: 1.3rem;
  margin-top: 0.25rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-badge {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: var(--primary-blue);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.case-study-cta {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--bg-light);
  text-align: center;
}

.btn-visit-live {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background: var(--gradient-primary);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-visit-live:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Tablet Responsive */
@media (max-width: 1024px) {
  .portfolio-page-header .page-title {
    font-size: 2.75rem;
  }

  .portfolio-page-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
  }

  .modal-body {
    padding: 2rem;
  }

  .case-study-title {
    font-size: 2rem;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .portfolio-page-header {
    min-height: 50vh;
    padding: 0 1.5rem;
  }

  .portfolio-page-header .page-title {
    font-size: 2.25rem;
  }

  .portfolio-page-header .page-subtitle {
    font-size: 1.1rem;
  }

  .portfolio-page {
    padding: 60px 1.5rem;
  }

  .portfolio-page-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-image {
    height: 200px;
  }

  .card-actions {
    flex-direction: column;
  }

  .btn-case-study {
    width: 100%;
  }

  .btn-visit-link {
    width: 100%;
  }

  .modal {
    padding: 1rem;
  }

  .modal-content {
    max-height: 95vh;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .case-study-title {
    font-size: 1.75rem;
  }

  .case-study-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-close {
    top: 0.5rem;
    right: 0.5rem;
  }
}
