/*
* Digital Marketing Agency Redesign
* Author: AI Assistant
* Version: 1.0
*/

/* ---------------------------------- */
/* 1. Global Styles & Variables       */
/* ---------------------------------- */
:root {
    --primary-color: #7f5af0;
    --secondary-color: #2cb67d;
    --dark-blue: #16161a;
    --off-dark: #242629;
    --light-bg: #f8f9fa;
    --text-color: #94a1b2;
    --headings-color: #fffffe;
    --white: #ffffff;

    --font-primary: 'Manrope', sans-serif;
    --font-secondary: 'Poppins', sans-serif;

    --header-height: 80px;
    --border-radius: 8px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--dark-blue);
    color: var(--text-color);
    font-family: var(--font-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--headings-color);
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-speed);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-padding {
    padding: 100px 0;
}

.subtitle {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--dark-blue);
    transform: translateY(-3px);
}

/* ---------------------------------- */
/* 2. Preloader & Back-to-Top         */
/* ---------------------------------- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-blue);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-logo img {
    width: 80px;
    animation: pulse 1.5s infinite ease-in-out;
}

.loader-bar {
    width: 150px;
    height: 4px;
    background-color: var(--off-dark);
    margin-top: 20px;
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar::before {
    content: '';
    display: block;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    animation: loading 2s ease-out forwards;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes loading {
    to {
        width: 100%;
    }
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-speed);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
    color: var(--white);
}

/* ---------------------------------- */
/* 3. Header & Navigation             */
/* ---------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    transition: all var(--transition-speed);
}

.header.scrolled {
    background-color: rgba(22, 22, 26, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    height: calc(var(--header-height) - 10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    color: var(--headings-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-logo img {
    height: 60px;
    margin-right: 10px;
}

.nav-logo span {
    transition: var(--transition-speed);
}

.nav-logo:hover span {
    color: var(--primary-color);
}


.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--headings-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white);
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* ---------------------------------- */
/* 4. Hero Section                    */
/* ---------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background-color: var(--primary-color);
    top: 10%;
    left: 10%;
    animation: move-blob 15s infinite alternate;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background-color: var(--secondary-color);
    bottom: 15%;
    right: 15%;
    animation: move-blob 12s infinite alternate-reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background-color: #ff8906;
    /* Tertiary Accent */
    top: 30%;
    right: 5%;
    animation: move-blob 10s infinite alternate;
}

@keyframes move-blob {
    from {
        transform: translate(-50px, -50px) scale(1);
    }

    to {
        transform: translate(50px, 50px) scale(1.2);
    }
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    max-width: 50%;
}

.hero-content h1 {
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-3d-wrapper {
    perspective: 1000px;
    width: 300px;
    height: 300px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-cube 20s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    margin: -100px;
    left: 50%;
    top: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    font-size: 1.5rem;
    border-radius: var(--border-radius);
}

.face i {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.face span {
    font-size: 1rem;
    font-weight: 500;
}

.front {
    transform: rotateY(0deg) translateZ(100px);
}

.back {
    transform: rotateY(180deg) translateZ(100px);
}

.right {
    transform: rotateY(90deg) translateZ(100px);
}

.left {
    transform: rotateY(-90deg) translateZ(100px);
}

.top {
    transform: rotateX(90deg) translateZ(100px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(100px);
}

@keyframes rotate-cube {
    from {
        transform: rotateX(0) rotateY(0);
    }

    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* ---------------------------------- */
/* 5. Services Section                */
/* ---------------------------------- */
.services-section {
    background-color: var(--off-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: transparent;
    perspective: 1000px;
    min-height: 350px;
}

.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%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: linear-gradient(145deg, rgba(36, 38, 41, 0.8), rgba(22, 22, 26, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.service-card-back {
    transform: rotateY(180deg);
    align-items: flex-start;
    text-align: left;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--headings-color);
}

.service-card-back h3 {
    width: 100%;
    text-align: center;
}

.service-card-back ul {
    width: 100%;
    margin-bottom: 20px;
}

.service-card-back ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card-back ul li::before {
    content: '\f058';
    /* Font Awesome check icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--secondary-color);
    margin-right: 10px;
}

.btn-card {
    margin-top: auto;
    align-self: center;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    font-weight: 500;
}

.btn-card:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* ---------------------------------- */
/* 6. About Section                   */
/* ---------------------------------- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.about-features {
    margin-top: 30px;
    margin-bottom: 40px;
}

.about-features li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.about-features li:not(:last-child) {
    margin-bottom: 25px;
}

.feature-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    background: var(--off-dark);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.feature-text p {
    margin-bottom: 0;
}


/* ---------------------------------- */
/* 7. ROI Calculator Section          */
/* ---------------------------------- */
.roi-calculator-section {
    background: url('https://www.transparenttextures.com/patterns/az-subtle.png'), var(--off-dark);
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    background-color: var(--dark-blue);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.roi-form .form-group {
    margin-bottom: 25px;
}

.roi-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--headings-color);
}

.roi-form input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: var(--off-dark);
    outline: none;
    border-radius: 5px;
}

.roi-form input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--dark-blue);
}

.roi-form input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
}

.roi-form .form-group span {
    display: inline-block;
    margin-left: 15px;
    font-weight: bold;
    color: var(--secondary-color);
}

.roi-results {
    background-color: var(--off-dark);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
}

.roi-results h3 {
    margin-bottom: 30px;
}

.result-item {
    margin-bottom: 20px;
    text-align: left;
}

.result-item span {
    display: block;
    color: var(--text-color);
}

.result-item strong {
    display: block;
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.roi-results .disclaimer {
    font-size: 0.8rem;
    color: var(--text-color);
    margin-top: 30px;
    margin-bottom: 0;
}

/* ---------------------------------- */
/* 8. Process Section                 */
/* ---------------------------------- */
.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--off-dark);
    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;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    right: -30px;
    top: 32px;
    background-color: var(--dark-blue);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--headings-color);
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -30px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--off-dark);
    border-radius: var(--border-radius);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    content: " ";
    position: absolute;
    top: 28px;
    right: -15px;
    border-width: 10px;
    border-style: solid;
    border-color: transparent transparent transparent var(--off-dark);
}

