/* 
  ========================================== THE SOCIAL ARTIST - MAIN STYLESHEET ==========================================
  
  This stylesheet contains all the styling for The Social Artist website including:
  - Light/Dark theme variables and transitions
  - Component-specific styles (buttons, cards, animations)
  - Responsive design utilities
  - Custom animations and effects
  - Dark mode overrides and enhancements
  - Mobile optimization improvements
  
  Author: Lahori Venkatesh
  Version: 2.1 (Updated with Mobile Optimization & Enhanced UI)
  Last Updated: 2025
*/

/* ========================================== THEME VARIABLES ========================================== */
/* CSS Variables for Light/Dark Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --nav-bg: rgba(17, 24, 39, 0.95);
    --card-bg: #1f2937;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Theme transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

:where([class^="ri-"])::before { 
    content: "\f3c2"; 
}

.scroll-container {
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.stats-count {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.stats-count.animate {
    opacity: 1;
    transform: translateY(0);
}

.hero-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.portfolio-item {
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.05);
}

.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* CTA Button Fixes */
.hero-gradient a[href*="calendly"],
.hero-gradient a[href*="index.html"] {
    position: relative;
    z-index: 30;
    pointer-events: auto;
    cursor: pointer;
}

.hero-gradient a[href*="calendly"]:hover,
.hero-gradient a[href*="index.html"]:hover {
    z-index: 31;
}

/* Dark theme body styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Dark theme navigation styles */
nav {
    background-color: var(--nav-bg) !important;
}

/* Dark theme card styles */
.service-card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

/* Dark theme text styles */
.dark .text-gray-700 {
    color: var(--text-secondary);
}

.dark .text-gray-600 {
    color: var(--text-secondary);
}

/* Dark theme background styles */
.dark .bg-white {
    background-color: var(--bg-primary);
}

.dark .bg-gray-50 {
    background-color: var(--bg-secondary);
}

/* Dark theme border styles */
.dark .border-gray-200 {
    border-color: var(--border-color);
}

/* Dark theme form and input styles */
.dark input, .dark textarea, .dark select {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.dark input::placeholder, .dark textarea::placeholder {
    color: var(--text-secondary);
}

/* Dark theme button hover states */
.dark .hover\:bg-gray-100:hover {
    background-color: var(--bg-secondary);
}

.dark .hover\:text-primary:hover {
    color: #dc2626;
}

/* Dark theme shadow adjustments */
.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Dark theme gradient adjustments */
.dark .section-gradient {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Dark theme text color overrides */
.dark .text-gray-800 {
    color: var(--text-primary);
}

.dark .text-gray-500 {
    color: var(--text-secondary);
}

/* Dark theme background overrides */
.dark .bg-gray-50 {
    background-color: var(--bg-secondary);
}

.dark .bg-gray-100 {
    background-color: var(--bg-secondary);
}

/* Portfolio page navbar visibility fixes */
nav {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
}

.dark nav {
    background-color: rgba(17, 24, 39, 0.95) !important;
}

/* Ensure navbar text is visible in both modes */
nav a {
    color: #374151 !important;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #dc2626 !important;
}

.dark nav a {
    color: #d1d5db !important;
}

.dark nav a:hover {
    color: #dc2626 !important;
}

/* Mobile menu button visibility */
#mobileMenuBtn {
    color: #374151 !important;
}

.dark #mobileMenuBtn {
    color: #d1d5db !important;
}

/* Book Free Call button styling */
.gradient-motion,
a[href*="calendly"] {
    color: rgb(153, 6, 6) !important;
}

.gradient-motion:hover,
a[href*="calendly"]:hover {
    color: rgb(153, 6, 6) !important;
}

/* Override any text color classes for the Book Free Call button */
a[href*="calendly"].text-white,
a[href*="calendly"] .text-white {
    color: white !important;
}

/* Ensure button text stays white in all states */
a[href*="calendly"] {
    color: rgb(153, 6, 6) !important;
}

a[href*="calendly"] * {
    color: rgb(153, 6, 6) !important;
}

/* Navbar active state styling */
nav a.text-primary,
nav a.font-semibold {
    color: #dc2626 !important;
}

