:root {
    /* Color Palette (Professional Custom Greenish-Teal Theme) */
    --primary: 171 25% 30%;   /* Main color: Darker teal */
    --primary-dark: 171 35% 15%; /* Even darker for hover states and deeper tones */
    --primary-light: 171 10% 90%; /* Very light for backgrounds: #E8F0F0 */
    --secondary: 210 10% 55%; /* A neutral grey for secondary elements: #7F8791 */
    --accent: 30 70% 55%;    /* A warm, complementary muted orange/gold: #CC9933 */
    --text-dark: 210 20% 18%; /* Almost black for primary text: #252F3C */
    --text-light: 210 10% 45%; /* Lighter grey for secondary text: #6E7B8B */
    --background: 210 5% 98%; /* A clean, very light grey background: #F8F9F9 */
    --white: 0 0% 100%;       /* #FFFFFF */
    --success: 142 76% 36%;   /* #38A169 (remains) */
    --danger: 0 84% 60%;      /* #E53E3E (remains) */
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --section-padding: 6rem; /* Using rem for better scaling */
    --border-radius: 12px;
    --border-radius-lg: 20px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: hsl(var(--text-dark));
    background-color: hsl(var(--background));
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: hsl(var(--text-dark));
}

.display-4, .display-5 {
    font-weight: 700;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
}

/* Custom Bootstrap Overrides */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    padding: 12px 24px;
}

.btn-primary {
    background-color: hsl(var(--primary));
    border: none;
    box-shadow: var(--shadow-sm);
}

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

.btn-outline-light {
    color: hsl(var(--white));
    border-color: hsl(var(--white));
}

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

.bg-primary {
    background-color: hsl(var(--primary)) !important;
    color: hsl(var(--white));
}

/* Navigation */
.navbar {
    background: hsl(var(--primary)) !important;
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    justify-content: flex-start;
}

.navbar-brand {
    /* Removed margin-right to reduce gap directly before navbar-nav */
}

.navbar-brand h1 {
    color: white;
    margin: 0;
}

.navbar-brand img, .navbar-brand picture {
    /* Removed temporary border for debugging */
}

.navbar-nav {
    margin-left: 2rem; /* Add controlled space after logo */
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 15px;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: hsl(var(--accent));
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background-color: hsl(58, 36%, 73%); /* Color for tagline frame (D2D0A0) */
    height: auto;
    min-height: 400px; /* Adjust min-height as needed */
    display: flex;
    align-items: center;
    position: relative;
    text-align: center;
    padding: 8rem 0; /* Adjust padding for visual balance */
}

.hero-background {
    display: none; /* Ensure background image is not displayed */
}

.hero-img {
    display: none; /* Ensure background image is not displayed */
}

.hero-overlay {
    background: none; /* Remove overlay gradient */
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator i {
    font-size: 1.5rem;
    opacity: 0.8;
}

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

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

.hidden-on-load {
    opacity: 0;
}

.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.bounce {
    animation: bounce 2s infinite;
}

/* Section Styles */
.section-bg {
    background-color: hsl(var(--background));
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.section-header p.lead {
    font-size: 1.25rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--secondary)));
    border-radius: 2px;
    margin: 1rem 0;
}

/* Team Card */
.team-card {
    border: none;
    transition: var(--transition);
}

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

.team-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 4px solid hsl(var(--background));
}

/* Service Cards */
.service-card {
    background: hsl(var(--white));
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid hsl(var(--primary-light));
    opacity: 0; /* Ensures cards are hidden by default */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background-color: hsl(var(--primary-light));
}

.service-icon {
    color: hsl(var(--primary));
    background-color: hsl(var(--primary-light));
    border-radius: var(--border-radius);
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem auto;
    transition: var(--transition);
}

.service-icon i {
    font-size: 2.2rem;
    color: hsl(var(--primary));
}

.service-card:hover .service-icon {
    background-color: hsl(var(--primary));
}

.service-card:hover .service-icon i {
    color: hsl(var(--white));
}

