/*
================================================
Theme Name: Analytics Assemble
Colors:
- Cosmic Blue: #304FFE
- Citrus Yellow: #FFD740
- Graphite: #212121
- Light Graphite: #424242
- Background Gray: #f5f5f7
- White: #FFFFFF
================================================
*/

:root {
    --cosmic-blue: #304FFE;
    --citrus-yellow: #FFD740;
    --graphite: #212121;
    --light-graphite: #424242;
    --bg-gray: #f5f5f7;
    --white: #FFFFFF;
    --text-color: #616161;
    --font-family: 'Poppins', sans-serif;
    --header-height: 80px;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

/* --- BASE STYLES & RESET --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.subpage {
    background-color: var(--bg-gray);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--cosmic-blue);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--light-graphite);
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    color: var(--graphite);
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- REUSABLE COMPONENTS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-transform: capitalize;
    transition: all var(--transition-speed) ease;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background-color: var(--cosmic-blue);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(48, 79, 254, 0.2);
}

.btn-primary:hover {
    background-color: #1a237e;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(48, 79, 254, 0.3);
}

.btn-primary i {
    transition: transform var(--transition-speed) ease;
}

.btn-primary:hover i {
    transform: translateX(4px);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--cosmic-blue);
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background-color: var(--bg-gray);
    border-color: var(--cosmic-blue);
    transform: translateY(-3px);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    background-color: rgba(255, 215, 64, 0.2);
    color: var(--graphite);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}


/* --- HEADER --- */
.header {
    width: 100%;
    height: var(--header-height);
    background-color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    height: 70px;
}

.header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--graphite);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo {
    height: 60px;
    filter: invert(1);
    transition: transform var(--transition-speed) ease;
}

.logo-link:hover .logo {
    transform: rotate(15deg);
}

.nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--light-graphite);
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--cosmic-blue);
    transition: width var(--transition-speed) ease-in-out;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    width: 28px;
    height: 22px;
    position: relative;
}

.bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--graphite);
    border-radius: 3px;
    position: absolute;
    transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;
}

.bar-top {
    top: 0;
}

.bar-middle {
    top: 50%;
    transform: translateY(-50%);
}

.bar-bottom {
    bottom: 0;
}

.mobile-nav-open .bar-top {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-nav-open .bar-middle {
    opacity: 0;
}

.mobile-nav-open .bar-bottom {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}


/* --- MOBILE NAVIGATION --- */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--graphite);
    z-index: 999;
    padding: calc(var(--header-height) + 2rem) 2rem;
    transition: right var(--transition-speed) ease-in-out;
}

.mobile-nav-open .mobile-nav {
    right: 0;
}

.mobile-nav nav ul {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-nav nav li a {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 500;
}

.mobile-nav nav li .btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
    background: var(--citrus-yellow);
    color: var(--graphite);
    box-shadow: none;
}

.mobile-nav nav li .btn-primary:hover {
    background: var(--cosmic-blue);
    color: var(--white);
}

body.mobile-nav-open {
    overflow: hidden;
}


/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    width: 100%;
    background: var(--graphite);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    color: var(--white);
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    color: rgba(255, 255, 255, 0.8);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.hero .btn-primary {
    background: var(--citrus-yellow);
    color: var(--graphite);
    box-shadow: 0 5px 20px rgba(255, 215, 64, 0.3);
}

.hero .btn-primary:hover {
    background-color: var(--white);
}

.hero .btn-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
    background: transparent;
}

.hero .btn-secondary:hover {
    background: var(--white);
    color: var(--graphite);
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-load {
    animation: fadeInUp 1s ease-out forwards;
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.animate-on-scroll.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: none !important;
}


/* --- SERVICES SECTION --- */
.services-section {
    padding: 6rem 0;
    background-color: var(--bg-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-card-inner {
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.service-card:hover .service-card-inner {
    border-color: var(--cosmic-blue);
}

.card-flare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(48, 79, 254, 0.15), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover .card-flare {
    opacity: 1;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--cosmic-blue);
    margin-bottom: 1.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(48, 79, 254, 0.1);
    border-radius: 50%;
    position: relative;
}

.service-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--cosmic-blue);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    transform: scale(0.8);
    z-index: -1;
}

.service-card:hover .service-icon::after {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--cosmic-blue);
}

.service-card:hover .service-icon i {
    color: var(--white);
}

.service-title {
    margin-bottom: 1rem;
}