.dark nav a.text-primary,
.dark nav a.font-semibold {
    color: #dc2626 !important;
}

/* Ensure all primary colored links are red */
.text-primary {
    color: #dc2626 !important;
}

.dark .text-primary {
    color: #dc2626 !important;
}

/* Enhanced red stroke effects for dark mode */
.dark .border-red-300 {
    border-color: #fca5a5;
}

.dark .border-red-500 {
    border-color: #ef4444;
}

.dark .border-red-700 {
    border-color: #b91c1c;
}

/* Dark mode card enhancements */
.dark .service-card {
    border: 2px solid #374151;
    transition: all 0.3s ease;
}

.dark .service-card:hover {
    border-color: #dc2626;
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.2);
}

/* Dark mode testimonial card enhancements */
.dark .testimonial-card {
    border: 2px solid #374151;
    transition: all 0.3s ease;
}

.dark .testimonial-card:hover {
    border-color: #dc2626;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

/* Testimonial card red stroke styling */
.testimonial-card, 
.bg-white.p-8.rounded-xl.shadow-lg.border {
    border: 2px solid #fecaca !important;
    transition: all 0.3s ease;
}

.testimonial-card:hover,
.bg-white.p-8.rounded-xl.shadow-lg.border:hover {
    border-color: #fca5a5 !important;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.1);
}

.dark .testimonial-card,
.dark .bg-white.p-8.rounded-xl.shadow-lg.border {
    border: 2px solid #7f1d1d !important;
    background-color: #1f2937 !important;
}

.dark .testimonial-card:hover,
.dark .bg-white.p-8.rounded-xl.shadow-lg.border:hover {
    border-color: #dc2626 !important;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

/* ========================================== MOBILE OPTIMIZATION ========================================== */
/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .scroll-container {
        animation-duration: 20s;
    }
    
    .hero-bg {
        padding: 2rem 1rem;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
    
    /* Mobile navigation improvements */
    nav {
        padding: 0.5rem 1rem;
    }
    
    nav .max-w-6xl {
        padding: 0 1rem;
    }
    
    /* Mobile hero section improvements */
    .hero-gradient {
        padding: 2rem 1rem;
        min-height: 80vh;
    }
    
    .hero-gradient h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-gradient p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Mobile button improvements */
    .hero-gradient .flex.flex-col.sm\\:flex-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-gradient .flex.flex-col.sm\\:flex-row a {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    /* Mobile section spacing */
    section {
        padding: 3rem 1rem !important;
    }
    
    /* Mobile grid improvements */
    .grid.grid-cols-1.md\\:grid-cols-2,
    .grid.grid-cols-1.md\\:grid-cols-3,
    .grid.grid-cols-1.md\\:grid-cols-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Mobile card improvements */
    .service-card,
    .testimonial-card,
    .bg-white.p-8.rounded-xl.shadow-lg {
        padding: 1.5rem !important;
        margin-bottom: 1rem;
    }
    
    /* Mobile text improvements */
    h2 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
    }
    
    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    /* Mobile form improvements */
    input, textarea, select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem 1rem !important;
    }
    
    /* Mobile support widget improvements */
    #supportWidget {
        bottom: 1rem;
        right: 1rem;
    }
    
    #supportBtn {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    #supportPanel {
        width: calc(100vw - 2rem);
        right: 0;
        bottom: 4rem;
    }
    
    /* Mobile client logos improvements */
    .client-logo-img {
        width: 60px !important;
        height: 60px !important;
        margin: 0 0.5rem 0.5rem 0.5rem !important;
    }
    
    /* Mobile testimonial improvements */
    .testimonial-container {
        height: 400px !important;
        overflow: hidden !important;
    }
    
    .testimonial-column-up,
    .testimonial-column-down {
        animation: scrollUpMobile 30s linear infinite !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .grid.grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Portfolio page testimonial scrolling */
    .testimonial-scroll-container {
        scrollbar-width: thin;
        scrollbar-color: #dc2626 #f3f4f6;
    }
    
    .testimonial-scroll-container::-webkit-scrollbar {
        height: 6px;
    }
    
    .testimonial-scroll-container::-webkit-scrollbar-track {
        background: #f3f4f6;
        border-radius: 3px;
    }
    
    .testimonial-scroll-container::-webkit-scrollbar-thumb {
        background: #dc2626;
        border-radius: 3px;
    }
    
    .testimonial-scroll-container::-webkit-scrollbar-thumb:hover {
        background: #b91c1c;
    }
    
    /* Mobile testimonial infinite scrolling */
    .testimonial-scroll-mobile {
        height: 400px;
        overflow: hidden;
        position: relative;
    }
    
    .testimonial-scroll-mobile .testimonial-column-up {
        animation: scrollUpMobile 30s linear infinite;
    }
    
    @keyframes scrollUpMobile {
        0% { transform: translateY(0); }
        100% { transform: translateY(-50%); }
    }
    
    .testimonial-scroll-mobile .testimonial-column-up:hover {
        animation-play-state: paused;
    }
    
    .grid.grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Mobile portfolio improvements */
    .portfolio-item {
        margin-bottom: 1rem;
    }
    
    .portfolio-item img,
    .portfolio-item video {
        height: 200px !important;
    }
    
    /* Mobile filter buttons improvements */
    .filter-btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem;
    }
    
    .flex.flex-wrap.justify-center.gap-4 {
        flex-direction: column;
        align-items: center;
    }
    
    /* Mobile footer improvements */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }
    
    /* Mobile spacing improvements */
    .mb-16, .mb-12 {
        margin-bottom: 2rem !important;
    }
    
    .py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Mobile logo improvements */
    nav img {
        height: 2.5rem !important;
        margin: 0 !important;
    }
    
    /* Mobile menu improvements */
    #mobileMenu {
        padding: 1rem !important;
    }
    
    #mobileMenu a {
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .hero-gradient h1 {
        font-size: 2rem !important;
    }
    
    .hero-gradient p {
        font-size: 0.9rem !important;
    }
    
    section {
        padding: 2rem 0.5rem !important;
    }
    
    .service-card,
    .testimonial-card,
    .bg-white.p-8.rounded-xl.shadow-lg {
        padding: 1rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    .client-logo-img {
        width: 50px !important;
        height: 50px !important;
    }
    
    #supportPanel {
        width: calc(100vw - 1rem);
        right: 0.5rem;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-gradient {
        min-height: 60vh;
        padding: 1rem;
    }
    
    .hero-gradient h1 {
        font-size: 2rem !important;
    }
    
    section {
        padding: 2rem 1rem !important;
    }
}

