:root {
    /* Colors */
    --primary: #0077be;
    --secondary: #00b894;
    --accent: #ffd700;
    --dark: #1a1a2e;
    --light: #f8f9fb;
    --gray: #555;
    --white: #ffffff;

    /* UI Elements */
    --radius: 12px;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------------------
   1.2 Global Resets & Base Typography
------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* -------------------------------------------------------------------
   1.3 Container & Layout Helpers
------------------------------------------------------------------- */
main {
    /* Offset for fixed header */
    padding-top: 70px;
}

section {
    padding: 6rem 5%;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}


/* ===================================================================
   2.0 REUSABLE COMPONENTS
=================================================================== */

/* -------------------------------------------------------------------
   2.1 Section Headings
------------------------------------------------------------------- */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 4rem;
    color: var(--gray);
    font-size: 1.1rem;
}

/* -------------------------------------------------------------------
   2.2 Buttons (CTA)
------------------------------------------------------------------- */
/* Base styles for CTA buttons */
.cta-btn {
    display: inline-block;
    padding: 1.1rem 2.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

/* Primary Accent Variant (Yellow) */
.cta-btn.primary-accent {
    background: var(--accent);
    color: var(--dark);
}

.cta-btn.primary-accent:hover {
    background: var(--secondary);
    color: var(--white);
}

/* Secondary Outline Variant (White) */
.cta-btn.secondary-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    margin-left: 1rem;
}

.cta-btn.secondary-outline:hover {
    background: var(--white);
    color: var(--primary);
}

/* Navigation Button */
.cta-nav {
    padding: .6rem 1.4rem;
    background: var(--primary);
    color: white !important;
    border-radius: 10px;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.95rem;
}

.cta-nav:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 190, .3);
}

/* To prevent underline effect from nav links */
.cta-nav::after {
    display: none !important;
}

/* -------------------------------------------------------------------
   2.3 Service Cards (with Image Version)
------------------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.services-detailed .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.service-card {
    position: relative;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    overflow: hidden;
    transition: var(--transition);
    padding-top: 0; /* Adjusted for image */
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Image container */
.service-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-bottom: 1.5rem;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--transition);
}

.service-card:hover .service-card-image img {
    transform: scale(1.1);
}

/* Image overlay gradient */
.service-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-card-image::after {
    opacity: 1;
}

/* Icon styling */
.service-card .material-icons-outlined {
    position: relative;
    z-index: 2;
    width: 70px;
    height: 70px;
    line-height: 70px;
    font-size: 3.5rem;
    margin: -3rem auto 0; /* Pulls icon up over the image */
    background: white;
    color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.service-card:hover .material-icons-outlined {
    color: var(--secondary);
    transform: scale(1.1);
}

/* Content styling */
.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin: 1rem 0 0.8rem;
    padding: 0 1.5rem;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--gray);
    padding: 0 1.5rem 1.5rem;
}


/* -------------------------------------------------------------------
   2.4 Pricing Cards
------------------------------------------------------------------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 2rem;
    background: var(--light);
    border: 2px solid #e8e8e8;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.1);
}

.pricing-card.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 0.3rem 0.8rem;
    background: var(--accent);
    color: var(--dark);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
}

.pricing-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray);
}

.pricing-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.pricing-card ul {
    list-style: none;
    margin: 0 0 2rem;
    flex-grow: 1;
    text-align: left;
}

.pricing-card ul li {
    position: relative;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
}

.pricing-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

.cta-price {
    display: block;
    padding: 0.9rem 1.5rem;
    font-weight: 600;
    border: 2px solid var(--primary);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.cta-price:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 190, 0.3);
}

.pricing-card:not(.popular) .cta-price {
    background: transparent;
    color: var(--primary);
}

.pricing-card:not(.popular) .cta-price:hover {
    background: var(--primary);
    color: white;
}

.pricing-card.popular .cta-price {
    background: var(--primary);
    color: white;
}

.pricing-card.popular .cta-price:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

/* -------------------------------------------------------------------
   2.5 Testimonial (Review) Cards
------------------------------------------------------------------- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.review {
    position: relative;
    padding: 2rem;
    background: var(--light);
    border: 2px solid #e8e8e8;
    border-radius: var(--radius);
    transition: var(--transition);
}

.review:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.review .stars {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.review p {
    font-style: italic;
    color: var(--dark);
    margin-bottom: 1rem;
}

.review-author {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}


/* ===================================================================
   3.0 LAYOUT & NAVIGATION
=================================================================== */

/* -------------------------------------------------------------------
   3.1 Header & Main Navigation
------------------------------------------------------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2%;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform .3s ease, opacity .3s ease;
}

header.hide {
    transform: translateY(-100%);
    opacity: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.logo img {
    height: 40px;
}
.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.logo-text span {
  color: var(--secondary);
}

.logo-text small {
  display: block;
  font-size: 0.7rem;
  color: var(--gray);
  letter-spacing: 1px;
  margin-top: 0; /* remove gap */
  line-height: 1; /* tighten spacing vertically */
  text-transform: uppercase;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    position: relative;
    font-weight: 600;
    font-size: .95rem;
    color: var(--dark);
    padding: .5rem 0;
    transition: var(--transition);
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--primary);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: transparent;
}

