/* Base Styles */
:root {
  --primary-color: #98755B; /* Light Brown */
  --primary-dark: #442913;  /* Dark Chocolate */
  --primary-light: #E2D1C2; /* Cream */
  --secondary-color: #D4B8AC; /* Sand */
  --accent-color: #5C3422;   /* Nut Brown */
  --dark-bg: #442913;        /* Dark Chocolate */
  --dark-secondary: #1e293b;
  --light-bg: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  --gradient-dark: linear-gradient(135deg, #442913 0%, #5C3422 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --border-radius: 0.75rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
}

@keyframes floatGlow {
  to {
    background-position: 18% 22%, 82% 32%, center;
  }
}

@media (prefers-reduced-motion: reduce) {
  #services::before { animation: none; }
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    scroll-behavior: smooth;
    line-height: 1.6;
    background-color: var(--light-bg);
    padding-top: 80px; /* Account for fixed navbar */
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

/* Section title underline utility */
.section-title-underline {
  display: inline-block;
  height: 4px;
  width: 64px;
  border-radius: 9999px;
  background: var(--gradient-primary);
}

.display-1, .display-2, .display-3, .display-4 {
    font-weight: 800;
    letter-spacing: -0.025em;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* 1. Navigation Customization */
#mainNav {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
}

#mainNav .navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#mainNav .navbar-brand img {
    height: 40px;
    transition: transform 0.3s ease;
}

#mainNav .navbar-brand:hover img {
    transform: scale(1.05);
}

/* Responsive logo sizing */
@media (max-width: 991.98px) {
    #mainNav .navbar-brand img {
        height: 35px;
    }
}

@media (max-width: 767.98px) {
    #mainNav .navbar-brand img {
        height: 30px;
    }
    #mainNav .navbar-brand span {
        font-size: 1.25rem;
    }
}

#mainNav .nav-link {
    position: relative;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
}

#mainNav .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

#mainNav .nav-link::after {
  content: '';
  position: absolute;
    bottom: 0.5rem;
    left: 50%;
  width: 0;
  height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#mainNav .nav-link:hover::after {
    width: 80%;
}

/* Active section underline color */
#mainNav .nav-link.active::after {
  width: 80%;
  background: var(--primary-color);
}

#mainNav .btn-outline-light {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#mainNav .btn-outline-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

#mainNav .btn-outline-light:hover::before {
    left: 0;
}

#mainNav .btn-outline-light:hover {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 2. Hero Section */
.masthead {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Ensure carousel inner fills the hero */
.masthead .carousel-inner {
    height: 100vh;
}

.masthead .carousel-item {
    height: 100vh;
}

/* Faster carousel transitions */
.carousel-fade .carousel-item {
    transition: opacity 0.5s ease-in-out; /* Reduced from default 0.6s */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
    position: relative;
}

.carousel-fade .carousel-item:not(.active) {
    opacity: 0;
}

.carousel-fade .carousel-inner {
    position: relative;
    overflow: hidden;
}

/* Carousel Progress Bar */
.carousel-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 20;
}

.carousel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(152, 117, 91, 0.5);
}

/* Image Zoom Effect */
.carousel-content {
    background-attachment: fixed;
    animation: zoomIn 3s ease-in-out infinite alternate;
}

@keyframes zoomIn {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Animated Underline Effect */
.text-with-underline {
    position: relative;
    display: inline-block;
}

.text-with-underline::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    animation: underlineExpand 1.5s ease-out 0.5s forwards;
}

@keyframes underlineExpand {
    to {
        width: 100%;
    }
}

/* Unique Center Navigation Buttons at Margins */
.carousel-center-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 15;
    pointer-events: none;
}

.carousel-btn-prev {
    margin-right: auto;
}

.carousel-btn-next {
    margin-left: auto;
}

