/*
Theme Name: Spectrum Graphics
Description: A modern WordPress theme for Spectrum Graphics - featuring precision vinyl printing and laser engraving services with dark theme design and interactive elements.
Author: Custom Theme
Version: 1.0.0
Text Domain: spectrum-graphics
*/

:root {
    --primary-color: #007bff; /* Changed to a more vibrant blue */
    --primary-light: #00bfff;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color-primary: #ffffff;
    --text-color-secondary: #a0a0a0;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --spectrum-gradient: linear-gradient(90deg, #8a2be2, #007bff, #00e0b3, #ffeb3b);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-top: 80px; /* Account for fixed header */
    overflow-x: hidden;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Smooth page transitions between sections */
section {
    scroll-margin-top: 80px; /* Offset for sticky header */
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

/* Section fade-in animation on scroll */
.section-animate {
    opacity: 0;
    transform: translateY(20px);
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    background: linear-gradient(135deg, var(--surface-color) 0%, rgba(30, 30, 30, 0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 2px 4px var(--shadow-color),
        0 1px 0 rgba(138, 43, 226, 0.1);
    padding: 1rem 0;
    position: fixed; /* Changed to fixed for better sticky behavior */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(138, 43, 226, 0.1);
}

/* Header subtle animation */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--spectrum-gradient);
    opacity: 0.6;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Ensure logo and navigation are properly positioned */
header .logo,
header .custom-logo-link {
    flex-shrink: 0;
    z-index: 1;
}

header nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

/* Mobile menu toggle positioning */
.mobile-nav-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.logo {
    font-weight: 500;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav a {
    color: var(--text-color-primary);
    text-decoration: none;
    font-weight: 400;
    padding: 0.5rem 1rem;
    position: relative;
    overflow: hidden;
    transition: color var(--transition-speed);
}

nav a:hover {
    color: var(--primary-light);
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        background: var(--surface-color);
        flex-direction: column;
        padding: 4rem 0 2rem;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 15px var(--shadow-color);
        z-index: 9999; /* Higher z-index */
        overflow-y: auto;
        overscroll-behavior: contain; /* Prevent scroll chaining */
    }
    
    nav ul.active {
        right: 0;
    }
    
    nav li {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }
    
    nav a {
        display: block;
        padding: 1.2rem 2rem;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }
    
    .mobile-nav-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: rgba(0, 0, 0, 0.1);
        border: none;
        color: var(--text-color-primary);
        font-size: 1.5rem;
        cursor: pointer;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s ease;
        z-index: 10000;
    }
    
    .mobile-nav-close:hover,
    .mobile-nav-close:focus {
        background: rgba(0, 0, 0, 0.2);
        outline: none;
    }
    
    /* Mobile menu now without overlay - slides from right */
}

/* Prevent horizontal scroll when mobile nav is open */
body.nav-open {
    overflow-x: hidden;
    /* Allow vertical scrolling but prevent horizontal scroll */
}

/* Ensure no horizontal scroll */
html {
    overflow-x: hidden;
}

/* Body overflow handled in main body declaration */

/* Material Design Cards */
.dark-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.dark-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px 5px rgba(138, 43, 226, 0.5),
                0 0 20px 7px rgba(0, 123, 255, 0.4),
                0 0 25px 9px rgba(0, 224, 179, 0.3),
                0 0 30px 11px rgba(255, 235, 59, 0.2);
}

/* Updated CSS for Hero Section */
.hero-section {
    padding: 0;
}

.hero-image-container {
    width: 100%;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
}

.hero-content {
    text-align: center;
    padding: 1rem 2rem;
}

/* Section Styling */
section {
    padding: 4rem 0;
    position: relative;
}

/* Smooth scrolling already handled above */

/* ==========================================================================
   COMPREHENSIVE SECTION BACKGROUND DESIGNS
   ========================================================================== */

/* Global section enhancements */
section {
    position: relative;
    overflow: hidden;
}

/* Hero Section Background */
.hero-section,
#hero {
    position: relative;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(0, 123, 255, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--background-color) 0%, var(--surface-color) 100%);
    overflow: hidden;
}