.timeline-item:nth-child(even) .timeline-content::after {
    content: " ";
    position: absolute;
    top: 28px;
    left: -15px;
    border-width: 10px;
    border-style: solid;
    border-color: transparent var(--off-dark) transparent transparent;
}

.timeline-content h3 {
    color: var(--primary-color);
}

/* ---------------------------------- */
/* 9. Testimonials Section            */
/* ---------------------------------- */
.testimonials-section {
    background-color: var(--off-dark);
}

.testimonial-slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-slider {
    display: flex;
    transition: transform var(--transition-speed);
}

.testimonial-card {
    min-width: 100%;
    background-color: var(--dark-blue);
    padding: 50px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: opacity 0.5s ease;
    opacity: 0.5;
    transform: scale(0.95);
}

.testimonial-card.active {
    opacity: 1;
    transform: scale(1);
}

.testimonial-quote {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.testimonial-card p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 30px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
}

.author-info h4 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.author-info span {
    font-size: 0.9rem;
    color: var(--text-color);
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.slider-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-speed);
}

.slider-btn:hover {
    background-color: var(--secondary-color);
}

/* ---------------------------------- */
/* 10. CTA Section                     */
/* ---------------------------------- */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

.cta-container {
    text-align: center;
    color: var(--white);
}

.cta-container h2 {
    color: var(--white);
    font-size: 2.8rem;
}

.cta-container p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.cta-container .btn {
    background-color: var(--white);
    color: var(--dark-blue);
    padding: 15px 40px;
}

.cta-container .btn:hover {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

/* ---------------------------------- */
/* 11. Footer                        */
/* ---------------------------------- */
.footer {
    background-color: var(--off-dark);
    padding: 80px 0 0;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 50px;
}

.footer-about .footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--headings-color);
    margin-bottom: 20px;
}

.footer-logo img {
    height: 60px;
    margin-right: 10px;
}

.footer-about p {
    margin-bottom: 25px;
}

.footer-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--dark-blue);
    color: var(--white);
    border-radius: 50%;
    margin-right: 10px;
}

.footer-social a:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.footer-links h3,
.footer-contact h3 {
    color: var(--headings-color);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul a {
    color: var(--text-color);
}

.footer-links ul a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-contact ul i {
    color: var(--primary-color);
    margin-top: 5px;
}

.footer-contact a {
    color: var(--text-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin-bottom: 0;
}

.footer-legal a {
    color: var(--text-color);
    margin: 0 10px;
}

.footer-legal span {
    color: var(--text-color);
}

/* ---------------------------------- */
/* 12. Page Header (for other pages)  */
/* ---------------------------------- */
.page-header {
    padding: 180px 0 100px;
    text-align: center;
    background: linear-gradient(rgba(22, 22, 26, 0.8), rgba(22, 22, 26, 0.8)), url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--headings-color);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 1rem auto 0;
}

/* ---------------------------------- */
/* 13. Legal & Contact Pages          */
/* ---------------------------------- */
.legal-content .content-wrapper,
.contact-page-section {
    background-color: var(--off-dark);
    padding: 50px;
    border-radius: var(--border-radius);
}

.legal-content .content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.contact-page-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}

