/* ========================================
   ContaCaratteri.it - Custom Styles
   Professional Design
   ======================================== */

:root {
    /* Palette colori professionale - Design pulito */
    --bg-primary: #2563EB;
    --bg-primary-hover: #1D4ED8;
    --bg-primary-light: #EFF6FF;
    --bg-secondary: #64748B;
    --bg-success: #10B981;
    --bg-info: #0EA5E9;
    --bg-warning: #F59E0B;
    --bg-danger: #EF4444;
    --bg-purple: #8B5CF6;
    --bg-dark: #1E293B;
    --bg-light: #F8FAFC;
    --text-dark: #1E293B;
    --text-light: #ffffff;
    --text-muted: #64748B;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-color: #E2E8F0;
    --navbar-bg: #1E293B;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-primary: #3B82F6;
    --bg-primary-hover: #2563EB;
    --bg-primary-light: #1E3A5F;
    --bg-light: #0F172A;
    --bg-dark: #020617;
    --text-dark: #F1F5F9;
    --text-muted: #94A3B8;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --border-color: #334155;
    --navbar-bg: #0F172A;
}

/* ========================================
   General Styles
   ======================================== */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 100vh;
    line-height: 1.6;
}

[data-theme="dark"] body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Bootstrap Text Classes Override for Dark Mode */
[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-dark) !important;
}

[data-theme="dark"] .text-secondary {
    color: #94A3B8 !important;
}

[data-theme="dark"] .text-body {
    color: var(--text-dark) !important;
}

[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div {
    color: inherit;
}

/* Gradient Background for Hero Section */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1e40af 100%) !important;
    color: white !important;
}

[data-theme="dark"] .bg-gradient-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
}

/* Additional Bootstrap utilities */
.rounded-4 {
    border-radius: 1rem !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ========================================
   Main Container - Max Width 1200px
   ======================================== */

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Apply max-width to Bootstrap containers as well */
.container {
    max-width: 1200px !important;
}

@media (max-width: 768px) {
    .main-container {
        padding: 0 15px;
    }
}

/* ========================================
   Cards
   ======================================== */

.card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
    box-shadow: var(--shadow);
    background-color: #ffffff;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .card {
    background-color: #1E293B;
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-body {
    background-color: #1E293B;
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: white;
    padding: 0.875rem 1.25rem;
}

.bg-purple {
    background-color: var(--bg-purple) !important;
}

/* ========================================
   Textarea
   ======================================== */

#textArea {
    min-height: 350px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
    padding: 12px;
    background-color: #ffffff;
}

#textArea:focus {
    border-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: 0;
}

[data-theme="dark"] #textArea {
    background-color: #1E293B;
    color: var(--text-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] #textArea:focus {
    border-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========================================
   Statistics
   ======================================== */

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.stat-item:hover {
    background-color: var(--bg-primary-light);
}

.stat-item:last-child {
    border-bottom: none;
}

[data-theme="dark"] .stat-item {
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .stat-item:hover {
    background-color: var(--bg-primary-light);
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

[data-theme="dark"] .stat-label {
    color: var(--text-muted);
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    background-color: var(--bg-primary);
    color: white;
}

/* ========================================
   Buttons & Toolbar
   ======================================== */

.btn-toolbar {
    background-color: #ffffff;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .btn-toolbar {
    background-color: #1E293B;
    border-color: var(--border-color);
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--bg-primary);
}

.btn-primary:hover {
    background-color: var(--bg-primary-hover);
}

.btn-success {
    background-color: var(--bg-success);
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--bg-danger);
}

.btn-danger:hover {
    background-color: #DC2626;
}

.btn-warning {
    background-color: var(--bg-warning);
    color: white;
}

