/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Global theme transitions for smooth switching */
    transition: background-color var(--transition-normal), 
                color var(--transition-normal), 
                border-color var(--transition-normal),
                box-shadow var(--transition-normal);
    /* Improve mobile performance */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Prevent horizontal scroll on all elements */
*,
*::before,
*::after {
    max-width: 100%;
    box-sizing: border-box;
}

/* Specific elements that commonly cause overflow */
img,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

/* Prevent text from causing overflow */
p,
h1,
h2,
h3,
h4,
h5,
h6,
span,
div {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Prevent positioned elements from causing horizontal overflow */
[style*="position: fixed"],
[style*="position: absolute"],
.fixed,
.absolute {
    max-width: 100vw;
    left: 0;
    right: 0;
}

/* Additional mobile scroll prevention */
@media (max-width: 768px) {
    /* Prevent any horizontal overflow on mobile */
    * {
        max-width: 100vw !important;
    }
    
    /* Handle wide content gracefully */
    pre,
    code {
        overflow-x: auto;
        white-space: pre-wrap;
        word-break: break-all;
    }
    
    /* Ensure tables don't cause overflow */
    table {
        width: 100%;
        table-layout: fixed;
    }
}

html {
    scroll-behavior: smooth;
    /* Prevent horizontal scrolling on mobile */
    overflow-x: hidden;
    /* Ensure no horizontal scroll on any device */
    max-width: 100vw;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    /* Prevent horizontal overflow completely */
    max-width: 100vw;
    position: relative;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    /* Improve text rendering on mobile */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* CSS Variables - Light Theme (Default) */
:root {
    /* Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #8b5cf6;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    
    /* Backgrounds - Light Theme */
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-overlay: rgba(255, 255, 255, 0.95);
    
    /* Text Colors - Light Theme */
    --text-color: #1e293b;
    --text-secondary: #475569;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    /* Border & Effects - Light Theme */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-large: 0 25px 50px rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    /* Utility Colors */
    --white: #ffffff;
    --black: #000000;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 80px 0;
    --element-spacing: 2rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
}

/* Dark Theme Variables */
body.dark-theme {
    /* Backgrounds - Dark Theme */
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-overlay: rgba(30, 41, 59, 0.95);
    
    /* Text Colors - Dark Theme */
    --text-color: #f1f5f9;
    --text-secondary: #e2e8f0;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dark: #f1f5f9;
    
    /* Border & Effects - Dark Theme */
    --border-color: #334155;
    --border-light: #475569;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-large: 0 25px 50px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(30, 41, 59, 0.3);
    --glass-border: rgba(51, 65, 85, 0.5);
    
    /* Gradients - Dark Theme */
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    
    /* Utility Colors - Dark adjusted */
    --white: #f1f5f9;
    --black: #0f172a;
}

/* Dark theme specific adjustments */
body.dark-theme .navbar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

body.dark-theme .navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-medium);
}

/* Cards and Containers */
body.dark-theme .service-card,
body.dark-theme .contact-form-container,
body.dark-theme .skills-chart,
body.dark-theme .testimonial-card,
body.dark-theme .portfolio-card,
body.dark-theme .team-card,
body.dark-theme .pricing-card,
body.dark-theme .blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-medium);
}

/* Hero Section */
body.dark-theme .hero {
    background: var(--gradient-hero);
}

body.dark-theme .hero-content h1,
body.dark-theme .hero-content h2,
body.dark-theme .hero-content p {
    color: var(--text-color);
}

/* Mockup and Devices */
body.dark-theme .mockup-device {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-large);
    border: 1px solid var(--border-color);
}

/* Portfolio */
body.dark-theme .portfolio-overlay {
    background: rgba(15, 23, 42, 0.9);
}

body.dark-theme .portfolio-item:hover .portfolio-overlay {
    background: rgba(30, 41, 59, 0.95);
}

/* Process Steps */
body.dark-theme .process-step .step-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

body.dark-theme .process-step .step-number {
    background: var(--gradient-primary);
    color: var(--white);
}

/* Buttons */
body.dark-theme .btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
}

body.dark-theme .btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

body.dark-theme .btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