.hero-section::before,
#hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -20%;
    width: 400px;
    height: 400px;
    background: conic-gradient(from 45deg, rgba(138, 43, 226, 0.15), rgba(0, 123, 255, 0.1), rgba(0, 224, 179, 0.1), rgba(255, 235, 59, 0.1), rgba(138, 43, 226, 0.15));
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    animation: hero-rotate 20s linear infinite;
}

.hero-section::after,
#hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(0, 224, 179, 0.1) 0%, rgba(255, 235, 59, 0.08) 40%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: hero-pulse 8s ease-in-out infinite;
}

@keyframes hero-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes hero-pulse {
    0%, 100% { transform: scale(1) translateY(0); opacity: 0.6; }
    50% { transform: scale(1.1) translateY(-10px); opacity: 0.8; }
}

/* About Section Background */
#about,
section.about-section,
.about-section {
    position: relative;
    background: 
        linear-gradient(135deg, var(--surface-color) 0%, #2a1810 30%, var(--background-color) 60%, #1a1a1a 100%);
    overflow: hidden;
}

#about::before,
section.about-section::before,
.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 30%, rgba(255, 235, 59, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 70%, rgba(138, 43, 226, 0.04) 0%, transparent 50%),
        linear-gradient(45deg, transparent 0%, rgba(0, 123, 255, 0.02) 50%, transparent 100%);
    z-index: 0;
    pointer-events: none;
}

#about::after,
section.about-section::after,
.about-section::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: linear-gradient(60deg, rgba(255, 235, 59, 0.08), rgba(0, 224, 179, 0.06));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(40px);
    z-index: 0;
    animation: morph 12s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { 
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(0deg);
    }
    25% { 
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
        transform: rotate(90deg);
    }
    50% { 
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
        transform: rotate(180deg);
    }
    75% { 
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
        transform: rotate(270deg);
    }
}

/* Services Section Background */
#services,
section.services-section,
.services-section {
    position: relative;
    background: linear-gradient(135deg, var(--background-color) 0%, #1a1a2e 50%, var(--surface-color) 100%);
    overflow: hidden;
}

#services::before,
section.services-section::before,
.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 123, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 224, 179, 0.05) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

#services::after,
section.services-section::after,
.services-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, rgba(138, 43, 226, 0.1), rgba(0, 123, 255, 0.1));
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    animation: float 6s ease-in-out infinite;
}

/* Portfolio Section Background */
#portfolio,
section.portfolio-section,
.portfolio-section {
    position: relative;
    background: linear-gradient(45deg, var(--surface-color) 0%, #16213e 30%, var(--background-color) 70%, #1a1a1a 100%);
    overflow: hidden;
}

#portfolio::before,
section.portfolio-section::before,
.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(0, 224, 179, 0.02) 50%, transparent 100%),
        radial-gradient(ellipse at 70% 30%, rgba(255, 235, 59, 0.08) 0%, transparent 70%),
        radial-gradient(circle at 30% 70%, rgba(0, 123, 255, 0.06) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

#portfolio::after,
section.portfolio-section::after,
.portfolio-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, rgba(0, 224, 179, 0.1), rgba(255, 235, 59, 0.1));
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: float-reverse 8s ease-in-out infinite;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-20px) translateX(10px); }
    66% { transform: translateY(10px) translateX(-5px); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(15px) translateX(-8px); }
    66% { transform: translateY(-25px) translateX(12px); }
}

/* Ensure content is above background */
#services .container,
#portfolio .container,
.services-section .container,
.portfolio-section .container {
    position: relative;
    z-index: 1;
}

/* Enhanced Section Titles with Glow Effect */
#services .section-title,
#portfolio .section-title,
.services-section .section-title,
.portfolio-section .section-title {
    position: relative;
    z-index: 2;
}

#services .section-title::before,
.services-section .section-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #8a2be2, #007bff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    z-index: -1;
    filter: blur(10px);
    opacity: 0.3;
}

#portfolio .section-title::before,
.portfolio-section .section-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #00e0b3, #ffeb3b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.4;
}

/* Service Cards Enhanced */
#services .service-card,
.services-section .service-card {
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#services .service-card:hover,
.services-section .service-card:hover {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(138, 43, 226, 0.3);
}

/* Portfolio Items Enhanced */
#portfolio .portfolio-item,
.portfolio-section .portfolio-item {
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px);
}

