/* ==========================================================================
   Table of Contents
   ==========================================================================
   1. Global Styles & Variables
   2. Utility Classes
   3. Header & Navigation
   4. Hero Section
   5. Section Defaults & Titles
   6. Services Section
   7. About / Why Us Section
   8. Industry Specific Section
   9. Testimonials Section
   10. Interactive Calculator Section
   11. CTA Section
   12. Footer
   13. Page-Specific Styles (Contact, Legal)
   14. Animations & Keyframes
   15. Live Chat Widget
   16. Responsive Design (Media Queries)
   ========================================================================== */

/* ======================= 1. Global Styles & Variables ======================= */
:root {
    --primary-color: #4A90E2; /* Vibrant Blue */
    --secondary-color: #50E3C2; /* Teal/Mint Green */
    --dark-bg: #1A202C; /* Dark Blue-Gray */
    --light-bg: #F7FAFC; /* Very Light Gray */
    --text-dark: #2D3748;
    --text-light: #E2E8F0;
    --text-muted: #A0AEC0;
    --border-color: #E2E8F0;
    --white-color: #FFFFFF;
    --header-height: 80px;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Roboto:wght@400;500&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
p {
    font-family: var(--font-secondary);
    margin-bottom: 1rem;
    color: #4A5568;
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* ======================= 2. Utility Classes ======================= */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #357ABD;
    border-color: #357ABD;
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--dark-bg);
    border-color: var(--dark-bg);
    color: var(--white-color);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.text-center {
    text-align: center;
}

/* ======================= 3. Header & Navigation ======================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    height: var(--header-height);
    transition: background-color 0.4s ease, box-shadow 0.4s ease, height 0.4s ease;
}

.site-header.scrolled {
    background-color: var(--dark-bg);
    box-shadow: var(--shadow-md);
    height: 70px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: block;
}

.logo img {
    height: 50px;
    transition: height 0.3s ease;
}

.site-header.scrolled .logo img {
    height: 35px;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--white-color);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    padding: 10px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ======================= 4. Hero Section ======================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);
    background: linear-gradient(to right, rgba(26, 32, 44, 0.9), rgba(45, 55, 72, 0.8)), url('../hero-bg.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: var(--text-light);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-buttons .btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--dark-bg);
}
.hero-buttons .btn-primary:hover {
    background-color: #3dd6b0;
    border-color: #3dd6b0;
    box-shadow: 0 10px 20px rgba(80, 227, 194, 0.3);
}

.hero-buttons .btn-secondary {
    color: var(--white-color);
    border-color: var(--white-color);
}
.hero-buttons .btn-secondary:hover {
    background-color: var(--white-color);
    color: var(--dark-bg);
}

/* 3D Animated Background */
.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.cube {
    position: absolute;
    top: 80vh;
    left: 45vw;
    width: 10px;
    height: 10px;
    border: solid 1px var(--secondary-color);
    transform-origin: top left;
    transform: scale(0) rotate(0deg) translate(-50%, -50%);
    animation: cube-animation 12s ease-in-out forwards infinite;
}

.cube:nth-child(2) {
    animation-delay: 2s;
    left: 25vw;
    top: 40vh;
}
.cube:nth-child(3) {
    animation-delay: 4s;
    left: 75vw;
    top: 50vh;
}
.cube:nth-child(4) {
    animation-delay: 6s;
    left: 90vw;
    top: 10vh;
}
.cube:nth-child(5) {
    animation-delay: 8s;
    left: 10vw;
    top: 85vh;
}
.cube:nth-child(6) {
    animation-delay: 10s;
    left: 50vw;
    top: 10vh;
}

/* ======================= 5. Section Defaults & Titles ======================= */
section {
    padding: 100px 0;
}

.section-title {
    margin-bottom: 60px;
}
.section-title .subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 3rem;
    color: var(--text-dark);
}

.section-title p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #4A5568;
}

/* ======================= 6. Services Section ======================= */
.services-section {
    background-color: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: transparent;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 320px;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.service-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    background-color: var(--white-color);
    padding: 40px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--primary-color), #3a7cc4);
    color: var(--white-color);
}

.card-back h3, .card-back ul li {
    color: var(--white-color);
}
.card-back p {
    color: var(--text-light);
}

.card-back ul {
    margin: 20px 0;
    text-align: left;
    padding-left: 20px;
    list-style-type: disc;
}

.card-back ul li {
    margin-bottom: 10px;
}

.card-back .btn-small {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
    border-color: var(--secondary-color);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(80, 227, 194, 0.4);
}