.btn-warning:hover {
    background-color: #D97706;
    color: white;
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-group-sm > .btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* ========================================
   Progress Bars
   ======================================== */

.progress {
    border-radius: 4px;
    background-color: var(--border-color);
    height: 20px;
}

[data-theme="dark"] .progress {
    background-color: #334155;
}

.progress-bar {
    transition: width 0.3s ease;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Dynamic color based on percentage */
.progress-bar.bg-danger-custom {
    background-color: var(--bg-danger) !important;
}

.progress-bar.bg-warning-custom {
    background-color: var(--bg-warning) !important;
}

.progress-bar.bg-success-custom {
    background-color: var(--bg-success) !important;
}

/* ========================================
   Keywords
   ======================================== */

.keyword-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.keyword-item {
    display: inline-block;
    margin: 4px;
    padding: 6px 12px;
    background-color: var(--bg-primary);
    color: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.keyword-item:hover {
    background-color: var(--bg-primary-hover);
    cursor: pointer;
}

.keyword-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* ========================================
   AdSense Spaces
   ======================================== */

.ad-space {
    min-height: 90px;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-top {
    max-height: 120px;
}

.ad-sidebar {
    min-height: 250px;
}

.ad-bottom {
    max-height: 120px;
}

[data-theme="dark"] .ad-space {
    background-color: #343a40 !important;
    border-color: #495057;
}

/* ========================================
   Navbar
   ======================================== */

.navbar {
    background-color: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.navbar .nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 6px 12px;
    margin: 0 2px;
    font-size: 14px;
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    padding: 4px;
    margin-top: 4px;
}

.navbar .dropdown-item {
    border-radius: 4px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    font-weight: 400;
    font-size: 14px;
}

.navbar .dropdown-item:hover {
    background-color: var(--bg-primary-light);
    color: var(--bg-primary);
}

.navbar .dropdown-item i {
    margin-right: 8px;
    width: 18px;
    display: inline-block;
    text-align: center;
    font-size: 13px;
}

/* Dark Mode Navbar Overrides */
[data-theme="dark"] .navbar .dropdown-menu {
    background-color: var(--bg-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] .navbar .dropdown-item {
    color: var(--text-dark);
}

[data-theme="dark"] .navbar .dropdown-item:hover {
    background-color: var(--bg-primary-light);
    color: var(--bg-primary);
}

[data-theme="dark"] .navbar .dropdown-item.active {
    background-color: var(--bg-primary-light);
    color: var(--bg-primary);
}

/* ========================================
   Footer
   ======================================== */

footer {
    background-color: var(--bg-dark) !important;
    border-top: 1px solid var(--border-color);
}

footer a {
    transition: color 0.2s ease;
    color: rgba(255, 255, 255, 0.7) !important;
}

footer a:hover {
    text-decoration: none !important;
    color: white !important;
}

/* ========================================
   Modals
   ======================================== */

[data-theme="dark"] .modal-content {
    background-color: #2d3238;
    color: #e9ecef;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #495057;
}

[data-theme="dark"] .modal-footer {
    border-top-color: #495057;
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #2d3238;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #555;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 0.5s ease;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 991px) {
    .btn-toolbar {
        justify-content: center;
    }

    .stat-value {
        font-size: 14px;
    }

    #textArea {
        min-height: 300px;
        font-size: 14px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .btn-group-sm > .btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .card-header h6 {
        font-size: 14px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 12px;
        padding: 4px 8px;
    }

    #textArea {
        min-height: 250px;
        font-size: 14px;
    }

    .ad-top,
    .ad-bottom {
        min-height: 60px;
        max-height: 90px;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .navbar,
    .btn-toolbar,
    .ad-space,
    footer,
    .card-header {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }

    #textArea {
        border: 1px solid #000 !important;
        min-height: auto !important;
    }
}

/* ========================================
   Accessibility
   ======================================== */

.btn:focus,
.form-control:focus {
    outline: 2px solid var(--bg-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid currentColor;
    }

    .btn {
        border-width: 2px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Utilities
   ======================================== */

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-custom {
    box-shadow: 0 4px 6px var(--shadow);
}

.cursor-pointer {
    cursor: pointer;
}

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

/* ========================================
   Homepage Styles
   ======================================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1E40AF 100%);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1E3A8A 100%);
}

/* Long Description */
.long-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

[data-theme="dark"] .long-description {
    color: var(--text-dark);
}

.long-description h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--bg-primary);
}

.long-description ul {
    list-style: none;
    padding-left: 0;
}

.long-description ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.long-description ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--bg-success);
    font-weight: bold;
}

/* Category Section */
.category-section {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--bg-primary);
    display: inline-block;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .category-title {
    color: var(--text-dark);
}

.category-title i {
    margin-right: 0.5rem;
    color: var(--bg-primary);
}

/* Service Cards */
.service-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bg-primary) 0%, var(--bg-info) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--bg-primary);
}

.service-card:hover::before {
    transform: scaleX(1);
}

[data-theme="dark"] .service-card {
    background-color: var(--bg-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] .service-card:hover {
    background-color: #1E293B;
}

/* Service Icon */
.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-info) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: var(--shadow-md);
}