#portfolio .portfolio-item:hover,
.portfolio-section .portfolio-item:hover {
    transform: translateY(-8px);
}

/* Contact Section Background */
#contact,
section.contact-section,
.contact-section {
    position: relative;
    background: 
        linear-gradient(225deg, var(--background-color) 0%, #0f1419 25%, var(--surface-color) 70%, #1a1a1a 100%);
    overflow: hidden;
}

#contact::before,
section.contact-section::before,
.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 25% 25%, rgba(0, 224, 179, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 75%, rgba(0, 123, 255, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, transparent 0%, rgba(138, 43, 226, 0.03) 50%, transparent 100%);
    z-index: 0;
    pointer-events: none;
}

#contact::after,
section.contact-section::after,
.contact-section::after {
    content: '';
    position: absolute;
    top: 30%;
    left: -10%;
    width: 300px;
    height: 200px;
    background: linear-gradient(45deg, rgba(0, 224, 179, 0.1), rgba(0, 123, 255, 0.08));
    border-radius: 50% 20% 80% 40%;
    filter: blur(60px);
    z-index: 0;
    animation: contact-wave 10s ease-in-out infinite;
}

@keyframes contact-wave {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
    25% { transform: translateX(20px) translateY(-10px) rotate(5deg); }
    50% { transform: translateX(0) translateY(-20px) rotate(0deg); }
    75% { transform: translateX(-15px) translateY(-5px) rotate(-3deg); }
}

/* Widget Areas Background */
.section-widgets-area,
.after-hero-widgets,
.after-services-widgets,
.after-portfolio-widgets,
.after-contact-widgets {
    position: relative;
    background: 
        linear-gradient(90deg, var(--surface-color) 0%, rgba(30, 30, 30, 0.8) 50%, var(--surface-color) 100%);
    overflow: hidden;
}

.section-widgets-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.02) 0%, transparent 60%),
        linear-gradient(45deg, transparent 40%, rgba(0, 123, 255, 0.01) 50%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* ==========================================================================
   CONTENT VISIBILITY & Z-INDEX MANAGEMENT
   ========================================================================== */

/* Ensure all content is above background effects */
.hero-section .container,
#hero .container,
#about .container,
#contact .container,
.about-section .container,
.contact-section .container,
.section-widgets-area .container {
    position: relative;
    z-index: 1;
}

/* Hero content specific */
.hero-content,
.hero-image-container {
    position: relative;
    z-index: 2;
}

/* Section titles enhanced visibility */
.section-title {
    position: relative;
    z-index: 2;
}

/* Cards and interactive elements */
.dark-card,
.service-card,
.portfolio-item,
.contact-form,
.map-container {
    position: relative;
    z-index: 2;
}

/* Enhanced card effects with backdrop */
.dark-card {
    backdrop-filter: blur(5px);
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dark-card:hover {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgba(138, 43, 226, 0.2);
}

/* Form elements visibility */
.contact-form {
    backdrop-filter: blur(10px);
    background: rgba(30, 30, 30, 0.7);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Map container enhancement */
.map-container {
    backdrop-filter: blur(5px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Button enhancements */
.btn {
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 3;
}

/* Navigation enhancement */
nav ul {
    backdrop-filter: blur(10px);
}

/* Footer content visibility */
.footer-widgets,
.footer-bottom-content {
    position: relative;
    z-index: 1;
}

/* Subtle Particle Effect */
#services::before,
#portfolio::before {
    background-size: 20px 20px;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.02) 1px, transparent 0);
    animation: drift 20s linear infinite;
}

@keyframes drift {
    from { transform: translateX(0); }
    to { transform: translateX(20px); }
}

/* ==========================================================================
   SECTION BACKGROUNDS - RESPONSIVE BEHAVIOR
   ========================================================================== */

/* Reduce animation intensity on mobile for better performance */
@media (max-width: 768px) {
    /* Simplify hero background on mobile */
    .hero-section::before,
    #hero::before {
        width: 250px;
        height: 250px;
        filter: blur(60px);
        animation: none;
    }
    
    .hero-section::after,
    #hero::after {
        width: 200px;
        height: 200px;
        filter: blur(50px);
        animation: none;
    }
    
    /* Simplify about background on mobile */
    #about::after,
    .about-section::after {
        width: 150px;
        height: 150px;
        filter: blur(30px);
        animation: none;
    }
    
    /* Simplify services background on mobile */
    #services::after,
    .services-section::after {
        width: 200px;
        height: 200px;
        filter: blur(40px);
        animation: none;
    }
    
    /* Simplify portfolio background on mobile */
    #portfolio::after,
    .portfolio-section::after {
        width: 180px;
        height: 180px;
        filter: blur(50px);
        animation: none;
    }
    
    /* Simplify contact background on mobile */
    #contact::after,
    .contact-section::after {
        width: 160px;
        height: 120px;
        filter: blur(40px);
        animation: none;
    }
    
    /* Simplify footer background on mobile */
    .site-footer::after {
        width: 150px;
        height: 150px;
        filter: blur(40px);
        animation: none;
    }
    
    /* Reduce glow effects on mobile */
    #services .section-title::before,
    #portfolio .section-title::before,
    .services-section .section-title::before,
    .portfolio-section .section-title::before {
        display: none;
    }
    
    /* Simplify particle effects */
    #services::before,
    #portfolio::before {
        animation: none;
        background-image: none;
    }
}