.burger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}


/* -------------------------------------------------------------------
   3.2 Page Headers & Hero Section
------------------------------------------------------------------- */
/* Base class for all page headers */
.page-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 0 5%;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

/* Common overlay for all headers */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.7), rgba(0, 119, 190, 0.8));
    opacity: 0.9;
    z-index: 1;
}

/* Common content container */
.header-content {
    position: relative;
    max-width: 900px;
    z-index: 2;
    animation: fadeUp 1s ease-out;
}

/* Common typography for all headers */
.page-header h1 {
    font-size: clamp(2.8rem, 5.5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

/* Home Page Hero specifics */
.hero {
    min-height: calc(100vh - 70px);
    background-image: url('../images/xyzsol.jpeg'); /* Make sure path is correct */
}

.hero::before {
    background: linear-gradient(135deg, rgba(0, 119, 190, 0.8), rgba(0, 184, 148, 0.85));
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* -------------------------------------------------------------------
   3.3 Footer
------------------------------------------------------------------- */
footer {
    padding: 5rem 5% 2rem;
    background: #111;
    color: #ccc;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 1.5rem;
}

.footer-col p,
.footer-col a {
    display: block;
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 0.8rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #333;
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid #333;
}


/* ===================================================================
   4.0 PAGE-SPECIFIC SECTIONS
=================================================================== */

/* -------------------------------------------------------------------
   4.1 About Section
------------------------------------------------------------------- */
#about {
    background: var(--light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.about-text strong {
    color: var(--primary);
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
}




/* ===================================================================
   5.0 CHATBOT WIDGET
=================================================================== */

/* -------------------------------------------------------------------
   5.1 Toggler Button
------------------------------------------------------------------- */
.chatbot-toggler {
    position: fixed;
    bottom: 30px;
    right: 35px;
    width: 65px;
    height: 65px;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: scale(0.5);
    animation: popIn 0.5s 1s ease forwards;
}

.chatbot-toggler:hover {
    background: var(--secondary);
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}



/* -------------------------------------------------------------------
   5.5 Quick Replies & Composer
------------------------------------------------------------------- */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.quick-reply {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.quick-reply:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 119, 190, 0.2);
}

.chat-composer {
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-composer input {
    flex-grow: 1;
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    background: white;
    border: none;
    border-radius: 25px;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.chat-composer input:focus {
    box-shadow: 0 0 0 3px rgba(0, 119, 190, 0.2);
}

.chat-composer button {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.chat-composer button:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

/* -------------------------------------------------------------------
   5.6 Typing Indicator
------------------------------------------------------------------- */
.typing-indicator {
    padding: 0 1.5rem 0.5rem;
}

.typing-indicator span {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 3px;
    background: #999;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.5);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.hidden { display: none; }


/* ===================================================================
   6.0 RESPONSIVE STYLES
=================================================================== */

/* -------------------------------------------------------------------
   6.1 Tablet (max-width: 992px)
------------------------------------------------------------------- */
@media (max-width: 992px) {
    /* Mobile Navigation */
    .burger {
        display: flex;
        z-index: 1001; /* Ensure it's above other header content */
        border: none; /*no border around*/
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 0;
        background: white;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        transform-origin: top;
        transition: var(--transition);
        /* Initial hidden state */
        transform: translateY(-20px) scaleY(0.9);
        opacity: 0;
        pointer-events: none;
    }

    nav.active {
        transform: translateY(0) scaleY(1);
        opacity: 1;
        pointer-events: auto;
    }

    nav a {
        padding: 1rem 5%;
        text-align: center;
    }

    nav a::after {
        display: none;
    }

    .cta-nav {
        margin: 1rem 5% 0.5rem;
        text-align: center;
    }

    /* Layout Grids */
    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        margin-top: 2rem;
    }
}

/* -------------------------------------------------------------------
   6.2 Mobile (max-width: 768px)
------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Header & Section Padding */
    header { height: 60px; }
    main { padding-top: 60px; }
    section { padding: 4rem 5%; }

    /* Typography */
    .section-title { font-size: 2rem; }
    .page-header h1 { font-size: 2.5rem; }
    .page-header p { font-size: 1.15rem; }

    /* Hero Section */
    .hero {
        min-height: 70vh;
        padding: 2rem 1.5rem;
    }

    /* CTA Buttons */
    .cta-btn {
        display: block;
        width: 100%;
        margin: 0.8rem 0;
    }
    .cta-btn.secondary-outline {
        margin-left: 0;
    }

    /* Service Card Images */
    .service-card-image { height: 160px; }
    .service-card .material-icons-outlined {
        width: 60px;
        height: 60px;
        line-height: 60px;
        font-size: 2.5rem;
        margin-top: -2.5rem;
    }
    
    /* Layout Grids */
    .services-grid,
    .pricing-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Form */
    .contact-grid { gap: 2rem; }
    .contact-info { margin-bottom: 2rem; }
    .input-group { grid-template-columns: 1fr; }
    form { padding: 2rem 1.5rem; }
}