/* Case Study Cards */
.case-study-card {
    background: hsl(var(--white));
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid hsl(var(--primary-light));
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.case-image {
    height: 250px;
    overflow: hidden;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.case-study-card:hover .case-image img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.case-content {
    padding: 2rem;
}

/* Testimonials */
.testimonial-carousel {
    position: relative;
    max-width: none; /* Allow full width for scrolling */
    margin: 0 auto;
    display: flex;
    overflow-x: auto; /* Enable horizontal scrolling */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 1rem; /* Space for scrollbar */
}

.testimonial-carousel::-webkit-scrollbar {
    height: 8px;
}

.testimonial-carousel::-webkit-scrollbar-thumb {
    background-color: hsl(var(--primary-light));
    border-radius: 10px;
}

.testimonial-carousel::-webkit-scrollbar-track {
    background-color: hsl(var(--background));
}

.testimonial-card {
    background: hsl(var(--white));
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    flex: 0 0 100%; /* Ensure each card takes full width of carousel */
    margin-right: 1.5rem; /* Space between cards */
    scroll-snap-align: start; /* Snap to start of card */
    position: relative;
    opacity: 1; /* Ensures cards are visible by default */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.testimonial-card:last-child {
    margin-right: 0;
}

.testimonial-card.active {
    /* This class is now primarily for initial state if needed for first card */
    /* Removed display: block as it's no longer needed for cycling and conflicts with flex */
    /* Removed animation for simplicity and to prevent conflicts with scroll animation */
    background-color: hsl(var(--primary)); /* Keep styling */
    color: hsl(var(--white)); /* Keep styling */
    transform: scale(1.02); /* Keep styling */
    box-shadow: var(--shadow-lg); /* Keep styling */
}

.quote-icon {
    font-size: 3rem;
    color: hsl(var(--accent));
    opacity: 0.2;
    position: absolute;
    top: 20px;
    left: 20px;
}

.testimonial-text {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: hsl(var(--text-dark));
    font-style: italic;
}

.testimonial-author {
    border-top: 1px solid hsl(var(--primary-light));
    padding-top: 1.5rem;
}

/* Contact Form */
.contact-form-card {
    background: hsl(var(--white));
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.form-control {
    border: 2px solid hsl(var(--primary-light));
    border-radius: var(--border-radius);
    padding: 12px 16px;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 0.25rem hsla(var(--primary), 0.25);
}

.form-label {
    font-weight: 500;
    color: hsl(var(--text-dark));
    margin-bottom: 0.5rem;
}

.contact-info-card {
    background: hsl(var(--white));
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.contact-info-card a {
    color: hsl(var(--text-dark)); /* Default link color within card */
    text-decoration: none; /* Ensure no default underline */
    transition: color 0.3s ease; /* Smooth transition for color change */
}

.contact-info-card a:hover {
    color: hsl(var(--primary)); /* Match the primary theme color on link hover */
    text-decoration: underline; /* Add underline on link hover for better UX */
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background-color: hsl(var(--primary));
    color: hsl(var(--white));
}

.contact-info-card:hover .text-primary i {
    color: hsl(var(--white)) !important;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
}

.alert-success {
    background-color: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
}

.alert-danger {
    background-color: hsl(var(--danger) / 0.1);
    color: hsl(var(--danger));
}

/* Footer */
footer {
    background: linear-gradient(135deg, hsl(var(--primary-dark)), hsl(var(--primary))) !important;
}

/* Utility Classes */
.smooth-scroll {
    transition: var(--transition);
}

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

.z-2 {
    z-index: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        height: auto;
        min-height: 400px;
        padding-top: 80px;
        padding-bottom: 80px;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-content p.lead {
        font-size: 1rem;
        margin-bottom: 2rem !important;
    }

    .hero-content .btn {
        width: auto;
        display: inline-block;
        margin: 0 0.5rem 1rem 0.5rem;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }

    .section-header p.lead {
        font-size: 1.1rem;
    }

    .service-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-form-card {
        padding: 2rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    .team-photo {
        width: 100px;
        height: 100px;
    }

    .navbar-brand h1 {
        font-size: 1.2rem;
    }

    .navbar-brand small {
        font-size: 0.7rem;
    }

    .navbar-nav .nav-link {
        margin: 5px 0;
        text-align: center;
    }

    .section-padding {
        padding: 4rem 0;
    }

    h1, h2, h3, h4, h5, h6 {
        font-size: 1.8rem;
    }

    .display-4, .display-5 {
        font-size: 2.2rem;
    }

    .lead {
        font-size: 1rem;
    }

    .contact-info-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 300px;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto 1rem;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .contact-info-card {
        padding: 1.5rem;
    }

    .contact-form-card {
        padding: 1.5rem;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .navbar-brand h1 {
        font-size: 1rem;
    }

    .navbar-brand small {
        display: none;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p.lead {
        font-size: 1rem;
    }

    .service-card {
        padding: 1.2rem;
    }

    .case-image {
        height: 200px;
    }

    .team-card {
        padding: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.9rem;
    }

    h1, h2, h3, h4, h5, h6 {
        font-size: 1.5rem;
    }

    .display-4, .display-5 {
        font-size: 1.8rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .section-padding {
        padding: 2.5rem 0;
    }

    .navbar-brand h1 {
        font-size: 0.9rem;
    }

    .navbar-brand small {
        display: none;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .scroll-indicator,
    .btn,
    footer {
        display: none !important;
    }
    
    .hero-section {
        height: auto;
        padding: 2rem 0;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

.section-separator {
    width: 100%;
    height: 1px;
    background-color: hsl(var(--primary-light));
    margin: 4rem auto;
    max-width: 90%;
}
