/*
---
File: styles.css
Project: William Watson Home & Rental Redesign
Theme: Antimatter Split
---
*/

/* ------------------- */
/* 1. CSS Variables & Root */
/* ------------------- */
:root {
    --color-primary: #4f46e5;
    /* A strong, modern indigo */
    --color-primary-light: #675ef2;
    --color-secondary: #ec4899;
    /* Vibrant pink for contrast */
    --color-dark: #0f172a;
    /* Deep navy blue, not quite black */
    --color-dark-light: #1e293b;
    /* Lighter navy for cards/panels */
    --color-slate: #94a3b8;
    /* For text and subtitles */
    --color-light: #f1f5f9;
    /* Off-white for text on dark backgrounds */
    --color-white: #ffffff;
    --color-success: #22c55e;
    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --gradient-dark: linear-gradient(135deg, var(--color-dark), #1a243d);

    --font-family: 'Poppins', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.7;

    --header-height: 80px;
    --border-radius: 12px;
    --container-width: 1200px;
    --transition-speed: 0.3s;
    --transition-timing: ease-in-out;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* ------------------- */
/* 2. Base & Reset Styles */
/* ------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    background-color: var(--color-dark);
    color: var(--color-slate);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    color: var(--color-light);
    line-height: 1.2;
    font-weight: 700;
    text-shadow: var(--text-shadow);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.25rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-timing);
}

a:hover {
    color: var(--color-primary-light);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    position: relative;
    overflow: hidden;
}

.section-padding {
    padding: 100px 0;
}

/* ------------------- */
/* 3. Layout & Helpers */
/* ------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.section-header {
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--color-white);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    margin-bottom: 20px;
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* ------------------- */
/* 4. Buttons */
/* ------------------- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid transparent;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-speed) var(--transition-timing);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-dark);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-full {
    display: block;
    width: 100%;
}

.btn i {
    margin-left: 8px;
}


/* ------------------- */
/* 5. Header */
/* ------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: transparent;
    z-index: 1000;
    transition: background-color var(--transition-speed) var(--transition-timing), box-shadow var(--transition-speed) var(--transition-timing);
}

.header.scrolled {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    height: 80px;
    width: auto;
}

.nav-menu {
    display: flex;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    color: var(--color-light);
    font-weight: 500;
    position: relative;
    padding: 10px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-speed) var(--transition-timing);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 22px;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1001;
}

.bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Menu Toggle Animation */
.nav-menu.active+.header-actions .menu-toggle .bar:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.nav-menu.active+.header-actions .menu-toggle .bar:nth-child(2) {
    opacity: 0;
}

.nav-menu.active+.header-actions .menu-toggle .bar:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* ------------------- */
/* 6. Hero Section */
/* ------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    position: relative;
    padding-top: var(--header-height);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, rgba(79, 70, 229, 0.2), transparent 70%);
    opacity: 0;
    animation: fadeIn 2s 1s forwards;
}

.hero-split-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: var(--color-dark);
    z-index: 10;
}

.left-panel {
    left: 0;
    animation: slideOutLeft 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.right-panel {
    right: 0;
    animation: slideOutRight 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.hero-shockwave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 5;
    animation: shockwave 1.5s 0.8s ease-out forwards;
}

.hero-content {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    animation: contentFadeIn 1s 1.2s forwards;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1;
}

.hero-title .line {
    display: block;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--color-slate);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Scroll Down Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0;
    animation: fadeIn 1s 2s forwards;
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--color-slate);
    border-radius: 20px;
    display: flex;
    justify-content: center;
}

.mouse span {
    width: 3px;
    height: 8px;
    background: var(--color-slate);
    border-radius: 2px;
    margin-top: 8px;
    animation: scroll-anim 1.5s infinite;
}

/* ------------------- */
/* 7. Stats Section */
/* ------------------- */
.stats-section {
    background-color: var(--color-dark-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: var(--color-dark);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-speed) var(--transition-timing), box-shadow var(--transition-speed) var(--transition-timing);
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-white);
}

.stat-label {
    font-size: 1rem;
    color: var(--color-slate);
}


/* ------------------- */
/* 8. Services Section */
/* ------------------- */
.services-section {
    background-color: var(--color-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: transparent;
    perspective: 1000px;
    height: 400px;
}

.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;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    border-radius: var(--border-radius);
    background: var(--color-dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card-back {
    transform: rotateY(180deg);
    background: var(--gradient-dark);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.service-title {
    margin-bottom: 15px;
    color: var(--color-light);
}

.service-desc {
    font-size: 1rem;
    color: var(--color-slate);
}

.service-card-back h3 {
    margin-bottom: 20px;
    color: var(--color-light);
}

.service-card-back ul {
    margin-bottom: 30px;
}

.service-card-back li {
    margin-bottom: 8px;
    color: var(--color-slate);
}

/* ------------------- */
/* 9. About Section */
/* ------------------- */
.about-section {
    background-color: var(--color-dark-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-image-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    z-index: 0;
}

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    z-index: 1;
    box-shadow: var(--box-shadow);
}

.about-image-experience-box {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--color-dark);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-image-experience-box h3 {
    font-size: 2.5rem;
    color: var(--color-primary);
}

.about-image-experience-box p {
    font-weight: 500;
    color: var(--color-slate);
}

.about-content .section-title {
    margin-bottom: 30px;
}

.about-features-list {
    margin-top: 30px;
    margin-bottom: 40px;
}

.about-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.about-features-list i {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-top: 5px;
}

.about-features-list h4 {
    margin-bottom: 5px;
}

/* ------------------- */
/* 10. Process Section */
/* ------------------- */
.process-section {
    background-color: var(--color-dark);
}

.process-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.process-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--color-dark-light);
    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%;
    text-align: left;
}

.timeline-dot {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--color-primary);
    border: 4px solid var(--color-dark);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--color-dark-light);
    position: relative;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-step {
    position: absolute;
    top: -20px;
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
}

.timeline-item:nth-child(odd) .timeline-step {
    right: 20px;
}

.timeline-item:nth-child(even) .timeline-step {
    left: 20px;
}

.timeline-title {
    margin-bottom: 10px;
}

/* ------------------- */
/* 11. Testimonials */
/* ------------------- */
.testimonials-section {
    background-color: var(--color-dark-light);
}

.testimonial-slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
    height: 350px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    background-color: var(--color-dark);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
    visibility: hidden;
}

