/*
================================================
PRIME SHARD THEME - styles.css
================================================
Table of Contents:
1.  Root Variables & Global Styles
2.  Preloader
3.  Header & Navigation
4.  Buttons & Common Elements
5.  Hero Section
6.  Section Styling (Headers, Padding)
7.  Services Section (3D Flip Cards)
8.  About Section (Shards & Stats)
9.  Process Section (Timeline)
10. ROI Calculator Section
11. Testimonials Section (Slider)
12. CTA Section
13. Footer
14. Page Specific Styles (Contact, Legal)
15. Helper Components (Back to Top, Live Chat, Popup)
16. Animation Keyframes & Scroll Animations
17. Media Queries (Responsiveness)
================================================
*/

/* 1. Root Variables & Global Styles
------------------------------------------------ */
:root {
    --color-primary: #00f2ff;
    --color-primary-dark: #00b8c2;
    --color-secondary: #8e44ad;
    --color-background: #0a0e1a;
    --color-surface: #141a2e;
    --color-surface-light: rgba(26, 35, 61, 0.7);
    --color-text: #e0e0e0;
    --color-text-muted: #a0a0b0;
    --color-border: rgba(0, 242, 255, 0.2);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Orbitron', sans-serif;
    --header-height: 80px;
    --shadow-glow: 0 0 15px rgba(0, 242, 255, 0.3), 0 0 30px rgba(0, 242, 255, 0.2);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
    --border-radius: 8px;
    --transition-smooth: all 0.3s ease-in-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-secondary);
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.3);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--color-primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 2. Preloader
------------------------------------------------ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-background);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-logo {
    animation: pulse 1.5s infinite ease-in-out;
}

.loader-logo img {
    max-width: 100px;
}

.loader-bar {
    width: 150px;
    height: 4px;
    background: var(--color-surface);
    margin-top: 20px;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--color-primary);
    animation: loading 2s ease-in-out forwards;
}


/* 3. Header & Navigation
------------------------------------------------ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    z-index: 1000;
    transition: all 0.4s ease;
}

.header.scrolled {
    background-color: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: #fff;
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-logo img {
    height: 40px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.nav-logo:hover img {
    transform: rotate(15deg);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    color: var(--color-text);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
}

.hamburger {
    display: none;
    cursor: pointer;
    margin-left: 20px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}


/* 4. Buttons & Common Elements
------------------------------------------------ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-secondary);
    font-weight: 600;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-background);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-background);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
    transform: translateY(-2px);
}

.btn-primary-outline {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-primary-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-background);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-surface);
    color: var(--color-text);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-tertiary {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-color: var(--color-primary-dark);
    color: var(--color-primary-dark);
    background: transparent;
}

.btn-tertiary:hover {
    background: var(--color-primary-dark);
    color: var(--color-background);
}

.btn-primary-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* 5. Hero Section
------------------------------------------------ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

#hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, var(--color-background) 0%, rgba(10, 14, 26, 0.5) 50%, var(--color-background) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--color-text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    position: relative;
}

.mouse span {
    position: absolute;
    display: block;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    animation: scroll 1.5s infinite;
}


/* 6. Section Styling
------------------------------------------------ */
.section-padding {
    padding: 100px 0;
}

.section-padding-large {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.subtitle {
    display: inline-block;
    color: var(--color-primary);
    font-family: var(--font-secondary);
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* 7. Services Section (3D Flip Cards)
------------------------------------------------ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: transparent;
    height: 350px;
    perspective: 1000px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--color-surface-light);
    backdrop-filter: blur(5px);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
}

.service-card-front {
    justify-content: center;
}

.service-card-back {
    transform: rotateY(180deg);
    padding: 20px;
    justify-content: space-around;
}

.service-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    text-shadow: var(--shadow-glow);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card-back ul {
    text-align: left;
    width: 100%;
    padding-left: 10px;
}

.service-card-back li {
    margin-bottom: 10px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.service-card-back li i {
    color: var(--color-primary);
    margin-right: 10px;
}

/* 8. About Section (Shards & Stats)
------------------------------------------------ */
.about {
    background: var(--color-surface);
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--border-radius);
    position: relative;
    z-index: 2;
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0% 100%);
}

.image-shard-1,
.image-shard-2 {
    content: '';
    position: absolute;
    background: var(--color-primary);
    z-index: 1;
}

.image-shard-1 {
    width: 80%;
    height: 80%;
    top: -5%;
    left: -5%;
    opacity: 0.1;
    clip-path: polygon(0 0, 100% 15%, 85% 100%, 15% 85%);
}

.image-shard-2 {
    width: 60%;
    height: 60%;
    bottom: -5%;
    right: -5%;
    opacity: 0.05;
    clip-path: polygon(20% 0%, 80% 20%, 100% 80%, 0% 100%);
}

