/*
 * Rankmeld Theme Styles
 * Main frontend styles
 */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: rgba(255, 107, 107, 0.3);
    color: #0a1628;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
}

/* Entry content styles */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.entry-content blockquote {
    border-left: 4px solid #ff6b6b;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: rgba(10, 22, 40, 0.7);
}

.entry-content img {
    border-radius: 16px;
    margin: 2rem 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ff6b6b;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Admin bar fix */
body.admin-bar .navbar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .navbar {
        top: 46px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .scroll-cue,
    .automation-btn,
    .form-submit {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ============================================
   MOBILE RESPONSIVENESS - COMPREHENSIVE FIXES
   ============================================ */

/* Tablet and below (max-width: 1024px) */
@media (max-width: 1024px) {
    /* Reduce section padding */
    .services-section,
    .origin,
    .duo,
    .clients,
    .reviews,
    .manifesto,
    .automation,
    .cta,
    .contact-section {
        padding: 64px 20px !important;
    }
    
    /* Hero adjustments */
    .hero-inner {
        padding: 100px 20px 60px !important;
    }
    
    /* Comparison strip */
    .comparison {
        padding: 32px 20px !important;
    }
    
    .comparison-grid {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .comparison-item {
        flex: 1 1 calc(33.333% - 16px);
        min-width: 140px;
        border-right: none !important;
        border-bottom: 1px solid rgba(10, 22, 40, 0.06);
        padding: 12px;
    }
    
    /* Client and review grids */
    .clients-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    }
    
    .reviews-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    /* Navbar adjustments */
    .navbar-inner {
        padding: 12px 16px !important;
    }
    
    .nav-logo img {
        height: 40px !important;
    }
    
    /* Hero section */
    .hero-inner {
        padding: 100px 16px 40px !important;
    }
    
    .hero-content {
        gap: 40px !important;
    }
    
    .hero-tag {
        margin-bottom: 24px !important;
    }
    
    .story-line {
        font-size: clamp(2rem, 8vw, 3rem) !important;
    }
    
    .hero-desc {
        font-size: 15px !important;
        max-width: 100% !important;
    }
    
    .hero-pills {
        margin-bottom: 32px !important;
    }
    
    /* Stats */
    .hero-stats {
        gap: 8px !important;
    }
    
    .stat-box {
        padding: 10px 8px !important;
    }
    
    .stat-value {
        font-size: 18px !important;
    }
    
    .stat-label {
        font-size: 9px !important;
    }
    
    /* Comparison strip - stack on mobile */
    .comparison {
        padding: 24px 16px !important;
    }
    
    .comparison-label {
        font-size: 9px !important;
        margin-bottom: 20px !important;
    }
    
    .comparison-grid {
        flex-direction: column;
        gap: 0;
    }
    
    .comparison-item {
        flex: 1 1 100%;
        padding: 12px;
        border-right: none !important;
        border-bottom: 1px solid rgba(10, 22, 40, 0.08);
    }
    
    .comparison-item:last-child {
        border-bottom: none;
    }
    
    .comparison-name {
        font-size: 13px !important;
    }
    
    .comparison-sub {
        font-size: 9px !important;
    }
    
    /* Services */
    .services-section {
        padding: 48px 16px !important;
    }
    
    .services-header {
        margin-bottom: 32px !important;
    }
    
    .service-card {
        padding: 24px !important;
    }
    
    .service-icon-wrap {
        width: 56px !important;
        height: 56px !important;
        font-size: 24px !important;
    }
    
    .service-name {
        font-size: 18px !important;
    }
    
    /* Origin story */
    .origin {
        padding: 48px 16px !important;
    }
    
    .origin-tag {
        margin-bottom: 32px !important;
    }
    
    .origin-card {
        padding: 24px 20px !important;
    }
    
    .origin-num {
        font-size: 60px !important;
    }
    
    .origin-card-title {
        font-size: 20px !important;
    }
    
    .origin-desc {
        font-size: 13px !important;
    }
    
    /* Duo section */
    .duo {
        padding: 48px 16px !important;
    }
    
    .duo-header {
        margin-bottom: 40px !important;
    }
    
    .duo-card {
        padding: 24px !important;
    }
    
    .duo-card-header {
        gap: 16px !important;
    }
    
    .duo-avatar {
        width: 64px !important;
        height: 64px !important;
    }
    
    .duo-name {
        font-size: 18px !important;
    }
    
    .duo-quote {
        font-size: 13px !important;
    }
    
    /* Clients */
    .clients {
        padding: 48px 16px !important;
    }
    
    .clients-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
        margin-bottom: 24px !important;
    }
    
    .clients-filters {
        margin-bottom: 24px !important;
    }
    
    .clients-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Reviews */
    .reviews {
        padding: 48px 16px !important;
    }
    
    .reviews-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 16px;
        margin-bottom: 32px !important;
    }
    
    .reviews-rating {
        text-align: left !important;
    }
    
    .rating-num {
        font-size: 36px !important;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Manifesto */
    .manifesto {
        padding: 48px 16px !important;
    }
    
    .manifesto-line {
        font-size: clamp(1.25rem, 5vw, 1.75rem) !important;
    }
    
    .manifesto-desc {
        font-size: 15px !important;
    }
    
    /* Automation */
    .automation {
        padding: 48px 16px !important;
    }
    
    .automation-diagram {
        padding: 24px !important;
        min-height: 250px !important;
    }
    
    /* CTA */
    .cta {
        padding: 48px 16px !important;
    }
    
    .cta-title {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
    }
    
    .cta-desc {
        font-size: 13px !important;
    }
    
    /* Contact */
    .contact-section {
        padding: 48px 16px !important;
    }
    
    .contact-left {
        padding-top: 0 !important;
    }
    
    .contact-title {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
    }
    
    .contact-desc {
        font-size: 14px !important;
    }
    
    /* Footer */
    .site-footer {
        padding: 32px 16px !important;
    }
    
    /* General buttons on mobile */
    .btn-primary,
    .btn-secondary,
    .nav-mobile-cta,
    .form-submit {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero-inner {
        padding: 90px 12px 32px !important;
    }
    
    .story-line {
        font-size: 1.75rem !important;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .stat-box {
        padding: 8px 4px !important;
    }
    
    .stat-value {
        font-size: 16px !important;
    }
    
    .stat-label {
        font-size: 8px !important;
    }
    
    .service-card {
        padding: 20px !important;
    }
    
    .comparison-item {
        padding: 10px !important;
    }
    
    .comparison-name {
        font-size: 12px !important;
    }
    
    .origin-card {
        padding: 20px 16px !important;
    }
    
    .origin-num {
        font-size: 48px !important;
        bottom: 12px !important;
        right: 16px !important;
    }
    
    .duo-card {
        padding: 20px !important;
    }
    
    .duo-avatar {
        width: 56px !important;
        height: 56px !important;
    }
    
    .duo-skills {
        gap: 6px !important;
    }
    
    .duo-skill {
        font-size: 9px !important;
        padding: 4px 10px !important;
    }
    
    .client-card {
        padding: 16px !important;
    }
    
    .review-card {
        padding: 16px !important;
    }
    
    .review-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 11px !important;
    }
    
    .manifesto-box {
        padding: 20px !important;
    }
    
    .manifesto-box-price {
        font-size: 24px !important;
    }
    
    .automation-diagram {
        padding: 16px !important;
    }
    
    .automation-node {
        transform: translate(-50%, -50%) scale(0.85);
    }
    
    .nav-mobile-link {
        font-size: 20px !important;
    }
    
    .nav-mobile-service {
        font-size: 16px !important;
    }
}

/* Fix horizontal overflow issues */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Ensure all containers respect viewport width */
* {
    box-sizing: border-box;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix hero section mobile overflow */
@media (max-width: 768px) {
    .hero {
        min-height: auto !important;
        width: 100% !important;
    }
    
    /* Ensure all sections fit within viewport */
    section {
        max-width: 100vw;
        width: 100%;
    }
    
    /* Fix container widths */
    .hero-content,
    .founder-section,
    .hero-stats,
    .services-grid,
    .origin-grid,
    .duo-grid,
    .clients-container,
    .reviews-container,
    .manifesto-container,
    .automation-container,
    .blog-container,
    .contact-container,
    .comparison-grid,
    .clients-grid,
    .reviews-grid,
    .blog-grid {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Break long words to prevent overflow */
    .story-line,
    .hero-desc,
    .service-name,
    .origin-card-title,
    .duo-title,
    .clients-title,
    .reviews-title,
    .manifesto-line,
    .contact-title,
    .comparison-name,
    .blog-card-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Ensure hero grid SVG doesn't overflow */
    .hero-grid {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Fix hero inner padding */
    .hero-inner {
        width: 100% !important;
    }
}

/* Touch-friendly tap targets on mobile */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .service-pill,
    .clients-filter,
    .client-service,
    .duo-skill {
        min-height: 32px;
    }
}

/* ============================================
   DARK THEME STYLES
   ============================================ */

/* Base Dark Theme */
body.dark-theme {
    background: #0a1628;
    color: #ffffff;
}

/* Hero Section Dark - FIXED: Brighter text for visibility */
body.dark-theme .hero {
    background: #0a1628;
}
body.dark-theme .story-line {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
body.dark-theme .hero-desc {
    color: #e2e8f0;
}
body.dark-theme .service-pill {
    border-color: rgba(255,255,255,0.4);
    color: #f1f5f9;
    background: rgba(255,255,255,0.08);
}
body.dark-theme .service-pill:hover {
    border-color: #ff6b6b;
    color: #ffffff;
    background: rgba(255,107,107,0.15);
}
body.dark-theme .btn-secondary {
    border-color: rgba(255,255,255,0.4);
    color: #f1f5f9;
}
body.dark-theme .btn-secondary:hover {
    border-color: rgba(255,255,255,0.6);
    color: #ffffff;
}
body.dark-theme .stat-box {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}
body.dark-theme .stat-label {
    color: #cbd5e1;
}
body.dark-theme .stat-num {
    color: #ffffff;
}

/* Comparison Strip Dark - FIXED: Brighter text */
body.dark-theme .comparison {
    background: #0d1a2d;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .comparison-label {
    color: #94a3b8;
}
body.dark-theme .comparison-item {
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .comparison-sub {
    color: #e2e8f0;
}
body.dark-theme .comparison-name {
    color: #ffffff;
}

/* Services Dark - FIXED: Brighter text */
body.dark-theme .services-section {
    background: #0a1628;
}
body.dark-theme .services-title,
body.dark-theme .services-desc {
    color: #ffffff;
}
body.dark-theme .service-card {
    background: #0d1a2d;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .service-card:hover {
    background: #111d32;
}
body.dark-theme .service-name {
    color: #ffffff;
}
body.dark-theme .service-desc {
    color: #cbd5e1;
}
body.dark-theme .service-count {
    color: #94a3b8;
}

/* Origin Story Dark - FIXED: Brighter text */
body.dark-theme .origin {
    background: #0d1a2d;
}
body.dark-theme .origin-tag-text {
    color: #ffffff;
}
body.dark-theme .origin-tag-desc {
    color: #e2e8f0;
}
body.dark-theme .origin-card {
    background: #0a1628;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .origin-card-title {
    color: #ffffff;
}
body.dark-theme .origin-desc {
    color: #cbd5e1;
}
body.dark-theme .origin-year-text {
    color: #94a3b8;
}

/* Duo Section Dark - FIXED: Brighter text */
body.dark-theme .duo {
    background: #0a1628;
}
body.dark-theme .duo-header-text,
body.dark-theme .duo-title {
    color: #ffffff;
}
body.dark-theme .duo-card {
    background: #0d1a2d;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .duo-quote {
    color: #e2e8f0;
}
body.dark-theme .duo-name {
    color: #ffffff;
}
body.dark-theme .duo-role {
    color: #94a3b8;
}
body.dark-theme .duo-skill {
    color: #e2e8f0 !important;
}

/* Clients Dark - FIXED: Brighter text */
body.dark-theme .clients {
    background: #0d1a2d;
}
body.dark-theme .clients-tag-text,
body.dark-theme .clients-title {
    color: #ffffff;
}
body.dark-theme .clients-desc {
    color: #e2e8f0;
}
body.dark-theme .clients-filter {
    background: #0a1628;
    border-color: rgba(255,255,255,0.25);
    color: #e2e8f0;
}
body.dark-theme .clients-filter.active,
body.dark-theme .clients-filter:hover {
    background: #ff6b6b;
    color: #ffffff;
    border-color: #ff6b6b;
}
body.dark-theme .client-card {
    background: #0a1628;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .client-name {
    color: #ffffff;
}
body.dark-theme .client-domain {
    color: #e2e8f0;
}
body.dark-theme .client-country {
    color: #94a3b8;
}
body.dark-theme .client-desc {
    color: #cbd5e1;
}
body.dark-theme .client-service {
    color: #94a3b8;
    border-color: rgba(255,255,255,0.2);
}

/* Reviews Dark - FIXED: Brighter text */
body.dark-theme .reviews {
    background: #0a1628;
}
body.dark-theme .reviews-tag-text,
body.dark-theme .reviews-title,
body.dark-theme .rating-num {
    color: #ffffff;
}
body.dark-theme .reviews-desc,
body.dark-theme .rating-count,
body.dark-theme .rating-label {
    color: #e2e8f0;
}
body.dark-theme .review-card {
    background: #0d1a2d;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .review-name {
    color: #ffffff;
}
body.dark-theme .review-company {
    color: #94a3b8;
}
body.dark-theme .review-date,
body.dark-theme .review-text {
    color: #cbd5e1;
}

/* Manifesto Dark - FIXED: Brighter text */
body.dark-theme .manifesto {
    background: #0d1a2d;
}
body.dark-theme .manifesto-tag-text,
body.dark-theme .manifesto-line {
    color: #ffffff;
}
body.dark-theme .manifesto-desc {
    color: #e2e8f0;
}
body.dark-theme .manifesto-box {
    background: #0a1628;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .manifesto-box-label {
    color: #94a3b8;
}
body.dark-theme .manifesto-box-price {
    color: #ffffff;
}
body.dark-theme .manifesto-value {
    color: #e2e8f0;
}

/* Automation Dark - FIXED: Brighter text and diagram */
body.dark-theme .automation {
    background: #0a1628;
}
body.dark-theme .automation-tag-text,
body.dark-theme .automation-title {
    color: #ffffff;
}
body.dark-theme .automation-desc {
    color: #e2e8f0;
}
body.dark-theme .automation-diagram {
    background: #0d1a2d;
    border: 1px solid rgba(255,255,255,0.1);
}
body.dark-theme .automation-node {
    background: #0a1628;
}
body.dark-theme .automation-label {
    color: #cbd5e1;
}
body.dark-theme .automation-grid circle {
    fill: rgba(255,255,255,0.3);
}
body.dark-theme .automation-btn {
    background: #0d1a2d;
    border-color: #ff6b6b;
    color: #ff6b6b;
}
body.dark-theme .automation-btn {
    background: #0d1a2d;
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Blog Dark - FIXED: Brighter text */
body.dark-theme .blog-section {
    background: #0d1a2d;
}
body.dark-theme .blog-tag-text,
body.dark-theme .blog-title {
    color: #ffffff;
}
body.dark-theme .blog-subtitle {
    color: #e2e8f0;
}
body.dark-theme .blog-card {
    background: #0a1628;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .blog-card-title {
    color: #ffffff;
}
body.dark-theme .blog-card-excerpt,
body.dark-theme .blog-card-meta {
    color: #cbd5e1;
}
body.dark-theme .blog-card-catname {
    color: #94a3b8;
}
body.dark-theme .blog-btn-all {
    border-color: #ff6b6b;
    color: #ff6b6b;
}
body.dark-theme .blog-btn-all:hover {
    background: #ff6b6b;
    color: #ffffff;
}

/* Contact Dark - FIXED: Brighter text */
body.dark-theme .contact-section {
    background: #0a1628;
}
body.dark-theme .contact-tag-text,
body.dark-theme .contact-title {
    color: #ffffff;
}
body.dark-theme .contact-desc {
    color: #e2e8f0;
}
body.dark-theme .contact-link {
    color: #ffffff;
}
body.dark-theme .contact-link span {
    color: #94a3b8;
}
body.dark-theme .contact-address-text {
    color: #e2e8f0;
}
body.dark-theme .contact-address-label {
    color: #94a3b8;
}
body.dark-theme .form-label {
    color: #94a3b8;
}
body.dark-theme .form-input,
body.dark-theme .form-textarea {
    background: #0d1a2d;
    border-color: rgba(255,255,255,0.2);
    color: #ffffff;
}
body.dark-theme .form-input::placeholder,
body.dark-theme .form-textarea::placeholder {
    color: #64748b;
}

/* Footer Dark - FIXED: Brighter text */
body.dark-theme .site-footer {
    background: #0d1a2d;
}
body.dark-theme .site-footer a {
    color: #e2e8f0 !important;
}
body.dark-theme .site-footer a:hover {
    color: #ff6b6b !important;
}
body.dark-theme .site-footer p {
    color: #94a3b8;
}

/* CTA Sections Dark - FIXED: Brighter text */
body.dark-theme .cta,
body.dark-theme .cta-section {
    background: #0d1a2d;
}
body.dark-theme .cta-title,
body.dark-theme .final-cta-title {
    color: #ffffff;
}
body.dark-theme .cta-desc,
body.dark-theme .final-cta-desc {
    color: #e2e8f0;
}

/* About Page Dark - FIXED: Brighter text */
body.dark-theme .about-hero {
    background: #0a1628;
}
body.dark-theme .about-title,
body.dark-theme .about-subtitle {
    color: #ffffff;
}
body.dark-theme .founders-section {
    background: #0d1a2d;
}
body.dark-theme .founder-card {
    background: #0a1628;
}
body.dark-theme .founder-name {
    color: #ffffff;
}
body.dark-theme .founder-role {
    color: #e2e8f0;
}
body.dark-theme .timeline-section {
    background: #0a1628;
}
body.dark-theme .timeline-title {
    color: #ffffff;
}
body.dark-theme .timeline-desc {
    color: #cbd5e1;
}
body.dark-theme .values-section {
    background: #0d1a2d;
}
body.dark-theme .value-card {
    background: rgba(10,22,40,0.6);
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .value-card:hover {
    background: #0a1628;
}
body.dark-theme .value-title {
    color: #ffffff;
}
body.dark-theme .value-desc {
    color: #cbd5e1;
}

/* Contact Page Dark - FIXED: Brighter text */
body.dark-theme .contact-hero {
    background: #0a1628;
}
body.dark-theme .info-label {
    color: #94a3b8;
}
body.dark-theme .info-value {
    color: #ffffff;
}
body.dark-theme .contact-form-container {
    background: #0d1a2d;
}
body.dark-theme .form-title {
    color: #ffffff;
}
body.dark-theme .reviews-section {
    background: #0d1a2d;
}

/* ============================================
   MOBILE OVERFLOW & RESPONSIVENESS FIXES
   ============================================ */
@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    /* Ensure all sections fit */
    section {
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    /* Hero section fixes */
    .hero {
        min-height: auto !important;
        padding: 0 !important;
    }
    
    .hero-inner {
        padding: 100px 16px 40px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .story-line {
        font-size: clamp(2rem, 8vw, 3.5rem) !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Founder section fixes */
    .founder-section {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .founder-grid {
        width: 100% !important;
    }
    
    .founder-card {
        max-width: 100% !important;
    }
    
    /* Stats fixes */
    .hero-stats {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .stat-box {
        padding: 12px 8px !important;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    
    /* Origin grid */
    .origin-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    
    /* Duo grid */
    .duo-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    
    /* Clients grid */
    .clients-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    
    /* Reviews grid */
    .reviews-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    
    /* Blog grid */
    .blog-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    
    /* Contact grid */
    .contact-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    
    /* Comparison grid */
    .comparison-grid {
        width: 100% !important;
        overflow-x: auto !important;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix containers */
    .hero-content,
    .founder-section,
    .hero-stats,
    .services-grid,
    .origin-grid,
    .duo-grid,
    .clients-container,
    .reviews-container,
    .manifesto-container,
    .automation-container,
    .blog-container,
    .contact-container,
    .comparison-grid,
    .clients-grid,
    .reviews-grid,
    .blog-grid {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (max-width: 480px) {
    .hero-inner {
        padding: 90px 12px 32px !important;
    }
    
    .story-line {
        font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    
    .stat-box {
        padding: 10px 6px !important;
    }
    
    .stat-num {
        font-size: 1.25rem !important;
    }
    
    .stat-label {
        font-size: 0.65rem !important;
    }
}

/* ============================================
   MOBILE AUTOMATION FIXES
   ============================================ */
@media (max-width: 768px) {
    .automation-diagram {
        min-height: 350px !important;
        padding: 20px 10px !important;
    }
    
    .automation-node {
        transform: scale(0.85);
    }
    
    .automation-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
    
    .automation-label {
        font-size: 10px !important;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .automation-diagram {
        min-height: 280px !important;
        padding: 15px 8px !important;
    }
    
    .automation-node {
        transform: scale(0.75);
    }
    
    .automation-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
    
    .automation-label {
        font-size: 9px !important;
    }
    
    .automation-btn {
        font-size: 14px !important;
        padding: 12px 20px !important;
    }
}

/* ============================================
   ADDITIONAL DARK MODE FIXES
   ============================================ */

/* Story line - override inline styles */
body.dark-theme .story-line {
    color: #ffffff !important;
}

/* Services Dropdown Dark Mode Fixes */
body.dark-theme .sub-menu {
    background: #0d1a2d;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .sub-menu a {
    color: #e2e8f0;
}
body.dark-theme .sub-menu a:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

/* CTA Section Logo Dark Mode */
body.dark-theme .cta-logo,
body.dark-theme .footer-logo {
    filter: invert(1) brightness(2);
}

/* Founder Cards Dark Mode Text */
body.dark-theme .founder-name {
    color: #ffffff;
}
body.dark-theme .founder-role {
    color: #e2e8f0;
}
body.dark-theme .founder-bio {
    color: #cbd5e1;
}

/* About Page Dark Mode */
body.dark-theme .about-title,
body.dark-theme .about-title span {
    color: #ffffff !important;
}
body.dark-theme .about-desc {
    color: #e2e8f0;
}

/* Timeline Dark Mode */
body.dark-theme .timeline-title {
    color: #ffffff;
}
body.dark-theme .timeline-item {
    color: #cbd5e1;
}

/* Service Cards - Specializations text */
body.dark-theme .service-specs,
body.dark-theme .service-card .specs {
    color: #94a3b8;
}

/* Comparison Section - Pricing text */
body.dark-theme .comparison-price,
body.dark-theme .comparison-value {
    color: #ffffff;
}
body.dark-theme .comparison-text {
    color: #e2e8f0;
}

/* Contact Page Dark Mode */
body.dark-theme .contact-info-item {
    background: #0d1a2d;
    border-color: rgba(255,255,255,0.15);
}
body.dark-theme .contact-info-label {
    color: #94a3b8;
}
body.dark-theme .contact-info-value {
    color: #ffffff;
}
body.dark-theme .contact-tags span {
    background: rgba(255,255,255,0.1);
    color: #cbd5e1;
}
body.dark-theme .form-container {
    background: #0d1a2d;
}

/* Button text vertical center fix for mobile */
@media (max-width: 768px) {
    .btn-primary, .btn, a.btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.2 !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
    .btn-primary *, .btn *, a.btn * {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
        margin: 0 !important;
    }
}

/* Service Pages Dark Mode - Comprehensive Fixes */
body.dark-theme .service-hero,
body.dark-theme .service-section,
body.dark-theme .specialization-section {
    background: #0a0f1a !important;
}
body.dark-theme .service-hero-title,
body.dark-theme .service-hero h1,
body.dark-theme .service-title {
    color: #ffffff !important;
}
body.dark-theme .service-hero-description,
body.dark-theme .service-description {
    color: #cbd5e1 !important;
}
body.dark-theme .service-content {
    background: #0a0f1a !important;
}
body.dark-theme .service-content h2,
body.dark-theme .service-content h3,
body.dark-theme .service-content h4,
body.dark-theme .service-content h5,
body.dark-theme .service-content h6 {
    color: #ffffff !important;
}
body.dark-theme .service-content p,
body.dark-theme .service-content li,
body.dark-theme .service-content span {
    color: #cbd5e1 !important;
}
body.dark-theme .service-card {
    background: #0d1a2d !important;
    border-color: rgba(255,255,255,0.1);
}
body.dark-theme .service-card-title {
    color: #ffffff !important;
}
body.dark-theme .service-card-description {
    color: #94a3b8 !important;
}
body.dark-theme .specialization-card {
    background: #0d1a2d !important;
    border-color: rgba(255,255,255,0.1);
}
body.dark-theme .specialization-title {
    color: #ffffff !important;
}
body.dark-theme .specialization-description {
    color: #cbd5e1 !important;
}
body.dark-theme .feature-item {
    background: rgba(255,255,255,0.05);
}
body.dark-theme .feature-title {
    color: #ffffff;
}
body.dark-theme .feature-description {
    color: #94a3b8;
}
body.dark-theme .stat-card {
    background: #0d1a2d !important;
}
body.dark-theme .stat-number {
    color: #ffffff;
}
body.dark-theme .stat-label {
    color: #94a3b8;
}
body.dark-theme .faq-item {
    background: #0d1a2d !important;
    border-color: rgba(255,255,255,0.1);
}
body.dark-theme .faq-question {
    color: #ffffff;
}
body.dark-theme .faq-answer {
    color: #cbd5e1;
}
body.dark-theme .industry-tag {
    background: rgba(255,255,255,0.1);
    color: #cbd5e1;
}

/* Override inline styles on service pages */
body.dark-theme [style*="background: #fafafa"],
body.dark-theme [style*="background:#fafafa"],
body.dark-theme [style*="background: #f9f7f4"],
body.dark-theme [style*="background:#f9f7f4"],
body.dark-theme [style*="background: #fff"],
body.dark-theme [style*="background:#fff"],
body.dark-theme [style*="background: white"],
body.dark-theme [style*="background:white"] {
    background: #0d1a2d !important;
}
body.dark-theme [style*="color: #0a1628"],
body.dark-theme [style*="color:#0a1628"] {
    color: #ffffff !important;
}
body.dark-theme [style*="color: #1a1a1a"],
body.dark-theme [style*="color:#1a1a1a"] {
    color: #ffffff !important;
}
body.dark-theme [style*="color: #333"],
body.dark-theme [style*="color:#333"] {
    color: #e2e8f0 !important;
}

/* Footer Dark Mode */
body.dark-theme .site-footer {
    background: #0a0f1a !important;
}
body.dark-theme .footer-logo svg {
    filter: brightness(0) invert(1) !important;
}
body.dark-theme .site-footer p[style*="rgba(10,22,40"],
body.dark-theme .site-footer span[style*="rgba(10,22,40"] {
    color: #94a3b8 !important;
}
body.dark-theme .site-footer a[style*="rgba(10,22,40"] {
    color: #94a3b8 !important;
}
body.dark-theme .site-footer a[style*="rgba(10,22,40"]:hover {
    color: #ffffff !important;
}

/* Services Section on Home Page */
body.dark-theme .services-section {
    background: #0a0f1a !important;
}
body.dark-theme .service-item {
    background: #0d1a2d !important;
}
body.dark-theme .service-item-title {
    color: #ffffff !important;
}
body.dark-theme .service-item-description {
    color: #94a3b8 !important;
}
body.dark-theme .specialization-count {
    color: #94a3b8 !important;
}

/* Service Pages Dark Mode */
body.dark-theme .service-hero {
    background: #0a0f1a !important;
}
body.dark-theme .service-hero-title,
body.dark-theme .service-hero h1 {
    color: #ffffff !important;
}
body.dark-theme .service-hero-description {
    color: #cbd5e1 !important;
}

/* Additional fixes for inline styled elements */
body.dark-theme main[id*="service"] {
    background: #0a0f1a !important;
}
body.dark-theme main[id*="service"] div[style*="background"] {
    background: #0d1a2d !important;
}
body.dark-theme main[id*="service"] p,
body.dark-theme main[id*="service"] li,
body.dark-theme main[id*="service"] span {
    color: #cbd5e1 !important;
}
body.dark-theme main[id*="service"] h1,
body.dark-theme main[id*="service"] h2,
body.dark-theme main[id*="service"] h3,
body.dark-theme main[id*="service"] h4 {
    color: #ffffff !important;
}

/* Specialization pages */
body.dark-theme main[id*="specialization"] {
    background: #0a0f1a !important;
}
body.dark-theme main[id*="specialization"] div[style*="background"] {
    background: #0d1a2d !important;
}
body.dark-theme main[id*="specialization"] p,
body.dark-theme main[id*="specialization"] li {
    color: #cbd5e1 !important;
}
body.dark-theme main[id*="specialization"] h1,
body.dark-theme main[id*="specialization"] h2,
body.dark-theme main[id*="specialization"] h3 {
    color: #ffffff !important;
}

/* Global dark mode text fixes */
body.dark-theme p[style*="color: #0a1628"],
body.dark-theme p[style*="color:#0a1628"] {
    color: #cbd5e1 !important;
}
body.dark-theme h1[style*="color: #0a1628"],
body.dark-theme h1[style*="color:#0a1628"],
body.dark-theme h2[style*="color: #0a1628"],
body.dark-theme h2[style*="color:#0a1628"] {
    color: #ffffff !important;
}
body.dark-theme li[style*="color: #0a1628"],
body.dark-theme li[style*="color:#0a1628"] {
    color: #cbd5e1 !important;
}
body.dark-theme .service-content {
    background: #0a0f1a !important;
}
body.dark-theme .service-content h2,
body.dark-theme .service-content h3,
body.dark-theme .service-content h4 {
    color: #ffffff !important;
}
body.dark-theme .service-content p,
body.dark-theme .service-content li {
    color: #cbd5e1 !important;
}
body.dark-theme .service-section {
    background: #0d1a2d !important;
}
body.dark-theme .service-card {
    background: #0d1a2d !important;
    border-color: rgba(255,255,255,0.1);
}
body.dark-theme .service-card-title {
    color: #ffffff !important;
}
body.dark-theme .service-card-description {
    color: #94a3b8 !important;
}
body.dark-theme .specialization-item {
    background: #0d1a2d !important;
    border-color: rgba(255,255,255,0.1);
}
body.dark-theme .specialization-title {
    color: #ffffff !important;
}
body.dark-theme .specialization-description {
    color: #cbd5e1 !important;
}
body.dark-theme .feature-item {
    background: rgba(255,255,255,0.05);
}
body.dark-theme .feature-title {
    color: #ffffff;
}
body.dark-theme .feature-description {
    color: #94a3b8;
}
body.dark-theme .stat-card {
    background: #0d1a2d !important;
}
body.dark-theme .stat-number {
    color: #ffffff;
}
body.dark-theme .stat-label {
    color: #94a3b8;
}
body.dark-theme .faq-item {
    background: #0d1a2d !important;
    border-color: rgba(255,255,255,0.1);
}
body.dark-theme .faq-question {
    color: #ffffff;
}
body.dark-theme .faq-answer {
    color: #cbd5e1;
}
body.dark-theme .industry-tag {
    background: rgba(255,255,255,0.1);
    color: #cbd5e1;
}

/* Specialization Pages Dark Mode */
body.dark-theme .spec-hero {
    background: #0a0f1a !important;
}
body.dark-theme .spec-hero-title {
    color: #ffffff !important;
}
body.dark-theme .spec-content {
    background: #0a0f1a !important;
}
body.dark-theme .spec-section-title {
    color: #ffffff !important;
}
body.dark-theme .spec-text {
    color: #cbd5e1 !important;
}
body.dark-theme .spec-highlight-box {
    background: #0d1a2d !important;
}
body.dark-theme .spec-list-item {
    color: #cbd5e1;
}
body.dark-theme .spec-check-icon {
    color: #4ade80;
}

/* Footer Dark Mode - Location Text */
body.dark-theme .footer-location,
body.dark-theme .footer-copyright,
body.dark-theme .footer-year {
    color: #94a3b8 !important;
}

/* CTA Section Logo Fix */
body.dark-theme .cta-logo,
body.dark-theme .footer-logo {
    filter: invert(1) brightness(2) !important;
}

/* Location/Address Info */
body.dark-theme .location-text,
body.dark-theme .address-line {
    color: #cbd5e1 !important;
}

/* Footer Site-wide Dark Mode Overrides */
body.dark-theme .site-footer {
    background: #0a0f1a !important;
}
body.dark-theme .site-footer p[style*="rgba(10,22,40"] {
    color: #94a3b8 !important;
}
body.dark-theme .site-footer a[style*="rgba(10,22,40"] {
    color: #94a3b8 !important;
}
body.dark-theme .site-footer span[style*="rgba(10,22,40"] {
    color: rgba(255,255,255,0.2) !important;
}
body.dark-theme .site-footer img {
    filter: brightness(0) invert(1) !important;
}
body.dark-theme .site-footer div[style*="border-top"] {
    border-color: rgba(255,255,255,0.1) !important;
}

/* Service Pages - Override Inline Styles */
body.dark-theme main[class*="service"] {
    background: #0a0f1a !important;
}
body.dark-theme main[class*="service"] div[style*="background: #fafafa"],
body.dark-theme main[class*="service"] div[style*="background:#fafafa"],
body.dark-theme main[class*="service"] div[style*="background: #f9f7f4"],
body.dark-theme main[class*="service"] div[style*="background:#f9f7f4"],
body.dark-theme main[class*="service"] div[style*="background: #fff"],
body.dark-theme main[class*="service"] div[style*="background:#fff"] {
    background: #0d1a2d !important;
}
body.dark-theme main[class*="service"] p[style*="color: #0a1628"],
body.dark-theme main[class*="service"] p[style*="color:#0a1628"] {
    color: #ffffff !important;
}
body.dark-theme main[class*="service"] span[style*="color: #0a1628"],
body.dark-theme main[class*="service"] span[style*="color:#0a1628"] {
    color: #ffffff !important;
}
body.dark-theme main[class*="service"] h1[style*="color: #0a1628"],
body.dark-theme main[class*="service"] h1[style*="color:#0a1628"],
body.dark-theme main[class*="service"] h2[style*="color: #0a1628"],
body.dark-theme main[class*="service"] h2[style*="color:#0a1628"],
body.dark-theme main[class*="service"] h3[style*="color: #0a1628"],
body.dark-theme main[class*="service"] h3[style*="color:#0a1628"] {
    color: #ffffff !important;
}
body.dark-theme main[class*="service"] li[style*="color: #0a1628"],
body.dark-theme main[class*="service"] li[style*="color:#0a1628"] {
    color: #cbd5e1 !important;
}

/* Specialization Pages - Override Inline Styles */
body.dark-theme main[class*="specialization"] {
    background: #0a0f1a !important;
}
body.dark-theme main[class*="specialization"] div[style*="background: #fafafa"],
body.dark-theme main[class*="specialization"] div[style*="background:#fafafa"] {
    background: #0d1a2d !important;
}
body.dark-theme main[class*="specialization"] p[style*="color: #0a1628"],
body.dark-theme main[class*="specialization"] p[style*="color:#0a1628"] {
    color: #ffffff !important;
}
body.dark-theme main[class*="specialization"] h1[style*="color: #0a1628"],
body.dark-theme main[class*="specialization"] h1[style*="color:#0a1628"],
body.dark-theme main[class*="specialization"] h2[style*="color: #0a1628"],
body.dark-theme main[class*="specialization"] h2[style*="color:#0a1628"] {
    color: #ffffff !important;
}

/* Service Section on Home Page */
body.dark-theme .services-section {
    background: #0a0f1a !important;
}
body.dark-theme .service-item {
    background: #0d1a2d !important;
}
body.dark-theme .service-item-title {
    color: #ffffff !important;
}
body.dark-theme .service-item-description {
    color: #94a3b8 !important;
}
body.dark-theme .specialization-count {
    color: #94a3b8 !important;
}