/* Tablet optimizations */
@media (max-width: 991px) and (min-width: 769px) {
    #services::after,
    .services-section::after {
        width: 250px;
        height: 250px;
        filter: blur(50px);
    }
    
    #portfolio::after,
    .portfolio-section::after {
        width: 220px;
        height: 220px;
        filter: blur(60px);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .hero-section::before,
    .hero-section::after,
    #hero::before,
    #hero::after,
    #about::after,
    #services::after,
    #portfolio::after,
    #contact::after,
    .about-section::after,
    .services-section::after,
    .portfolio-section::after,
    .contact-section::after,
    .site-footer::after {
        animation: none !important;
    }
    
    #services::before,
    #portfolio::before {
        animation: none !important;
    }
    
    .float, .float-reverse, .hero-rotate, .hero-pulse, .morph, .contact-wave, .footer-glow {
        animation: none !important;
    }
}

/* Enhanced contrast for better accessibility */
@media (prefers-contrast: high) {
    .hero-section,
    #hero,
    #about,
    #services,
    #portfolio,
    #contact,
    .about-section,
    .services-section,
    .portfolio-section,
    .contact-section,
    .site-footer,
    .section-widgets-area {
        background: var(--background-color) !important;
    }
    
    .hero-section::before,
    .hero-section::after,
    #hero::before,
    #hero::after,
    #about::before,
    #about::after,
    #services::before,
    #services::after,
    #portfolio::before,
    #portfolio::after,
    #contact::before,
    #contact::after,
    .about-section::before,
    .about-section::after,
    .services-section::before,
    .services-section::after,
    .portfolio-section::before,
    .portfolio-section::after,
    .contact-section::before,
    .contact-section::after,
    .site-footer::before,
    .site-footer::after,
    .section-widgets-area::before {
        display: none !important;
    }
    
    header {
        background: var(--surface-color) !important;
        backdrop-filter: none !important;
    }
    
    header::before {
        display: none !important;
    }
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--spectrum-gradient);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--text-color-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--spectrum-gradient);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.btn:disabled,
.btn.sending {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--text-color-secondary) !important;
}

.btn.sending::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: button-spin 1s linear infinite;
}

@keyframes button-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grid Layout */
.grid-container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.service-card {
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.service-card:hover {
    cursor: pointer;
}

.service-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--spectrum-gradient);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.service-icon i {
    font-size: 2rem;
    color: var(--text-color-primary);
    z-index: 2;
}

.service-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-color);
    border-radius: 50%;
    transform: scale(0);
    transition: transform var(--transition-speed) ease;
    z-index: 1;
}

.service-card:hover .service-icon::before {
    transform: scale(0.9);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
    transition: transform var(--transition-speed);
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-color-primary);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform var(--transition-speed);
}