.stats-counter {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--color-primary);
}

.stat-item h3 span {
    font-size: 2rem;
    margin-left: 2px;
}

.stat-item p {
    color: var(--color-text-muted);
    font-weight: 500;
    margin: 0;
}

/* 9. Process Section (Timeline)
------------------------------------------------ */
.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--color-surface);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd) .timeline-content {
    text-align: right;
}

.timeline-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    color: var(--color-background);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    border: 4px solid var(--color-surface);
    box-shadow: var(--shadow-glow);
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -30px;
}

.timeline-step {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 30px;
    height: 30px;
    background: var(--color-secondary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-family: var(--font-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--color-surface);
}

.timeline-content {
    padding: 20px 30px;
    background: var(--color-surface);
    position: relative;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.timeline-content h3 {
    color: var(--color-primary);
}


/* 10. ROI Calculator Section
------------------------------------------------ */
.roi-calculator {
    background: var(--color-surface);
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    background: var(--color-background);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.calculator-form-container .form-group {
    margin-bottom: 20px;
}

.calculator-form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.calculator-form-container input {
    width: 100%;
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text);
    font-size: 1rem;
}

.calculator-form-container input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.calculator-form-container button {
    width: 100%;
    margin-top: 10px;
}

.results-shard {
    padding: 30px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    height: 100%;
    clip-path: polygon(0 0, 100% 10%, 100% 100%, 0 90%);
    background: var(--color-surface);
    transition: box-shadow 0.5s ease;
}

.results-shard.calculated {
    box-shadow: var(--shadow-glow);
}

.results-shard h3 {
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 25px;
}

.result-item {
    margin-bottom: 20px;
}

.result-item h4 {
    color: var(--color-text-muted);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
}

.result-item p {
    font-family: var(--font-secondary);
    font-size: 2.2rem;
    color: #fff;
    margin: 0;
}

.results-shard small {
    display: block;
    margin-top: 20px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-align: center;
}


/* 11. Testimonials Section (Slider)
------------------------------------------------ */
.testimonial-slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
    min-width: 100%;
    padding: 0 10px;
}

.testimonial-card {
    background: var(--color-surface-light);
    backdrop-filter: blur(5px);
    border: 1px solid var(--color-border);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    position: relative;
}

.quote-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    color: var(--color-primary);
    opacity: 0.1;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 30px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    margin-right: 15px;
}

.author-info h4 {
    margin: 0;
    color: #fff;
    font-family: var(--font-primary);
}

.author-info span {
    color: var(--color-text-muted);
}

.slider-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    z-index: 10;
}

.slider-controls button:hover {
    background: var(--color-primary);
    color: var(--color-background);
}

.prev-btn {
    left: -20px;
}

.next-btn {
    right: -20px;
}


/* 12. CTA Section
------------------------------------------------ */
.cta {
    background-image: linear-gradient(rgba(10, 14, 26, 0.9), rgba(10, 14, 26, 0.9)), url('https://images.unsplash.com/photo-1516321497487-e288fb19713f?q=80&w=2670&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.cta-wrapper {
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(8px);
    padding: 60px;
    text-align: center;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    clip-path: polygon(0 15%, 15% 0, 85% 0, 100% 15%, 100% 85%, 85% 100%, 15% 100%, 0 85%);
}

.cta-wrapper h2 {
    margin-bottom: 1rem;
}

.cta-wrapper p {
    max-width: 600px;
    margin: 0 auto 30px;
}


/* 13. Footer
------------------------------------------------ */
.footer {
    background: var(--color-surface);
    padding: 80px 0 0;
    border-top: 1px solid var(--color-border);
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 60px;
}

.footer-logo {
    margin-bottom: 20px;
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
}

.footer-logo img {
    height: 45px;
    margin-right: 15px;
}

.footer-about p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-background);
    color: var(--color-primary);
    border-radius: 50%;
    border: 1px solid var(--color-border);
    transition: var(--transition-smooth);
}

.footer-social a:hover {
    background: var(--color-primary);
    color: var(--color-background);
    transform: translateY(-3px);
}

.footer h3 {
    margin-bottom: 20px;
    color: var(--color-primary);
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--color-text-muted);
    position: relative;
    padding-left: 15px;
}