.testimonial-slide.active {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

.testimonial-quote-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 30px;
    max-width: 90%;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
}

.author-info {
    text-align: left;
}

.author-name {
    font-weight: 600;
    color: var(--color-light);
}

.author-title {
    font-size: 0.9rem;
    color: var(--color-slate);
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 110%;
    left: -5%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.slider-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-timing);
}

.slider-btn:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ------------------- */
/* 12. CTA Section */
/* ------------------- */
.cta-section {
    padding: 80px 0;
    background: var(--gradient-primary);
    text-align: center;
    color: var(--color-white);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
}

.cta-section .btn-primary:hover {
    background: var(--color-dark);
    color: var(--color-white);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* ------------------- */
/* 13. Footer */
/* ------------------- */
.footer {
    background-color: #0c1221;
    /* Slightly lighter than main dark */
    color: var(--color-slate);
    padding-top: 100px;
    position: relative;
}

.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%230f172a' fill-opacity='1' d='M0,160L48,170.7C96,181,192,203,288,208C384,213,480,203,576,176C672,149,768,107,864,112C960,117,1056,171,1152,181.3C1248,192,1344,160,1392,144L1440,128L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: cover;
    transform: translateY(-99%);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 50px;
}

.footer-col-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 25px;
    position: relative;
}

.footer-col-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background: var(--gradient-primary);
}

.footer-logo {
    height: 80px;
    margin-bottom: 20px;
}

.footer-about-text {
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--color-dark-light);
    color: var(--color-slate);
    transition: all var(--transition-speed) var(--transition-timing);
}