.portfolio-item:hover .item-overlay {
    transform: translateY(0);
}

/* Form Styling */
.contact-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color-secondary);
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--background-color);
    border: 1px solid var(--text-color-secondary);
    border-radius: var(--border-radius);
    color: var(--text-color-primary);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

/* Main Footer */
.site-footer {
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(138, 43, 226, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 0% 100%, rgba(0, 224, 179, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(0, 123, 255, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, var(--surface-color) 0%, #16191f 50%, #1a1a1a 100%);
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--spectrum-gradient);
    opacity: 0.8;
}

.site-footer::after {
    content: '';
    position: absolute;
    bottom: 20%;
    right: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 235, 59, 0.06) 0%, rgba(0, 224, 179, 0.04) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    animation: footer-glow 15s ease-in-out infinite;
}

@keyframes footer-glow {
    0%, 100% { transform: scale(1) translateY(0); opacity: 0.4; }
    50% { transform: scale(1.2) translateY(-20px); opacity: 0.6; }
}

/* Footer Widgets Area */
.footer-widgets-area {
    padding: 4rem 0 2rem;
    position: relative;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.footer-column {
    position: relative;
}

/* Footer Widget Styles */
.footer-widget {
    margin-bottom: 2rem;
}

.footer-widget-title {
    color: var(--text-color-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--spectrum-gradient);
    border-radius: 1px;
}

.widget-content {
    color: var(--text-color-secondary);
    line-height: 1.7;
}

.widget-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.widget-content p:last-child {
    margin-bottom: 0;
}

/* Footer Logo */
.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    max-width: 160px;
    height: auto;
    filter: brightness(1.1);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color-secondary);
    text-decoration: none;
    border-radius: 50%;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--text-color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    border-color: var(--primary-color);
}

/* Footer Links */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1rem;
}

.footer-links li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
    top: 0.1rem;
}

.footer-links li:last-child {
    margin-bottom: 0;
}

.footer-links a {
    color: var(--text-color-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition-speed);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-light);
    transform: translateX(3px);
}

/* Contact Info in Footer */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.95rem;
}

.contact-icon {
    color: var(--primary-color);
    font-size: 1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
    width: 16px;
}

.contact-item span {
    color: var(--text-color-secondary);
    line-height: 1.5;
}