.footer-links ul li a::before {
    content: '\f105';
    /* fa-chevron-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    opacity: 0;
    transition: var(--transition-smooth);
}

.footer-links ul li a:hover {
    color: var(--color-primary);
    padding-left: 20px;
}

.footer-links ul li a:hover::before {
    opacity: 1;
    left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    color: var(--color-text-muted);
    margin-bottom: 15px;
}

.footer-contact i {
    color: var(--color-primary);
    margin-right: 15px;
    margin-top: 5px;
}

.footer-bottom {
    padding: 25px 0;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-legal a {
    color: var(--color-text-muted);
    margin: 0 10px;
}

.footer-legal a:hover {
    color: var(--color-primary);
}

.footer-legal .separator {
    color: var(--color-text-muted);
}


/* 14. Page Specific Styles
------------------------------------------------ */
/* Contact & Legal Pages Header */
.page-header {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    background: var(--color-surface);
}

.page-header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(10, 14, 26, 0.8), var(--color-background)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2672&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.page-header h1 {
    margin-bottom: 10px;
}

.page-header p {
    color: var(--color-text);
    max-width: 600px;
    margin: 0 auto;
}

/* Contact Page */
.contact-page-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    margin-top: 50px;
}

.contact-info-block,
.contact-form-block {
    background: var(--color-surface);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    margin-right: 20px;
}

.info-text h4 {
    font-family: var(--font-primary);
    margin-bottom: 5px;
}

.info-text p,
.info-text a {
    margin: 0;
    color: var(--color-text-muted);
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
}

.contact-form .form-group {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.contact-form label {
    position: absolute;
    top: 12px;
    left: 12px;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all 0.2s ease;
}

.contact-form input:focus+label,
.contact-form input:valid+label,
.contact-form textarea:focus+label,
.contact-form textarea:valid+label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    background: var(--color-surface);
    padding: 0 5px;
    color: var(--color-primary);
}

.contact-form button i {
    margin-left: 10px;
}

/* Legal Pages */
.legal-content .content-wrapper {
    background: var(--color-surface);
    padding: 50px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.legal-content h2 {
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* 15. Helper Components
------------------------------------------------ */
/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--color-primary);
    color: var(--color-background);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-5px);
}

/* Success Popup */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--color-surface);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    position: relative;
    border: 1px solid var(--color-border);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.popup.show .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.popup-icon {
    font-size: 4rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}

/* Live Chat Widget */
.live-chat-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    background: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 320px;
    background: var(--color-surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--color-border);
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-window.open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--color-background);
}

.chat-header img {
    width: 30px;
    margin-right: 10px;
}

.chat-header span {
    font-weight: 600;
    color: #fff;
}

.chat-header .close-chat {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 20px;
    height: 250px;
}

.chat-body p {
    color: var(--color-text);
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid var(--color-border);
}

.chat-footer input {
    flex-grow: 1;
    border: none;
    background: none;
    color: #fff;
    padding: 0 10px;
}

.chat-footer input:focus {
    outline: none;
}

.chat-footer button {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1.2rem;
    cursor: pointer;
}


/* 16. Animation Keyframes & Scroll Animations
------------------------------------------------ */
@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }

    40% {
        opacity: 1;
    }

    80% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes loading {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoom-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shard-assemble {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
        clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }
}

.animate-in {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-in.visible[data-animation="fade-in"] {
    animation: fade-in 1s forwards;
}

.animate-in.visible[data-animation="fade-in-up"] {
    animation: fade-in-up 1s forwards;
}

.animate-in.visible[data-animation="fade-in-left"] {
    animation: fade-in-left 1s forwards;
}

.animate-in.visible[data-animation="fade-in-right"] {
    animation: fade-in-right 1s forwards;
}

.animate-in.visible[data-animation="zoom-in"] {
    animation: zoom-in 1s forwards;
}

.animate-in.visible[data-animation="shard-assemble"] {
    animation: shard-assemble 1.2s forwards cubic-bezier(0.25, 1, 0.5, 1);
}


/* 17. Media Queries (Responsiveness)
------------------------------------------------ */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--color-surface);
        width: 100%;
        height: calc(100vh - var(--header-height));
        text-align: center;
        transition: 0.3s;
        padding-top: 40px;
    }

    .header.scrolled .nav-menu {
        top: 70px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 20px 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .about-wrapper {
        grid-template-columns: 1fr;
    }

    .about-image {
        margin-bottom: 40px;
    }

    .process-timeline::after {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
    }

    .timeline-icon {
        left: 0;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .slider-controls button {
        width: 40px;
        height: 40px;
    }

    .prev-btn {
        left: 0;
    }

    .next-btn {
        right: 0;
    }

    .testimonial-slide {
        padding: 0;
    }

    .contact-page-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 80px 0;
    }

    .section-padding-large {
        padding: 100px 0;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .footer-main {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 576px) {
    :root {
        --header-height: 70px;
    }

    .nav-logo span {
        display: none;
    }

    .header-actions .btn {
        display: none;
    }

    .cta-wrapper {
        padding: 40px 20px;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
    }

    .live-chat-widget {
        display: none;
    }

    /* Hide for cleaner mobile experience */
}