/* 
 * ==========================================================================
 * J M Designs DIGITAL MARKETING AGENCY - CORE STYLESHEET
 * ==========================================================================
 * 
 * Table of Contents:
 * 1. Variables & Configuration
 * 2. Reset & Base Styles
 * 3. Typography
 * 4. Layout & Grid System
 * 5. Utility Classes
 * 6. Header & Navigation (Strict Consistency)
 * 7. Hero Section & Animations
 * 8. Components (Buttons, Cards, Inputs)
 * 9. Services Section
 * 10. Interactive Calculator
 * 11. Testimonials
 * 12. Legal Pages Styling
 * 13. Contact Form
 * 14. Footer (Strict Consistency)
 * 15. Animations & Keyframes
 * 16. Media Queries
 */

/* 1. VARIABLES & CONFIGURATION */
:root {
    /* Brand Colors */
    --color-primary: #00f2ea;
    /* Neon Cyan */
    --color-primary-dark: #00b8b2;
    --color-secondary: #ff0055;
    /* Neon Pink */
    --color-accent: #7000ff;
    /* Deep Purple */

    /* Backgrounds */
    --bg-body: #0a0b10;
    --bg-dark: #050507;
    --bg-card: #14161f;
    --bg-card-hover: #1a1d29;
    --bg-glass: rgba(20, 22, 31, 0.7);

    /* Text Colors */
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --text-dark: #0a0b10;

    /* Borders & Lines */
    --border-light: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(0, 242, 234, 0.5);

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-body: 'Poppins', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 2. RESET & BASE STYLES */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 3. TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-muted);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-mono {
    font-family: var(--font-mono);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* 4. LAYOUT & GRID SYSTEM */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

/* 5. UTILITY CLASSES */
.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

/* 6. HEADER & NAVIGATION (STRICT CONSISTENCY) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
    background: transparent;
}

.header.scrolled {
    background: rgba(10, 11, 16, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border-light);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    z-index: 1002;
}

.logo {
    height: 60px;
    width: auto;
    /* In case logo is black text, filter to make it white */
    filter: brightness(0) invert(1);
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1002;
}

.bar {
    width: 30px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition-normal);
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: right var(--transition-normal);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    text-align: center;
}

.mobile-nav li {
    margin: 25px 0;
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 700;
}

/* 7. HERO SECTION & ANIMATIONS */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #1a1f35 0%, var(--bg-body) 70%);
}

/* Animated Background Elements */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--color-secondary);
    animation: float 10s infinite ease-in-out;
}

.shape-2 {
    bottom: 10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--color-accent);
    animation: float 12s infinite ease-in-out reverse;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-subtitle {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 242, 234, 0.1);
    border: 1px solid var(--color-primary);
    border-radius: 50px;
    margin-bottom: 20px;
    animation: slideDown 0.8s ease forwards;
}

.hero-title {
    margin-bottom: 30px;
    opacity: 0;
    animation: slideUp 0.8s 0.2s ease forwards;
}

.hero-desc {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 40px;
    opacity: 0;
    animation: slideUp 0.8s 0.4s ease forwards;
}

.hero-btns {
    display: flex;
    gap: 20px;
    opacity: 0;
    animation: slideUp 0.8s 0.6s ease forwards;
}

/* 8. COMPONENTS */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 5px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(0, 242, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(0, 242, 234, 0.6);
    background: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 40px 30px;
    border-radius: 12px;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    display: inline-block;
}

/* Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 242, 234, 0.1);
}

/* 9. SERVICES SECTION */
.services-section {
    position: relative;
}

.service-card-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.service-features {
    margin-top: 20px;
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
}

.service-features li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-features li i {
    color: var(--color-secondary);
    font-size: 0.8rem;
}

/* 10. INTERACTIVE CALCULATOR */
.calculator-section {
    background: linear-gradient(rgba(10, 11, 16, 0.9), rgba(10, 11, 16, 0.9)), url('data:image/svg+xml;base64,...');
    background-size: cover;
    background-attachment: fixed;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.calc-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 15px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.calc-inputs h3 {
    margin-bottom: 25px;
}

.range-wrap {
    margin-bottom: 25px;
}

.range-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-body);
    border-radius: 5px;
    outline: none;
    padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 242, 234, 0.5);
}

.calc-results {
    background: var(--bg-body);
    padding: 30px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--border-light);
}

.result-item {
    text-align: center;
    margin-bottom: 30px;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-mono);
}

.result-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 11. TESTIMONIALS */
.testimonials-section {
    overflow: hidden;
}

.testimonial-track-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.testimonial-track-container::-webkit-scrollbar {
    display: none;
}

.testimonial-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.testimonial-card {
    width: 400px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    background: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 12. LEGAL PAGES STYLING */
.legal-content {
    background: var(--bg-body);
    min-height: 60vh;
}

.content-wrapper {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.content-wrapper h2 {
    color: var(--color-primary);
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.content-wrapper p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.content-wrapper ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.content-wrapper li {
    margin-bottom: 10px;
}

.page-header {
    padding: 180px 0 80px;
    text-align: center;
    background: linear-gradient(to bottom, #050507, #0a0b10);
}

.breadcrumbs {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--color-primary);
}

.breadcrumbs i {
    font-size: 0.7rem;
    margin: 0 10px;
}

/* 13. CONTACT FORM */
.contact-page-section {
    padding-bottom: var(--spacing-xl);
}

.contact-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
}

.contact-form-container {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid var(--border-light);
}

.contact-info-container {
    padding-top: 20px;
}

.contact-method {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.method-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 242, 234, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.method-details h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

/* 14. FOOTER (STRICT CONSISTENCY) */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-light);
    padding: 80px 0 30px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--color-primary);
    color: var(--bg-dark);
    border-color: var(--color-primary);
}

.footer-title {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--text-main);
}

.footer-list li {
    margin-bottom: 12px;
}

.footer-list a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-list a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--color-primary);
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 15. ANIMATIONS & KEYFRAMES */
@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-400px * 5));
    }

    /* adjust based on card width count */
}

/* Class to trigger animations via JS Observer */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Popup Styles */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.popup:target {
    opacity: 1;
    pointer-events: all;
}

.popup-content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--color-primary);
    text-align: center;
    max-width: 400px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.2);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.popup-content i {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}

/* 16. MEDIA QUERIES */
/* Laptop */
@media (max-width: 1200px) {
    .container {
        max-width: 1100px;
    }

    .testimonial-card {
        width: 350px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .calc-wrapper {
        grid-template-columns: 1fr;
    }

    .nav-list {
        display: none;
    }

    .header-actions .btn {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .header-actions .mobile-toggle .bar {
        background-color: var(--text-main);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .section-padding {
        padding: var(--spacing-lg) 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .contact-info li {
        justify-content: center;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .hero-btns .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .card {
        padding: 25px 20px;
    }

    .content-wrapper {
        padding: 20px;
    }
}