/* Button styles */
.btn-primary {
    background-color: #dc2626;
    color: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}

.btn-primary:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

/* Gradient motion button */
.gradient-motion {
    background: linear-gradient(45deg, #dc2626, #b91c1c, #991b1b, #dc2626);
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite;
    position: relative;
    overflow: hidden;
}

.gradient-motion::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.gradient-motion:hover::before {
    left: 100%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-secondary {
    border: 2px solid #dc2626;
    color: #dc2626;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

/* Modern card styles */
.service-card {
    transition: all 0.4s ease;
    border: 1px solid rgba(220, 38, 38, 0.1);
    backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.2);
}

/* Enhanced animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Modern gradient backgrounds */
.hero-gradient {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Removed dotted texture for cleaner look */
    background: transparent;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Removed texture shift for cleaner look */
    background: transparent;
}

@keyframes textureMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-50px) translateY(-50px); }
}

@keyframes textureShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.section-gradient {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* Testimonial infinite scrolling animation */
.testimonial-container {
    height: 600px;
    overflow: hidden;
}

.testimonial-column-down {
    animation: scrollDown 25s linear infinite;
}

.testimonial-column-up {
    animation: scrollUp 25s linear infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

@keyframes scrollUp {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(0); }
}

.testimonial-column-down:hover,
.testimonial-column-up:hover {
    animation-play-state: paused;
}

/* Client logos infinite scrolling */
.client-logos-container {
    overflow: hidden;
    white-space: nowrap;
}

.client-logos-track {
    display: inline-flex;
    animation: scrollHorizontal 20s linear infinite;
}

@keyframes scrollHorizontal {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.client-logo {
    flex-shrink: 0;
    margin: 0 2rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.client-logo:hover {
    opacity: 1;
}