.contact-item a {
    color: var(--text-color-secondary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.contact-item a:hover {
    color: var(--primary-light);
}

/* Footer Bottom Bar */
.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-copyright p {
    margin: 0;
    color: var(--text-color-secondary);
    font-size: 0.9rem;
}

.footer-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.footer-menu-list li {
    margin: 0;
}

.footer-menu-list a {
    color: var(--text-color-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

.footer-menu-list a:hover {
    color: var(--primary-light);
}

/* ==========================================================================
   FOOTER RESPONSIVE STYLES
   ========================================================================== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .footer-widgets {
        gap: 3rem;
    }
    
    .footer-logo img {
        max-width: 180px;
    }
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .footer-widgets {
        gap: 2rem;
    }
    
    .footer-widget-title {
        font-size: 1.2rem;
    }
}

/* Tablet (768px to 991px) - 2 columns */
@media (max-width: 991px) and (min-width: 769px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        row-gap: 3rem;
    }
    
    .footer-logo img {
        max-width: 140px;
    }
    
    .footer-widget-title {
        font-size: 1.15rem;
    }
    
    .social-links {
        gap: 0.6rem;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

/* Mobile (768px and below) - Single column */
@media (max-width: 768px) {
    .footer-widgets-area {
        padding: 3rem 0 2rem;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-widget-title {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .footer-widget-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-logo {
        text-align: center;
    }
    
    .footer-logo img {
        max-width: 160px;
    }
    
    .social-links {
        justify-content: center;
        gap: 1rem;
    }
    
    .footer-links {
        text-align: left;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .contact-info {
        text-align: left;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-menu-list {
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .footer-widgets-area {
        padding: 2rem 0 1.5rem;
    }
    
    .footer-widgets {
        gap: 2rem;
    }
    
    .footer-widget-title {
        font-size: 1.1rem;
        margin-bottom: 1.2rem;
    }
    
    .footer-logo img {
        max-width: 140px;
    }
    
    .social-links {
        gap: 0.8rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }
    
    .widget-content p,
    .footer-links a,
    .contact-item {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        padding: 1.2rem 0;
    }
    
    .footer-copyright p,
    .footer-menu-list a {
        font-size: 0.85rem;
    }
}



/* Ripple Effect (JavaScript-driven) */
.ripple-effect {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.ripple {
    display: block;
    position: absolute;
    background: var(--spectrum-gradient);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Contact Section */
.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.contact-form {
    flex: 1 1 50%;
    box-sizing: border-box;
    min-width: 300px;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color-primary);
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color-primary);
    font-size: 1rem;
    transition: border-color var(--transition-speed), background-color var(--transition-speed);
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-color-secondary);
}

.contact-form button {
    width: 100%;
    margin-top: 1rem;
}

.map-container {
    flex: 1 1 50%;
    height: 450px;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    min-width: 300px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
}

/* Enhanced mobile optimization for contact section */
@media (max-width: 768px) {
    .contact-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-form,
    .map-container {
        flex-basis: 100%;
        min-width: unset;
        margin: 0 auto;
    }
    
    .contact-form {
        order: 1;
        max-width: 100%;
    }
    
    .map-container {
        order: 2;
        height: 300px;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        display: block;
        overflow: hidden;
    }
    
    .map-container iframe {
        width: 100% !important;
        height: 100% !important;
        border-radius: var(--border-radius);
        display: block;
        margin: 0 auto;
    }
    
    .contact-form .form-group {
        margin-bottom: 1rem;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .contact-form textarea {
        min-height: 120px;
        resize: vertical;
    }
    
    .contact-form button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

/* Tablet-specific contact optimizations */
@media (max-width: 900px) and (min-width: 769px) {
    .contact-grid {
        gap: 1.5rem;
    }
    
    .map-container {
        height: 400px;
    }
}

/* Masonry Grid */
.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}
.masonry-grid .portfolio-item {
    margin-bottom: 1.5rem;
    display: inline-block;
    width: 100%;
}

/* Portfolio Tabs */
.portfolio-tabs {
    text-align: center;
    margin-bottom: 2rem;
}
.tab-btn {
    background: var(--surface-color);
    color: var(--text-color-primary);
    border: none;
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background var(--transition-speed);
}
.tab-btn:hover,
.tab-btn.active {
    background: var(--spectrum-gradient);
}

/* ==========================================================================
   MODAL STYLES - MOBILE OPTIMIZED
   ========================================================================== */

/* Base Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal.active {
    display: flex;
}

/* Modal Content Container */
.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    max-height: 90dvh;
    width: 100%;
    max-width: 800px;
    position: relative;
    border-radius: var(--border-radius);
    background-color: var(--surface-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: auto;
    animation: modal-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button - Mobile Optimized */
.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px; /* Touch-friendly size */
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-color-primary);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.close-btn:hover,
.close-btn:focus {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    outline: none;
}

/* Modal Body */
.modal-body {
    display: flex;
    flex-direction: row;
    max-height: 80vh;
    max-height: 80dvh;
    overflow: hidden;
}

.modal-image {
    width: 50%;
    height: auto;
    max-height: 80vh;
    max-height: 80dvh;
    object-fit: cover;
    display: block;
}

.modal-text-content {
    width: 50%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 80vh;
    max-height: 80dvh;
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .modal {
        padding: 1rem;
        align-items: center;
        justify-content: center;
    }
    
    .modal-content {
        max-width: 92vw;
        max-height: 80vh;
        max-height: 80dvh;
        width: 100%;
        margin: 0 auto;
        border-radius: var(--border-radius);
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        animation: modal-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    @keyframes modal-slide-up {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .modal-body {
        flex-direction: column;
        max-height: 75vh;
        max-height: 75dvh;
        overflow-y: auto;
    }
    
    .modal-image {
        width: 100%;
        max-height: 35vh;
        max-height: 35dvh;
        object-fit: cover;
    }
    
    .modal-text-content {
        width: 100%;
        padding: 1.2rem;
        max-height: 40vh;
        max-height: 40dvh;
        flex: 1;
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .close-btn {
        top: 8px;
        right: 8px;
        width: 40px; /* Maintain touch-friendly size */
        height: 40px;
        font-size: 1.2rem;
    }
    
    /* Adjust modal titles and content for mobile */
    .modal-text-content h3 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .modal-text-content h4 {
        font-size: 1.1rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .modal-text-content p {
        margin-bottom: 0.8rem;
    }
}

/* Small mobile optimization */
@media (max-width: 480px) {
    .modal {
        padding: 0.8rem;
    }
    
    .modal-content {
        max-width: 95vw;
        max-height: 75vh;
        max-height: 75dvh;
        border-radius: var(--border-radius);
    }
    
    .modal-text-content {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .modal-text-content h3 {
        font-size: 1.2rem;
    }
    
    .modal-text-content h4 {
        font-size: 1rem;
    }
    
    .close-btn {
        width: 38px; /* Maintain touch-friendly size */
        height: 38px;
        font-size: 1.1rem;
    }
}

/* Responsive Masonry */
@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}
@media (max-width: 600px) {
    .masonry-grid {
        column-count: 1;
    }
    
    /* Mobile-specific improvements */
    .container {
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dark-card {
        padding: 1.5rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .contact-grid {
        gap: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
}

/* Tablet responsive improvements */
@media (max-width: 900px) and (min-width: 601px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    /* Tablet Footer Responsive */
    .footer-content {
        gap: 2rem;
    }
    
    .footer-logo-section .footer-logo img {
        max-width: 160px;
    }
    
    .footer-widget-title {
        font-size: 1.25rem;
    }
    
    .company-bio p {
        font-size: 0.9rem;
    }
    
    .contact-details a,
    .contact-details span {
        font-size: 0.9rem;
    }
    
    .project-image {
        height: 110px;
    }
    
    .no-image-placeholder {
        height: 110px;
    }
}

/* WordPress specific styles */
.aligncenter {
    text-align: center;
}

.alignleft {
    float: left;
    margin-right: 1rem;
}

.alignright {
    float: right;
    margin-left: 1rem;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    margin-top: 0.5rem;
}

/* Post/Page content */
.content {
    padding: 2rem 0;
}

.entry-content {
    line-height: 1.8;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: var(--text-color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

/* Navigation menu styles */
.menu-item {
    position: relative;
}

.menu-item a {
    display: block;
}

/* Dropdown menu styles */
.menu-item:hover > .sub-menu {
    display: block;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--surface-color);
    box-shadow: 0 4px 8px var(--shadow-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    min-width: 200px;
}

.sub-menu a {
    padding: 0.75rem 1rem;
    color: var(--text-color-primary);
    text-decoration: none;
}

.sub-menu a:hover {
    background-color: var(--background-color);
    color: var(--primary-light);
}

/* SiteOrigin Page Builder Compatibility */
.panel-grid {
    margin: 0;
    padding: 0;
}

.panel-grid-cell {
    padding: 0;
}

.panel-widget-style {
    margin: 0;
}

.so-panel {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Ensure our theme styles work with Page Builder */
.so-panel .dark-card,
.panel-widget-style .dark-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.so-panel .hero-section {
    margin-bottom: 0;
}

.so-panel section {
    margin: 0;
}

/* Page Builder row spacing */
.panel-row-style {
    padding: 0 !important;
    margin: 0 !important;
}

/* Contact form messages */
.contact-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    text-align: center;
}

.contact-message.success {
    background-color: #2d5a27;
    color: #90ee90;
    border: 1px solid #4caf50;
}

.contact-message.error {
    background-color: #5a2727;
    color: #ff6b6b;
    border: 1px solid #f44336;
}

/* Section Widget Areas */
.section-widgets-area {
    padding: 2rem 0;
    background-color: rgba(30, 30, 30, 0.5);
}

.section-widget {
    margin-bottom: 1.5rem;
}

.section-widget:last-child {
    margin-bottom: 0;
}

.section-widget .widget-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Modal content styling */
.modal-text-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-text-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-text-content ul,
.modal-text-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-text-content strong {
    color: var(--primary-light);
}

.modal-text-content h4 {
    color: var(--primary-light);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--text-color-secondary);
    text-align: center;
}

.modal-quote-btn {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
}

/* Service modal with no image */
.modal-content .modal-body.no-image {
    flex-direction: column;
}

.modal-content .modal-body.no-image .modal-text-content {
    width: 100%;
    padding: 2rem;
}

/* SiteOrigin widget group styling */
.so-widget-spectrum-hero-widget,
.so-widget-spectrum-services-widget,
.so-widget-spectrum-portfolio-widget,
.so-widget-spectrum-contact-widget {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Page Template Styles */
.page-content {
    min-height: calc(100vh - 200px);
}

.page-header {
    background-color: var(--surface-color);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
}

.page-thumbnail {
    text-align: center;
    margin-top: 2rem;
}

.page-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.full-width-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.page-builder-content {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   PORTFOLIO LIGHTBOX - MOBILE OPTIMIZED
   ========================================================================== */

/* Portfolio Lightbox Container */
#portfolio-lightbox {
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    max-height: 95dvh;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: lightbox-fade-in 0.3s ease;
}

@keyframes lightbox-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Close Button - Touch Optimized */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 44px; /* Touch-friendly size */
    height: 44px;
    font-size: 1.5rem;
    color: var(--text-color-primary);
    cursor: pointer;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover,
.lightbox-close:focus {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    outline: none;
}

/* Navigation Buttons - Touch Optimized */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-color-primary);
    border: none;
    width: 44px; /* Touch-friendly size */
    height: 44px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-prev {
    left: 15px;
}

.lightbox-next {
    right: 15px;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-prev:focus,
.lightbox-next:focus {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
    outline: none;
}

/* Lightbox Image */
#lightboxImage {
    max-width: 100%;
    max-height: 75vh;
    max-height: 75dvh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: var(--background-color);
}

/* Lightbox Caption */
.lightbox-caption {
    padding: 1.5rem;
    text-align: center;
    width: 100%;
    background: var(--surface-color);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 20vh;
    overflow-y: auto;
}

.lightbox-caption h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.lightbox-caption p {
    color: var(--text-color-secondary);
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Mobile Lightbox Styles */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
        max-height: 85dvh;
        border-radius: var(--border-radius);
        margin: auto;
    }
    
    #lightboxImage {
        max-height: 60vh;
        max-height: 60dvh;
    }
    
    .lightbox-caption {
        padding: 1rem;
        max-height: 20vh;
        max-height: 20dvh;
        font-size: 0.9rem;
    }
    
    .lightbox-caption h4 {
        font-size: 1.2rem;
    }
    
    .lightbox-caption p {
        font-size: 0.9rem;
    }
    
    /* Adjust button positions for mobile */
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
}

/* Small mobile optimization */
@media (max-width: 480px) {
    .lightbox-caption {
        padding: 0.8rem;
    }
    
    .lightbox-caption h4 {
        font-size: 1.1rem;
    }
    
    .lightbox-caption p {
        font-size: 0.85rem;
    }
    
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
}

.standard-page {
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.comments-wrapper {
    margin: 2rem auto;
    padding: 2rem;
    max-width: 1200px;
}

.page-links {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    border-top: 1px solid var(--text-color-secondary);
}

.page-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed);
}

.page-links a:hover {
    background-color: var(--surface-color);
}

/* ==========================================================================
   FLOATING BACK TO TOP BUTTON WITH SPECTRUM EFFECT
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--spectrum-gradient);
    border: none;
    border-radius: 50%;
    color: var(--text-color-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 
        0 0 20px 8px rgba(138, 43, 226, 0.4),
        0 0 30px 12px rgba(0, 123, 255, 0.3),
        0 0 40px 16px rgba(0, 224, 179, 0.2),
        0 0 50px 20px rgba(255, 235, 59, 0.1);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

/* Spectrum effect similar to service icons */
.back-to-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-color);
    border-radius: 50%;
    transform: scale(0);
    transition: transform var(--transition-speed) ease;
    z-index: 1;
}

.back-to-top:hover::before {
    transform: scale(0.85);
}

.back-to-top i {
    z-index: 2;
    position: relative;
}

/* Mobile responsive back to top button */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