.service-description {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.card-link {
    font-weight: 600;
    color: var(--cosmic-blue);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link i {
    transition: transform var(--transition-speed) ease;
}

.card-link:hover i {
    transform: translateX(5px);
}


/* --- ENGAGEMENT SAGA SECTION --- */
.saga-section {
    padding: 6rem 0;
    background: var(--white);
}

.saga-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    margin-top: 3rem;
}

.saga-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #e0e0e0;
    transform: translateX(-50%);
    z-index: -1;
}

.saga-item {
    display: flex;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
}

.saga-item:nth-child(even) {
    flex-direction: row-reverse;
}

.saga-item:last-child {
    margin-bottom: 0;
}

.saga-content {
    width: calc(50% - 4rem);
    background: var(--bg-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
}

.saga-item:nth-child(odd) {
    transform: translateX(-30px);
}

.saga-item:nth-child(even) {
    transform: translateX(30px);
}

.saga-item.is-visible {
    transform: translateX(0);
}

.saga-item:nth-child(odd) .saga-content {
    text-align: right;
}

.saga-content h3 {
    margin-bottom: 0.5rem;
    color: var(--cosmic-blue);
}

.saga-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--citrus-yellow);
    color: var(--graphite);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin: 0 2rem;
    position: relative;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--citrus-yellow);
    z-index: 2;
    transition: transform 0.3s ease;
}

.saga-item:hover .saga-icon {
    transform: scale(1.1);
}

/* --- INTERACTIVE TOOLS SECTION --- */
.interactive-tools {
    padding: 6rem 0;
    background: var(--bg-gray);
}

.tools-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.tool-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-card h3 {
    margin: 1rem 0;
}

.tool-card p {
    margin-bottom: 2rem;
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--citrus-yellow);
}

.tool-card .btn-secondary {
    margin-top: auto;
}

.roi-form {
    width: 100%;
}

.roi-form .form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.roi-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.roi-form input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
}

.roi-form input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--cosmic-blue);
    cursor: pointer;
}

.roi-result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(48, 79, 254, 0.1);
    border-radius: 8px;
}

.roi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--cosmic-blue);
}


/* --- TESTIMONIALS --- */
.testimonials-section {
    padding: 6rem 0;
    background: var(--white);
    text-align: center;
}

.testimonial-wrapper {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.testimonial-card {
    padding: 2rem;
    border-radius: var(--border-radius);
    background: var(--bg-gray);
    position: relative;
    border: 1px solid #eee;
}

.testimonial-card::before {
    content: "\f10d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 2rem;
    color: var(--cosmic-blue);
    opacity: 0.1;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto 1.5rem auto;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--light-graphite);
}

.testimonial-author {
    color: var(--graphite);
}

.testimonial-company {
    font-size: 0.9rem;
}


