/* ===========================================
   FRWRD Marketing Theme - Custom Styles
   =========================================== */

/* CSS Variables for WordPress */
:root {
    --color-background: #030303;
    --color-foreground: #FFFFFF;
    --color-accent: #000000;
    --color-accent-foreground: #FFFFFF;
    --color-muted: #27272A;
    --color-muted-foreground: #A1A1AA;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-input: rgba(255, 255, 255, 0.05);
    --color-ring: rgba(255, 255, 255, 0.2);
    --color-card: #050505;
    --color-card-foreground: #FFFFFF;
    --color-zinc-300: #D4D4D8;
    --color-zinc-400: #A1A1AA;
    --color-zinc-500: #71717A;
    --color-zinc-600: #52525B;
    --color-zinc-700: #3F3F46;
    --color-zinc-800: #27272A;
    --color-zinc-900: #18181B;
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: #ffffff;
    color: #000000;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 2px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-zinc-600);
}

/* Noise Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ===========================================
   HEADER STYLES
   =========================================== */
.frwrd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    mix-blend-mode: difference;
}

.header-inner {
    height: 6rem;
}

.header-logo a {
    font-family: var(--wp--preset--font-family--plus-jakarta-sans);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: #fff !important;
    transition: opacity 0.3s;
}

.header-logo a:hover {
    opacity: 0.7;
}

.header-nav .wp-block-navigation__container {
    gap: 3rem;
}

.header-nav .wp-block-navigation-item a {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s;
    position: relative;
}

.header-nav .wp-block-navigation-item a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.3s;
}

.header-nav .wp-block-navigation-item a:hover {
    color: #fff;
}

.header-nav .wp-block-navigation-item a:hover::after {
    width: 100%;
}

.header-cta .wp-block-button__link {
    border-color: #fff !important;
}

.header-cta .wp-block-button__link:hover {
    background: #fff !important;
    color: #000 !important;
}

/* Mobile menu visibility */
@media (max-width: 767px) {
    .header-nav,
    .header-cta-wrap {
        display: none !important;
    }
}

/* ===========================================
   TYPOGRAPHY UTILITIES
   =========================================== */
.italic {
    font-style: italic;
}

.muted {
    color: var(--color-zinc-500);
    font-weight: 300;
}

/* ===========================================
   HERO SECTIONS
   =========================================== */
.frwrd-page-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-label-wrap .wp-block-separator {
    margin: 0;
    width: 48px;
}

.hero-title span[style*="italic"] {
    display: inline-block;
    padding-top: 0.1em;
}

/* ===========================================
   WORK CARDS
   =========================================== */
.work-card {
    position: relative;
    overflow: hidden;
}

.work-card-image img {
    transition: transform 0.5s ease;
}

.work-card:hover .work-card-image img {
    transform: scale(1.05);
}

.work-card h3 a {
    transition: color 0.3s;
}

.work-card:hover h3 a {
    color: var(--color-zinc-400);
}

/* ===========================================
   SERVICE CARDS
   =========================================== */
.service-card {
    transition: border-color 0.3s;
}

.service-card:hover {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ===========================================
   BUTTONS
   =========================================== */
.wp-block-button__link {
    border-radius: 0 !important;
}

.wp-block-button__link:hover {
    transform: translateY(-1px);
}

/* ===========================================
   FOOTER STYLES
   =========================================== */
.frwrd-footer .footer-logo a {
    font-family: var(--wp--preset--font-family--plus-jakarta-sans);
    font-weight: 600;
}

.frwrd-footer .footer-nav .wp-block-navigation-item a:hover {
    color: var(--color-zinc-400);
}

.frwrd-footer .wp-block-social-links a {
    color: var(--color-zinc-500);
    transition: color 0.3s;
}

.frwrd-footer .wp-block-social-links a:hover {
    color: #fff;
}

.footer-bottom a:hover {
    color: var(--color-zinc-500) !important;
}

/* ===========================================
   CONTACT FORM STYLES
   =========================================== */
.frwrd-contact-form .form-group input:focus,
.frwrd-contact-form .form-group textarea:focus {
    outline: none;
    border-color: var(--color-ring);
}

.frwrd-contact-form button:hover {
    background: #e4e4e7;
}

/* Contact Form 7 Styling */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1rem;
    font-family: var(--wp--preset--font-family--inter);
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--color-ring);
}

.wpcf7-form input[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    background: #fff;
    color: #000;
    border: none;
    padding: 1rem 3rem;
    cursor: pointer;
    transition: background 0.3s;
}

.wpcf7-form input[type="submit"]:hover {
    background: #e4e4e7;
}

/* ===========================================
   LEGAL PAGE STYLES
   =========================================== */
.frwrd-legal-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.frwrd-legal-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.frwrd-legal-content p {
    color: var(--color-zinc-400);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.frwrd-legal-content ul {
    color: var(--color-zinc-400);
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.frwrd-legal-content li {
    margin-bottom: 0.5rem;
}

/* ===========================================
   ANIMATIONS
   =========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: clamp(3rem, 8vw, 6rem) !important;
    }
}

@media (max-width: 768px) {
    .frwrd-page-hero {
        min-height: auto !important;
        padding-top: 6rem !important;
    }

    .header-inner {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .service-item {
        flex-direction: column;
        gap: 1rem;
    }

    .service-item > div:last-child {
        flex-basis: 100% !important;
    }
}

/* ===========================================
   WORDPRESS EDITOR SPECIFIC
   =========================================== */
.editor-styles-wrapper {
    background-color: var(--color-background);
    color: var(--color-foreground);
}

.editor-styles-wrapper .wp-block {
    max-width: 100%;
}

/* ===========================================
   CASE STUDY STYLES
   =========================================== */

/* Back Link */
.back-link-wrap a {
    color: var(--color-zinc-500);
    text-decoration: none;
    transition: color 0.3s;
}

.back-link-wrap a:hover {
    color: #fff;
}

/* Case Hero */
.case-hero {
    min-height: auto;
}

.case-hero-grid {
    align-items: center;
}

.case-hero-image-col img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.case-category a {
    color: var(--color-zinc-500) !important;
    text-decoration: none;
}

.case-meta {
    gap: 0;
}

.case-meta-item p {
    margin: 0;
    line-height: 1.4;
}

/* Case Sections */
.case-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--color-border);
}