.service-icon svg {
    width: 30px;
    height: 30px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
}


/* ======================= 7. About / Why Us Section ======================= */
.about-section {
    background-color: var(--white-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text .section-title {
    text-align: left;
}

.about-text .section-title p {
    margin-left: 0;
}

.stats-counter {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-item p {
    font-weight: 600;
    color: var(--text-dark);
}

.image-3d-container {
    position: relative;
    perspective: 1500px;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
    transform: rotateX(10deg) rotateY(-15deg) rotateZ(3deg);
}

.about-image:hover img {
    transform: rotate(0);
}

/* ======================= 8. Industry Specific Section ======================= */
.industry-section {
    background-color: var(--light-bg);
}

.industry-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-link {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--white-color);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.tab-link.active {
    background-color: var(--dark-bg);
    color: var(--white-color);
    border-color: var(--dark-bg);
    box-shadow: 0 5px 10px rgba(26, 32, 44, 0.2);
}

.tab-content {
    display: none;
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--secondary-color);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.tab-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.tab-content ul {
    list-style: none;
    padding-left: 0;
}

.tab-content ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

.tab-content ul li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* ======================= 9. Testimonials Section ======================= */
.testimonials-section {
    background: linear-gradient(rgba(26, 32, 44, 0.9), rgba(26, 32, 44, 0.9)), url('../testimonial-bg.jpg') no-repeat center center/cover;
    color: var(--white-color);
}

.testimonials-section .section-title h2 {
    color: var(--white-color);
}

.testimonials-section .section-title .subtitle,
.testimonials-section .section-title p {
    color: var(--secondary-color);
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    height: 350px; /* Fixed height for slider */
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    transform: translateX(100%);
}

.testimonial-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.testimonial-slide.prev {
    transform: translateX(-100%);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--secondary-color);
    margin-bottom: 20px;
}

.testimonial-quote {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 20px;
    max-width: 90%;
}

.testimonial-author {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.testimonial-company {
    color: var(--text-muted);
}

.slider-controls {
    text-align: center;
    margin-top: 30px;
}

.slider-controls button {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background: var(--secondary-color);
    color: var(--dark-bg);
}

/* ======================= 10. Interactive Calculator Section ======================= */
.calculator-section {
    background-color: var(--light-bg);
}

.calculator-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white-color);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

#estimate-calculator .form-group {
    margin-bottom: 25px;
}

#estimate-calculator label {
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-group input[type="checkbox"] {
    display: none;
}

.checkbox-group label {
    display: block;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.checkbox-group input[type="checkbox"]:checked + label {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    box-shadow: 0 5px 10px rgba(74, 144, 226, 0.2);
}

#estimate-calculator select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.calculator-result {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
    text-align: center;
}

.calculator-result h4 {
    margin-bottom: 10px;
}

#total-estimate {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* ======================= 11. CTA Section ======================= */
.cta-section {
    background: var(--primary-color);
    color: var(--white-color);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

.cta-content .btn {
    background-color: var(--white-color);
    color: var(--primary-color);
    border-color: var(--white-color);
}

.cta-content .btn:hover {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
    border-color: var(--secondary-color);
}

/* ======================= 12. Footer ======================= */
.site-footer {
    background-color: var(--dark-bg);
    color: var(--text-muted);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-column h4 {
    color: var(--white-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-logo img {
    height: 45px;
    margin-bottom: 20px;
}

.footer-column.about p {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-column.links ul li {
    margin-bottom: 10px;
}

.footer-column.links a {
    color: var(--text-muted);
}
.footer-column.links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-column.contact p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-column.contact i {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-top: 4px;
}

/* Custom Icons */
[class^="icon-"], [class*=" icon-"] {
    font-family: 'icons' !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.icon-location:before { content: "📍"; }
.icon-phone:before { content: "📞"; }
.icon-email:before { content: "✉️"; }

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #4A5568;
    background-color: #2D3748;
    color: var(--white-color);
    border-radius: 5px 0 0 5px;
    outline: none;
}

.newsletter-form button {
    padding: 10px 15px;
    border: none;
    background-color: var(--primary-color);
    color: var(--white-color);
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background-color: var(--secondary-color);
    color: var(--dark-bg);
}

.footer-bottom {
    border-top: 1px solid #4A5568;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ======================= 13. Page-Specific Styles ======================= */
/* Hero for internal pages */
.page-hero {
    background: var(--dark-bg);
    padding: 160px 0 80px;
    text-align: center;
    color: var(--white-color);
}
.page-hero h1 {
    font-size: 3rem;
}
.page-hero p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Contact Page */
.contact-page-section {
    padding: 100px 0;
}
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}
.contact-form .form-row {
    display: flex;
    gap: 20px;
}
.contact-form .form-group {
    flex: 1;
    margin-bottom: 20px;
    position: relative;
}
.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}
.contact-form .error-message {
    color: #e53e3e;
    font-size: 0.8rem;
    position: absolute;
    bottom: -18px;
    left: 0;
}
.contact-form input.invalid,
.contact-form textarea.invalid {
    border-color: #e53e3e;
}
#form-status {
    margin-top: 20px;
    font-weight: 600;
}

.contact-info-wrapper h2 {
    margin-bottom: 20px;
}
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}
.contact-info-item i {
    font-size: 2rem;
    color: var(--primary-color);
}
.contact-info-item h4 {
    margin-bottom: 5px;
}
.contact-info-item p {
    margin-bottom: 0;
    color: var(--text-muted);
}

/* Legal Pages */
.legal-content-section {
    padding: 80px 0;
}
.legal-content-section .container {
    max-width: 800px;
}
.legal-content-section h2 {
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}
.legal-content-section ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}
.legal-content-section ul li {
    margin-bottom: 10px;
}

/* ======================= 14. Animations & Keyframes ======================= */
/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in-up {
    transform: translateY(50px);
}
.slide-in-left {
    transform: translateX(-50px);
}
.slide-in-right {
    transform: translateX(50px);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cube-animation {
    from {
        transform: scale(0) rotate(0deg) translate(-50%, -50%);
        opacity: 1;
    }
    to {
        transform: scale(20) rotate(960deg) translate(-50%, -50%);
        opacity: 0;
    }
}

/* ======================= 15. Live Chat Widget ======================= */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.chat-button {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}
.chat-button:hover {
    transform: scale(1.1);
}
.chat-button svg {
    width: 30px;
    height: 30px;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: var(--white-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-widget.open .chat-window {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.chat-header {
    background: var(--dark-bg);
    color: var(--white-color);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.close-chat {
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 20px;
    height: 250px;
    overflow-y: auto;
}
.bot-message {
    background: var(--light-bg);
    padding: 10px 15px;
    border-radius: 15px 15px 15px 0;
    display: inline-block;
    max-width: 80%;
}

.chat-footer {
    display: flex;
    border-top: 1px solid var(--border-color);
}
.chat-footer input {
    flex-grow: 1;
    border: none;
    padding: 15px;
    outline: none;
}
.chat-footer button {
    background: var(--primary-color);
    color: var(--white-color);
    border: none;
    padding: 0 20px;
    cursor: pointer;
}

/* ======================= 16. Responsive Design ======================= */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    .hero h1 { font-size: 3.5rem; }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-text .section-title { text-align: center; }
    .about-text .section-title p, .about-text .stats-counter {
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }
    .about-image { order: -1; margin-bottom: 40px; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --header-height: 70px; }
    .site-header.scrolled { height: 60px; }
    .logo img { height: 35px; }
    .site-header.scrolled .logo img { height: 30px; }

    /* Mobile Navigation */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--dark-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
    }
    .main-nav.open {
        right: 0;
    }
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .main-nav a { font-size: 1.5rem; }
    .header-cta { display: none; }
    
    .menu-toggle { display: block; }
    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    section { padding: 80px 0; }

    .hero { min-height: 600px; height: auto; padding: 150px 0; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1.1rem; }
    .hero-buttons { flex-direction: column; }
    
    .stats-counter { gap: 20px; }
    .stat-number { font-size: 2.5rem; }

    .industry-tabs { gap: 10px; }
    .tab-link { padding: 10px 20px; font-size: 0.9rem; }
    
    .checkbox-group { grid-template-columns: 1fr; }
    .contact-form .form-row { flex-direction: column; gap: 0; }
    
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-column.about p { max-width: 350px; margin: 0 auto; }
    .footer-column.contact p { justify-content: center; }
    .newsletter-form { max-width: 350px; margin: 0 auto; }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .hero h1 { font-size: 2.2rem; }
    
    .service-card {
        /* Disable 3D flip on small screens for better UX */
        min-height: 300px;
    }
    .service-card:hover .card-inner {
        transform: none;
    }
    .card-back {
        display: none;
    }
    
    .calculator-wrapper { padding: 30px 20px; }
    .chat-widget { right: 15px; bottom: 15px; }
    .chat-window { width: calc(100vw - 30px); }
}