/* --- CTA SECTION --- */
.cta-section {
    padding: 5rem 0;
    background: var(--graphite);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-title {
    color: var(--white);
    font-size: 2.2rem;
}

.cta-text {
    max-width: 600px;
    margin: 1rem auto 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.cta-btn {
    background: var(--citrus-yellow);
    color: var(--graphite);
    font-size: 1.1rem;
    padding: 1rem 2rem;
    box-shadow: 0 5px 20px rgba(255, 215, 64, 0.3);
}

.cta-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.cta-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.cta-bg-shapes .shape-1 {
    width: 200px;
    height: 200px;
    background-color: var(--cosmic-blue);
    top: -50px;
    left: 10%;
}

.cta-bg-shapes .shape-2 {
    width: 300px;
    height: 300px;
    background-color: var(--citrus-yellow);
    bottom: -100px;
    right: 5%;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--graphite);
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 0 0;
    position: relative;
    overflow: hidden;
}

.footer-bg-shapes .shape-1 {
    width: 300px;
    height: 300px;
    top: 0;
    left: -150px;
}

.footer-bg-shapes .shape-2 {
    width: 250px;
    height: 250px;
    bottom: -50px;
    right: -120px;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
}

.footer a:hover {
    color: var(--white);
}

.footer .logo-link {
    color: var(--white);
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.footer-col.footer-about {
    grid-column: span 1;
}

.footer-logo {
    height: 60px;
    width: auto;
}

.footer-about-text {
    margin: 1.5rem 0;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-graphite);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.1rem;
}

.social-link:hover {
    background-color: var(--cosmic-blue);
    transform: translateY(-3px);
}

.footer-col-title {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-links ul li a {
    display: block;
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 15px;
}

.footer-links ul li a::before {
    content: '\f054';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.7rem;
    opacity: 0;
    transition: all var(--transition-speed) ease;
}

.footer-links ul li a:hover::before {
    opacity: 1;
    left: -5px;
    color: var(--citrus-yellow);
}

.contact-info li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-info li i {
    color: var(--citrus-yellow);
    margin-top: 5px;
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid var(--light-graphite);
    text-align: center;
}

/* --- LEGAL & CONTACT PAGES SPECIFIC STYLES --- */
.page-header {
    padding: calc(var(--header-height) + 4rem) 0 4rem;
    text-align: center;
    background: var(--graphite);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-bg-shapes .shape-1,
.page-header .shape-1 {
    width: 250px;
    height: 250px;
    background: var(--cosmic-blue);
    opacity: 0.1;
    position: absolute;
    top: -80px;
    left: -100px;
    border-radius: 50%;
}

.hero-bg-shapes .shape-3,
.page-header .shape-3 {
    width: 150px;
    height: 150px;
    background: var(--citrus-yellow);
    opacity: 0.08;
    position: absolute;
    bottom: 20px;
    right: -50px;
    border-radius: 50%;
}

.page-header h1 {
    color: var(--white);
}

.page-header .page-subtitle {
    max-width: 600px;
    margin: 1rem auto 0;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumbs {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs a {
    color: var(--citrus-yellow);
}

.breadcrumbs span {
    color: rgba(255, 255, 255, 0.7);
}

.legal-content {
    padding: 5rem 0;
}

.legal-content .content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--cosmic-blue);
}

.legal-content p {
    margin-bottom: 1rem;
}

/* CONTACT PAGE */
.contact-section-page {
    padding: 5rem 0;
    background-color: var(--bg-gray);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.contact-info-col h2 {
    margin-bottom: 1rem;
}

.contact-info-col p {
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.method-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(48, 79, 254, 0.1);
    color: var(--cosmic-blue);
}

.method-details h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.contact-form .form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-form .form-group {
    flex: 1;
    margin-bottom: 1.5rem;
}

.contact-form .form-row .form-group {
    margin-bottom: 0;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--cosmic-blue);
    box-shadow: 0 0 0 3px rgba(48, 79, 254, 0.2);
}

.contact-form .form-submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    justify-content: center;
}

/* POPUP */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
    z-index: 2000;
}

.popup:target {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    text-align: center;
    position: relative;
    max-width: 500px;
    transform: scale(0.9);
    transition: transform var(--transition-speed);
}

.popup:target .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #999;
}

.popup-content .fa-check-circle {
    font-size: 4rem;
    color: #4caf50;
    margin-bottom: 1.5rem;
}


/* --- MODALS and WIDGETS --- */
.modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.open {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: fadeInUp 0.3s;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-content ul {
    list-style: inside;
    padding-left: 1rem;
}


.live-chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 998;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    background: var(--cosmic-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: all 0.3s;
}

.live-chat-widget.open .chat-window {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.chat-header {
    background: var(--cosmic-blue);
    color: var(--white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
}

.chat-body {
    padding: 1rem;
    height: 250px;
    overflow-y: auto;
}

.chat-message.bot {
    background: var(--bg-gray);
    padding: 0.8rem;
    border-radius: 12px 12px 12px 0;
    display: inline-block;
    max-width: 80%;
}

.chat-footer {
    display: flex;
    border-top: 1px solid #eee;
}

.chat-footer input {
    flex-grow: 1;
    border: none;
    padding: 1rem;
    outline: none;
}

.chat-footer button {
    background: none;
    border: none;
    padding: 0 1rem;
    cursor: pointer;
    color: var(--cosmic-blue);
    font-size: 1.2rem;
}



/* --- RESPONSIVE STYLES --- */

/* TABLETS (max-width: 992px) */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonial-wrapper,
    .tools-container {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-col.footer-about {
        grid-column: span 2;
    }

    .saga-content {
        width: calc(50% - 3rem);
    }

    .saga-icon {
        margin: 0 1.5rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* MOBILE (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .saga-line {
        left: 30px;
    }

    .saga-item,
    .saga-item:nth-child(even) {
        flex-direction: column;
        align-items: flex-start;
    }

    .saga-item .saga-icon {
        margin: 0 0 1.5rem 0;
        align-self: flex-start;
        margin-left: -5px;
    }

    .saga-item .saga-content {
        width: 100%;
        margin-left: 0;
        text-align: left !important;
    }

    .saga-item:nth-child(odd) {
        transform: translateX(0);
    }

    .saga-item:nth-child(even) {
        transform: translateX(0);
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-col {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .contact-info li {
        justify-content: center;
    }

    .contact-form .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}