/* Forms */
body.dark-theme .form-control {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

body.dark-theme .form-control:focus {
    background: var(--bg-card);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

body.dark-theme .form-control::placeholder {
    color: var(--text-muted);
}

/* Skills and Progress */
body.dark-theme .skill-bar .progress {
    background: var(--bg-secondary);
}

body.dark-theme .skill-bar .progress-fill {
    background: var(--gradient-primary);
}

/* Stats and Counters */
body.dark-theme .stats-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

body.dark-theme .stat-number {
    color: var(--primary-light);
}

body.dark-theme .stat-label {
    color: var(--text-light);
}

/* Testimonials */
body.dark-theme .testimonial-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Contact */
body.dark-theme .contact-info-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Footer */
body.dark-theme footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

/* Back to Top */
body.dark-theme .back-to-top {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

/* Preloader */
body.dark-theme #preloader {
    background: var(--bg-color);
}

/* Section Backgrounds */
body.dark-theme .section-bg {
    background: var(--bg-secondary);
}

body.dark-theme .section-alt {
    background: var(--bg-tertiary);
}

/* Text Colors Override */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
    color: var(--text-color);
}

body.dark-theme p,
body.dark-theme span,
body.dark-theme li {
    color: var(--text-secondary);
}

body.dark-theme .text-muted {
    color: var(--text-muted);
}

/* Navigation Links */
body.dark-theme .nav-link {
    color: var(--text-color);
}

body.dark-theme .nav-link:hover,
body.dark-theme .nav-link.active {
    color: var(--primary-color);
}

/* Borders and Dividers */
body.dark-theme hr,
body.dark-theme .divider {
    border-color: var(--border-color);
}

/* Glass Effects */
body.dark-theme .glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

/* Additional Dark Theme Enhancements */
body.dark-theme .section {
    background: var(--bg-color);
}

body.dark-theme .section:nth-child(even) {
    background: var(--bg-secondary);
}

/* Portfolio Items */
body.dark-theme .portfolio-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Team Cards */
body.dark-theme .team-member {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Pricing Cards */
body.dark-theme .pricing-plan {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

body.dark-theme .pricing-plan.featured {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

/* Blog Cards */
body.dark-theme .blog-post {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Timeline */
body.dark-theme .timeline-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Accordions */
body.dark-theme .accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Modals */
body.dark-theme .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Tooltips */
body.dark-theme .tooltip {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Dropdown Menus */
body.dark-theme .dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-large);
}

/* Alert Messages */
body.dark-theme .alert {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

/* Code Blocks */
body.dark-theme pre,
body.dark-theme code {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Tables */
body.dark-theme table {
    background: var(--bg-card);
    color: var(--text-color);
}

body.dark-theme th {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

body.dark-theme td {
    border-bottom: 1px solid var(--border-light);
}

/* Scrollbar Styling for Dark Theme */
body.dark-theme ::-webkit-scrollbar {
    width: 8px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Light Theme Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-color);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
    /* Ensure container never exceeds viewport */
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Section Styles */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius-sm);
}

.section-title {
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    /* Mobile touch improvements */
    min-height: 44px;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.btn-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.preloader-content {
    text-align: center;
}

.logo-animation {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-bar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: loading 2s ease-in-out infinite;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: var(--bg-overlay);
    box-shadow: var(--shadow-medium);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-normal);
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.nav-logo:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.nav-logo-icon {
    width: 36px;
    height: 36px;
    margin-right: 14px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.nav-logo-icon:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-secondary);
}

.logo-subtitle {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.theme-toggle i {
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

/* Theme toggle animation */
.theme-toggle.switching {
    animation: themeSwitch 0.6s ease-in-out;
}

@keyframes themeSwitch {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

/* Dark theme toggle styles */
body.dark-theme .theme-toggle {
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

body.dark-theme .theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all var(--transition-normal);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
    color: var(--text-color);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(1px);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: 85vh;
    padding-top: 80px;
}

.hero-content {
    color: var(--white);
}

.hero-title {
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.title-line {
    display: block;
}

.highlight {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-secondary);
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 1;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-container {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.mockup-device {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-large);
    transform: perspective(1000px) rotateY(-15deg) rotateX(15deg);
    transition: transform var(--transition-slow);
}

.mockup-device:hover {
    transform: perspective(1000px) rotateY(-10deg) rotateX(10deg);
}

.mockup-screen {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    height: 300px;
}

.mockup-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.mockup-dots {
    display: flex;
    gap: 0.5rem;
}

.mockup-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
}

.mockup-dots span:nth-child(1) { background: #ff5f57; }
.mockup-dots span:nth-child(2) { background: #ffbd2e; }
.mockup-dots span:nth-child(3) { background: #28ca42; }

.mockup-element {
    height: 20px;
    background: var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.mockup-element:nth-child(1) { width: 80%; }
.mockup-element:nth-child(2) { width: 60%; }
.mockup-element:nth-child(3) { width: 90%; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--white);
    opacity: 0.7;
}

.scroll-arrow {
    margin-top: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.about-features {
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-content h4 {
    margin-bottom: 0.5rem;
}

.skills-chart {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
}

.skill {
    margin-bottom: 2rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1s ease;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.service-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.service-card.featured {
    transform: scale(1.05);
    border: 2px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
}

.service-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--gradient-secondary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-title {
    margin-bottom: 1rem;
}

.service-description {
    margin-bottom: 2rem;
}

.service-features {
    list-style: none;
    margin-bottom: 2rem;
}

.service-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.service-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-secondary);
}

/* Portfolio Section */
.portfolio {
    background: var(--bg-secondary);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.portfolio-item {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-normal);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-content {
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.portfolio-content h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.portfolio-tech {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
}

.portfolio-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.portfolio-cta {
    text-align: center;
}

/* Process Section */
.process-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.process-step {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    gap: 2rem;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
}

.process-step:nth-child(even) {
    grid-template-columns: 60px 1fr 60px;
}

.process-step:nth-child(even) .step-content {
    order: 2;
}

.process-step:nth-child(even) .step-icon {
    order: 3;
}

.process-step:nth-child(even) .step-number {
    order: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-secondary);
}

.step-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
}

.step-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.step-content ul {
    list-style: none;
    margin-top: 1rem;
}

.step-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.step-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border: 3px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Testimonials Section */
.testimonials {
    background: var(--bg-secondary);
}

.testimonials-slider {
    max-width: 900px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
    text-align: center;
    height: auto;
}

.stars {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.testimonial-card blockquote {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.8;
    color: var(--text-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.author-info span {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* First Testimonial CTA */
.first-testimonial-cta {
    max-width: 800px;
    margin: 0 auto;
}

.cta-card {
    background: var(--bg-card);
    padding: 4rem 3rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-large);
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.cta-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.cta-icon i {
    font-size: 2rem;
    color: var(--white);
}

.cta-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.cta-card > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.benefit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.benefit-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.benefit-item span {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 1rem 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.guarantee i {
    color: var(--accent-color);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-details h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-details p {
    color: var(--text-light);
    line-height: 1.6;
}

.social-links {
    margin-top: 2rem;
}

.social-links h4 {
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.contact-form-container {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.contact-form {
    display: grid;
    gap: 2rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--bg-secondary);
    font-size: 1rem;
    color: var(--text-color);
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-color);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social .social-link {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.footer-social .social-link:hover {
    background: var(--primary-color);
}

.footer-section h4 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Tablet specific optimizations */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }
    
    /* Strengthen mobile overflow prevention */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        position: relative;
    }
    
    .container {
        padding: 0 1rem;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Ensure all sections stay within viewport */
    section {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    /* Button optimizations for mobile */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    .btn-large {
        padding: 1rem 1.75rem;
        font-size: 1rem;
    }
    
    /* Hero buttons specifically */
    .hero .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-width: 140px;
    }
    
    .hero .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Hero section mobile layout */
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        padding-top: 120px;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: 0;
        background: var(--bg-overlay);
        backdrop-filter: blur(20px);
        overflow: hidden;
        transition: height var(--transition-normal);
        flex-direction: column;
        justify-content: center;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        height: 300px;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Mobile nav logo adjustments */
    .nav-logo {
        padding: 6px 8px;
    }
    
    .nav-logo-icon {
        width: 32px;
        height: 32px;
        margin-right: 10px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .logo-subtitle {
        font-size: 0.75rem;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .process-step {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .process-step:nth-child(even) {
        grid-template-columns: 1fr;
    }
    
    .process-step:nth-child(even) .step-content,
    .process-step:nth-child(even) .step-icon,
    .process-step:nth-child(even) .step-number {
        order: unset;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .cta-card {
        padding: 3rem 2.5rem;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    /* Extra mobile overflow prevention */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .container {
        padding: 0 0.75rem;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Ensure all content fits on small screens */
    section {
        overflow-x: hidden;
        max-width: 100vw;
    }
    :root {
        --section-padding: 60px 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Hero optimizations */
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-content h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.2;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    /* Forms */
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 1rem 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: var(--border-radius-sm);
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    /* Testimonials CTA */
    .cta-card {
        padding: 2.5rem 1.5rem;
    }
    
    .cta-card h3 {
        font-size: 1.5rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .benefit-item {
        padding: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 1.5rem;
    }
    
    /* Mobile button size optimizations */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-height: 42px;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Specific hero button adjustments for small screens */
    .hero .btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
        min-width: 120px;
        border-radius: 8px;
    }
    
    .hero .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Portfolio */
    .portfolio-item {
        margin-bottom: 1rem;
    }
    
    .portfolio-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 3rem 0 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Navigation improvements */
    .nav-container {
        padding: 1rem;
    }
    
    .theme-toggle {
        width: 45px;
        height: 45px;
    }
    
    /* Typography adjustments */
    h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
    h3 { font-size: clamp(1.25rem, 4vw, 1.75rem); }
    
    .section-title {
        margin-bottom: 1rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
}

/* Extra small screens (phones in landscape, small phones) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .cta-card {
        padding: 2rem 1rem;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .contact-form-container {
        padding: 1.5rem 1rem;
    }
    
    .nav-container {
        padding: 0.75rem;
    }
    
    .hero-content h1 {
        font-size: clamp(1.75rem, 10vw, 2.5rem);
    }
    
    /* Extra small screen button optimizations */
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
        min-height: 40px;
        min-width: 100px;
    }
    
    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Hero buttons for very small screens */
    .hero .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        min-width: 100px;
        border-radius: 6px;
    }
    
    .hero .btn-large {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    .footer-legal {
        gap: 0.5rem;
    }
    
    .footer-legal a {
        font-size: 0.9rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-link, .theme-toggle, .filter-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .portfolio-item:hover .portfolio-overlay {
        opacity: 0;
    }
    
    .magnetic-btn {
        transform: none !important;
    }
}

/* Landscape phones */
@media (max-width: 812px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        height: 250px;
    }
    
    :root {
        --section-padding: 60px 0;
    }
}

/* Animation Utilities */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Print Styles */
@media print {
    .navbar,
    .back-to-top,
    .hero-particles,
    .hero-gradient {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .section-header {
        page-break-after: avoid;
    }
}