/* Ad Horizontal */
.ad-horizontal {
    min-height: 120px;
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .ad-horizontal {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
}

/* Homepage Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

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

    .long-description {
        font-size: 0.95rem;
    }

    .service-card:hover {
        transform: translateY(-4px);
    }
}

/* ========================================
   QR Generator - Pills Navigation
   ======================================== */

.pills-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px;
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .pills-container {
    background-color: var(--bg-dark);
}

.type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    background: #ffffff;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

[data-theme="dark"] .type-pill {
    background: #1E293B;
    color: var(--text-dark);
}

.type-pill:hover {
    border-color: var(--bg-primary);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.type-pill.active {
    background: var(--bg-primary);
    border-color: var(--bg-primary);
    color: white;
}

.type-pill i {
    font-size: 16px;
}

/* Mobile responsiveness for pills */
@media (max-width: 768px) {
    .pills-container {
        overflow-x: scroll;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 8px;
    }
    
    .pills-container::-webkit-scrollbar {
        display: none;
    }
    
    .type-pill {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .type-pill i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .type-pill span {
        display: none;
    }
    
    .type-pill {
        padding: 10px;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        justify-content: center;
    }
}

/* Update button pulse animation */
@keyframes pulse-button {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.btn-needs-update {
    animation: pulse-button 2s infinite;
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
    font-weight: 600;
}

/* ========================================
   MODERN HOMEPAGE DESIGN - PROFESSIONAL
   ======================================== */

/* ===== Modern Hero Section ===== */
.modern-hero {
    position: relative;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    min-height: 600px;
    overflow: hidden;
    padding: 80px 0 120px;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Animated Background */
.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
    animation: heroGlow 20s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    animation: titleSlideIn 0.8s ease-out 0.2s both;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    animation: subtitleSlideIn 0.8s ease-out 0.4s both;
}

@keyframes subtitleSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 0.95;
        transform: translateX(0);
    }
}

.hero-cta {
    animation: ctaSlideIn 0.8s ease-out 0.6s both;
}

@keyframes ctaSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-cta .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Hero Illustration */
.hero-illustration {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-card.card-1 {
    top: 50px;
    left: 50px;
    animation: float 6s ease-in-out infinite;
}

.floating-card.card-2 {
    top: 150px;
    right: 80px;
    animation: float 5s ease-in-out infinite 0.5s;
}

.floating-card.card-3 {
    bottom: 100px;
    left: 120px;
    animation: float 7s ease-in-out infinite 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.hero-circle.circle-1 {
    width: 300px;
    height: 300px;
    top: -50px;
    right: -50px;
    animation: circleFloat 8s ease-in-out infinite;
}

.hero-circle.circle-2 {
    width: 200px;
    height: 200px;
    bottom: 0;
    left: 0;
    animation: circleFloat 10s ease-in-out infinite reverse;
}

@keyframes circleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.1); }
}

/* Hero Wave */
.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

/* ===== Features Section ===== */
.features-section {
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
}

.feature-box {
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.feature-box.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--bg-primary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    position: relative;
    overflow: hidden;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.5s;
    transform: translate(-50%, -50%);
}

.feature-box:hover .feature-icon::before {
    width: 100px;
    height: 100px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.feature-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===== Modern Category Section ===== */
.category-section-modern {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.category-section-modern.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--bg-primary);
}

.category-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-info) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.category-title-modern {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.category-subtitle {
    font-size: 0.95rem;
}

/* ===== Modern Service Cards ===== */
.service-card-modern {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.service-card-modern.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.service-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--bg-primary) 0%, var(--bg-info) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card-modern:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--bg-primary);
}

.service-card-modern:hover::before {
    transform: scaleX(1);
}

.service-icon-modern {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-info) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
    transition: all 0.3s ease;
}

.service-card-modern:hover .service-icon-modern {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.service-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--bg-primary-light);
    color: var(--bg-primary);
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.service-title-modern {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.service-card-modern:hover .service-title-modern {
    color: var(--bg-primary);
}

.service-desc-modern {
    font-size: 0.95rem;
    line-height: 1.6;
}

.service-action {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.service-card-modern:hover .service-action {
    border-color: var(--bg-primary);
}

.service-action span {
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.service-card-modern:hover .service-action i {
    transform: translateX(5px);
}

/* ===== Content Section ===== */
.content-section {
    position: relative;
}

.content-wrapper {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

/* ===== Responsive Design ===== */
@media (max-width: 991px) {
    .modern-hero {
        min-height: 500px;
        padding: 60px 0 100px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .category-title-modern {
        font-size: 1.5rem;
    }

    .hero-wave svg {
        height: 40px;
    }
}

@media (max-width: 767px) {
    .modern-hero {
        min-height: 400px;
        padding: 40px 0 80px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .hero-cta .btn:last-child {
        margin-bottom: 0;
    }

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

    .section-subtitle {
        font-size: 1rem;
    }

    .feature-box {
        padding: 1.5rem 1rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .category-icon-wrapper {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .category-title-modern {
        font-size: 1.5rem;
    }

    .content-wrapper {
        padding: 2rem 1.5rem;
    }

    .hero-wave svg {
        height: 30px;
    }
}

@media (max-width: 576px) {
    .hero-badge {
        font-size: 12px;
        padding: 8px 16px;
    }

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

    .service-card-modern .card-body {
        padding: 1.5rem !important;
    }

    .service-icon-modern {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* ===== Dark Theme Overrides ===== */
[data-theme="dark"] .modern-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
}

[data-theme="dark"] .feature-box,
[data-theme="dark"] .service-card-modern,
[data-theme="dark"] .content-wrapper {
    background-color: var(--bg-dark);
    border-color: var(--border-color);
}

[data-theme="dark"] .section-title,
[data-theme="dark"] .category-title-modern,
[data-theme="dark"] .service-title-modern,
[data-theme="dark"] .feature-title {
    color: var(--text-dark);
}

[data-theme="dark"] .service-desc-modern,
[data-theme="dark"] .feature-desc,
[data-theme="dark"] .category-subtitle {
    color: var(--text-muted);
}

[data-theme="dark"] .service-badge {
    background: var(--bg-primary-light);
    color: var(--bg-primary);
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .bg-light {
    background-color: var(--bg-dark) !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-dark) !important;
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    .modern-hero *,
    .feature-box,
    .service-card-modern,
    .category-section-modern {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== Print Styles ===== */
@media print {
    .modern-hero,
    .hero-wave,
    .floating-card,
    .hero-circle {
        display: none !important;
    }
}