.contact-info-block h3,
.contact-form-block h3 {
    margin-bottom: 2rem;
}

.contact-info-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 25px;
}

.info-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--dark-blue);
    border-radius: 50%;
}

.info-text h4 {
    margin-bottom: 5px;
}

.info-text p,
.info-text a {
    color: var(--text-color);
    margin-bottom: 0;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--dark-blue);
    border: 1px solid #444;
    border-radius: 5px;
    color: var(--white);
    font-family: var(--font-primary);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form button {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
}

/* Success Popup */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: var(--off-dark);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    width: 90%;
    max-width: 400px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup.show .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

.popup-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.popup-content h3 {
    color: var(--white);
}

/* ---------------------------------- */
/* 14. Live Chat & Modal Widgets      */
/* ---------------------------------- */
.live-chat-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1001;
}

.chat-button {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: var(--transition-speed);
}

.chat-button:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 320px;
    background-color: var(--off-dark);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
}

.chat-window.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 1rem;
}

.close-chat {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-body {
    padding: 15px;
    height: 250px;
    overflow-y: auto;
}

.message {
    margin-bottom: 10px;
}

.message.received p {
    background-color: var(--dark-blue);
    padding: 10px 15px;
    border-radius: 15px 15px 15px 0;
    display: inline-block;
    max-width: 80%;
}

.chat-footer {
    padding: 10px;
    display: flex;
    border-top: 1px solid #444;
}

.chat-footer input {
    flex-grow: 1;
    border: none;
    background: var(--dark-blue);
    padding: 10px;
    border-radius: 20px;
    color: var(--white);
    margin-right: 10px;
}

.chat-footer button {
    background: var(--secondary-color);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--off-dark);
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: var(--border-radius);
    position: relative;
    animation: slide-down 0.5s ease-out;
}

@keyframes slide-down {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 20px;
}

.modal-content img {
    border-radius: 5px;
    margin-bottom: 15px;
}

/* ---------------------------------- */
/* 15. Scroll Animations              */
/* ---------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------------------- */
/* 16. Responsive Media Queries       */
/* ---------------------------------- */

/* Tablets and smaller desktops */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--off-dark);
        width: 100%;
        height: calc(100vh - var(--header-height));
        text-align: center;
        transition: 0.3s;
        gap: 0;
    }

    .header.scrolled .nav-menu {
        top: calc(var(--header-height) - 10px);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 20px;
        font-size: 1.2rem;
    }

    .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);
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-3d-wrapper {
        margin-top: 2rem;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: 1;
    }

    .about-content {
        order: 2;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .process-timeline::after {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        text-align: left;
    }

    .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after {
        left: -15px;
        border-color: transparent var(--off-dark) transparent transparent;
    }

    .contact-page-wrapper {
        grid-template-columns: 1fr;
    }

    .slider-controls {
        display: none;
    }

    /* Hide arrows on smaller screens */
}

/* Mobile devices */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .section-padding {
        padding: 80px 0;
    }

    .container {
        width: 95%;
    }

    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero-3d-wrapper {
        width: 200px;
        height: 200px;
    }

    .cube {
        animation-duration: 15s;
    }

    .face {
        width: 150px;
        height: 150px;
        margin: -75px;
    }

    .face {
        transform: rotateY(0deg) translateZ(75px);
    }

    .back {
        transform: rotateY(180deg) translateZ(75px);
    }

    .right {
        transform: rotateY(90deg) translateZ(75px);
    }

    .left {
        transform: rotateY(-90deg) translateZ(75px);
    }

    .top {
        transform: rotateX(90deg) translateZ(75px);
    }

    .bottom {
        transform: rotateX(-90deg) translateZ(75px);
    }

    .service-card {
        min-height: 320px;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links h3::after,
    .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social {
        justify-content: center;
    }

    .footer-social a:last-child {
        margin-right: 0;
    }

    .footer-contact ul li {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-legal {
        order: -1;
    }

    .page-header {
        padding: 140px 0 80px;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .legal-content .content-wrapper,
    .contact-page-section {
        padding: 30px;
    }

    .live-chat-widget {
        bottom: 10px;
        left: 10px;
    }
}