.carousel-btn-centered {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.carousel-btn-centered:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--primary-color);
    transform: scale(1.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.carousel-btn-centered:active {
    transform: scale(0.95);
}

.carousel-btn-centered i {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@media (max-width: 768px) {
    .carousel-center-controls {
        padding: 0 20px;
    }
    
    .carousel-btn-centered {
        width: 50px;
        height: 50px;
    }
    
    .carousel-btn-centered i {
        font-size: 1.5rem;
    }
}

/* Scroll Down Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounceVertical 2s infinite;
}

@keyframes bounceVertical {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.scroll-down-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.scroll-down-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    color: white;
}

.carousel-content {
    height: 100vh;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.carousel-content .container {
    position: relative;
    z-index: 2;
    max-width: 840px;
    margin-inline: auto;
}

/* Readability overlays for hero - REMOVED for full image visibility */

.carousel-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-content .lead {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Split Carousel */
.split-carousel {
    display: flex;
    height: 100vh;
    position: relative;
}

.split-left, .split-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.split-left {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.6)), url('../img/split-1.jpg');
}

.split-right {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.8), rgba(236, 72, 153, 0.6)), url('../img/split-2.jpg');
}

.split-left h2, .split-right h2 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    animation: slideInUp 1s ease-out 0.5s forwards;
}

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

/* Video Carousel */
.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-overlay {
    position: relative;
    background: rgba(0,0,0,0.5);
    height: 100vh;
}

.video-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(68,41,19,0.55) 0%, rgba(152,117,91,0.35) 100%);
    pointer-events: none;
}

/* Parallax Carousel */
.parallax-carousel {
    height: 100vh;
    background: url('../img/parallax.jpg') no-repeat fixed center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Text Animation Carousel */
.animated-text {
    height: 100vh;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.animated-text span {
    font-size: 5rem;
    font-weight: 800;
    opacity: 0;
    animation: fadeInOut 9s infinite;
}

.animated-text span:nth-child(2) {
    animation-delay: 3s;
}

.animated-text span:nth-child(3) {
    animation-delay: 6s;
}

/* Grid Carousel */
.grid-carousel {
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
}

.grid-item {
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.grid-item:hover {
    transform: scale(1.05);
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateY(20px); }
    16.67%, 83.33% { opacity: 1; transform: translateY(0); }
}

/* Carousel Controls */
.carousel-indicators {
    z-index: 15;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    margin: 0 8px !important;
    background-color: rgba(255,255,255,0.5) !important;
}

.carousel-indicators .active {
    background-color: var(--primary-color) !important;
    width: 14px !important;
    height: 14px !important;
}

/* 3. Services Section */
.service-card {
    padding: 2rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-15px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-xl);
}

.service-card i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

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

.service-card h3 {
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    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 ease;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Brand CTA (uses yellow primary) */
.btn-brand {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: #ffffff;
    font-weight: 700;
}

.btn-brand:hover {
    filter: brightness(1.05);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-brand:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(245, 193, 31, 0.35), 0 6px 20px rgba(0,0,0,0.15);
}

/* 2a. Accessibility: Focus-visible rings */
:where(a, button, .btn, .portfolio-box, .service-card, .team-card, .testimonial-card):focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(42, 201, 255, 0.25);
}

/* Improve link focus in navbar */
#mainNav .nav-link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* 2b. Subtle hover polish for cards */
.service-card:hover,
.testimonial-card:hover,
.team-card:hover {
    box-shadow: 0 16px 32px -12px rgba(0,0,0,0.3);
}

/* 2c. Button focus states */
.btn:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(245, 193, 31, 0.35), 0 6px 20px rgba(0,0,0,0.15);
}

/* 4. Portfolio Grid (The Visual Core) */
.portfolio-box {
  position: relative;
  overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
}

.portfolio-box:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.portfolio-box img {
  transition: transform 0.6s ease;
    width: 100%;
    height: 300px;
    object-fit: cover;
}

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

.portfolio-box-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.95));
  opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.portfolio-box:hover .portfolio-box-caption {
  opacity: 1;
  transform: translateY(0);
}