.case-section-narrow {
    max-width: 700px;
}

.case-section-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-zinc-500);
    margin-bottom: 1.5rem;
}

.case-section-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--color-zinc-300);
}

.case-section-text-sm {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-zinc-400);
}

/* Two Column Layout */
.case-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

@media (max-width: 768px) {
    .case-two-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Services Tags */
.services-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.service-tag {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-zinc-300);
    transition: all 0.3s;
}

.service-tag:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* Project Showcase / Gallery */
.project-showcase {
    position: relative;
}

.showcase-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.showcase-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.showcase-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.showcase-slide.active {
    opacity: 1;
}

.showcase-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.showcase-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.showcase-nav:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.showcase-nav.prev {
    left: 1rem;
}

.showcase-nav.next {
    right: 1rem;
}

.showcase-nav svg {
    width: 24px;
    height: 24px;
}

.showcase-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    letter-spacing: 0.05em;
}

.showcase-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.showcase-dot {
    width: 8px;
    height: 8px;
    border-radius: 0;
    background: var(--color-zinc-600);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.showcase-dot.active {
    width: 48px;
    height: 8px;
    background: #fff;
}

.showcase-dot:hover {
    background: var(--color-zinc-400);
}

/* Showcase Mobile Responsive */
@media (max-width: 767px) {
    .showcase-nav {
        width: 40px;
        height: 40px;
    }

    .showcase-nav svg {
        width: 20px;
        height: 20px;
    }

    .showcase-nav.prev {
        left: 0.75rem;
    }

    .showcase-nav.next {
        right: 0.75rem;
    }

    .showcase-counter {
        font-size: 12px;
        padding: 0.375rem 0.75rem;
    }

    .showcase-dot.active {
        width: 32px;
    }

    .showcase-dots {
        gap: 0.5rem;
        margin-top: 1.5rem;
    }
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

.result-card {
    padding: 2rem;
    border: 1px solid var(--color-border);
    text-align: center;
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 0.5rem;
}

.result-metric {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-zinc-500);
    margin-bottom: 0.75rem;
}

.result-desc {
    font-size: 0.875rem;
    color: var(--color-zinc-400);
    margin: 0;
}

/* Case CTA */
.case-cta {
    text-align: center;
}

.case-cta h2 {
    margin-bottom: 1rem;
}

/* Case Content Blocks */
.case-content .wp-block-heading {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.case-content h2.wp-block-heading {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-zinc-500);
}

.case-content h3.wp-block-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.case-content > .wp-block-group {
    padding: 4rem 0;
    border-bottom: 1px solid var(--color-border);
}

.case-content > .wp-block-group:last-child {
    border-bottom: none;
}

/* Overview Text */
.case-overview-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--color-zinc-300);
    max-width: 700px;
}

/* Challenge Solution Grid */
.case-challenge-solution {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

@media (max-width: 768px) {
    .case-challenge-solution {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .case-hero-grid {
        flex-direction: column;
    }

    .case-hero-grid .wp-block-column {
        flex-basis: 100% !important;
    }
}

/* Gallery in Content */
.case-content .wp-block-gallery {
    margin: 2rem 0;
}

.case-content .wp-block-gallery img {
    border-radius: 0;
}


/* ===================================================
   Contact Page: Send Inquiry Button Hover Fix
   =================================================== */
.form-submit-btn:hover {
    background: #d4d4d8 !important;
    color: #000 !important;
}

/* ===================================================
   Services Page: Mobile Responsive Fixes
   =================================================== */
@media (max-width: 750px) {
    html, body {
        overflow-x: hidden;
    }

    .page-hero-title {
        font-size: clamp(3rem, 12vw, 3.75rem) !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .page-hero {
        padding: 8rem 1.25rem 3rem !important;
    }

    .page-hero .container {
        padding: 0 !important;
    }

    .page-hero-desc,
    .page-hero-text {
        font-size: 1rem;
    }

    .services-list-section {
        padding: 3rem 1.25rem !important;
    }

    .services-list-section .container {
        padding: 0 !important;
        gap: 3.5rem;
    }

    .service-item {
        gap: 1.25rem;
    }

    .service-title {
        font-size: 1.5rem;
    }

    .service-desc {
        font-size: 0.95rem;
    }

    .service-features {
        padding-top: 1.25rem;
        border-top: 1px solid var(--color-border);
        border-left: none !important;
        padding-left: 0 !important;
    }

    .process-section {
        padding: 3rem 1.25rem !important;
    }

    .process-section .container {
        padding: 0 !important;
    }

    .process-header {
        margin-bottom: 2rem;
    }

    .process-grid {
        gap: 1.5rem;
    }

    .process-num {
        font-size: 1.75rem;
    }

    .process-title {
        font-size: 1.15rem;
    }

    .industry-section {
        padding: 3rem 1.25rem !important;
    }

    .industry-section .container {
        padding: 0 !important;
    }

    .industry-header {
        margin-bottom: 2.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .industry-title {
        font-size: 1.75rem;
    }

    .industry-card {
        padding: 1.5rem;
    }

    .industry-name {
        font-size: 1.15rem;
    }
}