.social-links a:hover {
    background: var(--gradient-primary);
    color: var(--color-white);
    transform: translateY(-3px);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul a {
    color: var(--color-slate);
}

.footer-links ul a:hover {
    color: var(--color-white);
    padding-left: 5px;
}

.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-contact i {
    color: var(--color-primary);
    margin-top: 5px;
}

.footer-contact a {
    color: var(--color-slate);
}

.footer-contact a:hover {
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid var(--color-dark-light);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ------------------- */
/* 14. Inner Pages (Contact, Legal) */
/* ------------------- */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
    background: var(--gradient-dark);
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at top left, var(--color-primary) 0%, transparent 30%),
        radial-gradient(circle at bottom right, var(--color-secondary) 0%, transparent 30%);
    opacity: 0.1;
    z-index: 0;
}

.page-header h1,
.page-header p {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 3rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--color-slate);
    max-width: 600px;
    margin: 15px auto 0;
}

.main-content {
    background-color: var(--color-dark);
}

.legal-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-dark-light);
}

.legal-content p {
    margin-bottom: 20px;
}

/* Contact Page */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    background: var(--color-dark-light);
    padding: 60px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info-panel h3 {
    margin-bottom: 20px;
}

.contact-info-panel p {
    margin-bottom: 40px;
}

.contact-details-list li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-details-list i {
    font-size: 1.5rem;
    color: var(--color-primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-dark);
    border-radius: 50%;
}

.contact-details-list h4 {
    margin-bottom: 5px;
}

/* Contact Form */
.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-light);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    background-color: var(--color-dark);
    border: 1px solid #334155;
    /* Slate 700 */
    border-radius: 8px;
    color: var(--color-light);
    font-family: var(--font-family);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

/* ------------------- */
/* 15. Popups & Misc */
/* ------------------- */
.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: opacity var(--transition-speed), visibility var(--transition-speed);
}

.popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--color-dark-light);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 450px;
    position: relative;
    transform: scale(0.9);
    transition: transform var(--transition-speed) var(--transition-timing);
}

.popup.show .popup-content {
    transform: scale(1);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    color: var(--color-slate);
    cursor: pointer;
}

.popup-icon {
    font-size: 4rem;
    color: var(--color-success);
    margin-bottom: 20px;
}

.popup-content h3 {
    margin-bottom: 10px;
}

/* Back to Top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-speed) ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    color: var(--color-white);
    transform: translateY(-5px);
    box-shadow: 0 5px 10px rgba(79, 70, 229, 0.4);
}

/* ------------------- */
/* 16. Animations */
/* ------------------- */
@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes shockwave {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(100);
        opacity: 0;
    }
}

@keyframes contentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes scroll-anim {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(10px);
        opacity: 0;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll[data-animation="fade-in-up"] {
    transform: translateY(50px);
}

.animate-on-scroll[data-animation="fade-in-down"] {
    transform: translateY(-50px);
}

.animate-on-scroll[data-animation="fade-in-left"] {
    transform: translateX(-50px);
}

.animate-on-scroll[data-animation="fade-in-right"] {
    transform: translateX(50px);
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translate(0, 0);
}

/* Load Animations (for non-scrolling pages) */
.animate-on-load {
    opacity: 0;
    animation: contentFadeIn 0.8s forwards;
}

/* ------------------- */
/* 17. Responsive Media Queries */
/* ------------------- */

/* Tablets and below */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    .section-padding {
        padding: 80px 0;
    }

    /* Header */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--color-dark-light);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.4s ease;
        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 30px;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: flex;
    }

    .header-actions .btn {
        display: none;
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image-wrapper {
        margin-bottom: 80px;
    }

    /* Process Section */
    .process-timeline::after {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }

    .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-step,
    .timeline-item:nth-child(even) .timeline-step {
        left: 20px;
    }

    /* Contact Page */
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 40px;
    }
}

/* Mobile phones */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .hero-title {
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .stats-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .slider-controls {
        display: none;
        /* Let slider autoplay on mobile */
    }

    .testimonial-slide {
        height: auto;
        min-height: 400px;
    }

    .testimonial-slider {
        height: 420px;
    }

    .footer-grid {
        text-align: center;
    }

    .footer-col-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center;
    }

    .footer-contact ul li {
        justify-content: center;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
    }

    .about-image-experience-box {
        bottom: -20px;
        right: 10px;
        padding: 15px;
    }

    .about-image-experience-box h3 {
        font-size: 2rem;
    }
}