.project-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.project-category {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 5. Filter Buttons */
.portfolio-section .btn-outline-dark {
    border: 2px solid var(--text-light);
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portfolio-section .btn-outline-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.portfolio-section .btn-outline-dark:hover::before,
.portfolio-section .btn-outline-dark.active::before {
    left: 0;
}

.portfolio-section .btn-outline-dark:hover,
.portfolio-section .btn-outline-dark.active {
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 6. Section Styling */
.page-section {
    position: relative;
}

.page-section.bg-dark {
    background: var(--gradient-dark) !important;
}

/* Services Section: cinematic layered background */
#services {
    position: relative;
    overflow: hidden;
    background: radial-gradient(1200px 600px at 10% 0%, rgba(152, 117, 91, 0.22), transparent 60%),
                radial-gradient(900px 500px at 90% 20%, rgba(212, 184, 172, 0.18), transparent 60%),
                linear-gradient(135deg, rgba(11, 18, 32, 0.95), rgba(11, 18, 32, 0.92));
    border-top: 1px solid transparent;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
}

#services::before {
    /* animated teal glows + vignette for contrast */
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(600px 300px at 10% 15%, rgba(152, 117, 91, 0.18), transparent 60%),
      radial-gradient(520px 280px at 90% 25%, rgba(212, 184, 172, 0.12), transparent 60%),
      radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.35) 100%);
    background-repeat: no-repeat;
    background-position: 10% 15%, 90% 25%, center;
    animation: floatGlow 22s ease-in-out infinite alternate;
}

#services::after {
    /* fine grain pattern */
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.06;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><g fill="none" stroke="%23ffffff" stroke-opacity="0.6" stroke-width="0.5"><path d="M0 60h120M60 0v120"/></g></svg>');
    background-size: 240px 240px;
}

/* 7. About Section */
#about {
    position: relative;
    overflow: hidden;
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

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

/* 8. Contact Section */
#contact {
    background: var(--light-bg);
    position: relative;
}

#contact .btn-outline-dark {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#contact .btn-outline-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

#contact .btn-outline-dark:hover::before {
    left: 0;
}

#contact .btn-outline-dark:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* 9. Footer */
footer {
    background: var(--gradient-dark) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

/* Footer logo styling */
footer img {
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

footer img:hover {
    opacity: 1;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    z-index: 1050;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.3);
}

/* Centered Back-to-Top (adaptive) */
.back-to-top {
    position: fixed;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%) scale(0.9);
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    z-index: 2000;
    border: 2px solid transparent;
    background: var(--primary-color); /* fallback */
    color: #fff;
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.back-to-top.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}

.back-to-top:hover { box-shadow: 0 16px 32px rgba(0,0,0,0.3); }

/* Adaptive contrast via blend mode */
@supports (mix-blend-mode: difference) {
  .back-to-top {
    background: rgba(0,0,0,0.18);
    color: #fff;
    border-color: rgba(255,255,255,0.85);
    mix-blend-mode: difference;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: none; /* avoid odd blending of shadows */
  }
  .back-to-top:hover { box-shadow: none; }
}

@media (max-width: 480px) {
  .back-to-top { width: 52px; height: 52px; bottom: 70px; }
}

.back-to-top i { font-size: 1.25rem; line-height: 1; }

/* 10. Responsive Design */
@media (max-width: 768px) {
    .carousel-content h1 {
        font-size: 2.5rem;
    }
    
    .carousel-content .lead {
        font-size: 1.1rem;
    }
    
    .service-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .split-carousel {
        flex-direction: column;
    }
    
    .split-left, .split-right {
        height: 50vh;
    }
}

/* 11. Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 12. Testimonials Section */
.testimonial-card {
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.testimonial-text {
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.author-title {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* 13. Team Section */
.team-card {
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.team-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.team-image {
    width: 120px;
    height: 120px;
    border-radius: 0;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin: 0 auto;
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* 14. Contact Form */
.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.contact-form .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.contact-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 15. Portfolio Modal Enhancements */
.project-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* 16. Enhanced Button Styles */
.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 17. Statistics Counter Animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-number {
    animation: countUp 0.8s ease-out;
}

/* 18. Enhanced Responsive Design */
@media (max-width: 768px) {
    .testimonial-card,
    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }
    
    .team-image {
        width: 100px;
        height: 100px;
    }
    
    .author-image {
        width: 50px;
        height: 50px;
    }
    
    .contact-item {
        padding: 0.75rem 0;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
}

/* 19. Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Service Section Styles */
.service-item {
    transition: all 0.3s ease;
}

.service-item.show {
    animation: fadeIn 0.5s ease forwards;
}

.service-card {
    padding: 2rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

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

/* Button Styles */
.btn-outline-light.active {
    background-color: var(--bs-light);
    color: var(--bs-dark);
}