/* Custom CSS for QR Generator Pro */

/* Root Variables */
:root {
    --primary-color: #ff6f00;
    --secondary-color: #607d8b;
    --success-color: #4caf50;
    --info-color: #03a9f4;
    --warning-color: #ffc107;
    --danger-color: #f44336;
    --light-color: #f5f5f5;
    --dark-color: #263238;
    --font-family: 'Poppins', sans-serif;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --border-radius: 0.5rem;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), #004a99) !important;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e9ecef" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-section .lead {
    font-size: 1.2rem;
    color: #6c757d;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-section .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-section .btn {
    animation: fadeInUp 1s ease 0.6s both;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

/* QR Type Buttons */
.qr-type-btn {
    padding: 1rem;
    text-align: center;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.qr-type-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.qr-type-btn:hover:before {
    left: 100%;
}

.qr-type-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.qr-type-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #004a99);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #004a99, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 102, 204, 0.3);
}

/* QR Result Styles */
#qrResult {
    animation: fadeInUp 0.5s ease;
}

#qrCanvas {
    max-width: 100%;
    height: auto;
    animation: zoomIn 0.5s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Features Section */
.feature-card {
    padding: 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Statistics */
.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

/* Ad Spaces */
.ad-space {
    margin: 2rem 0;
}

.ad-space .bg-light {
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.ad-space .bg-light:hover {
    background-color: #e9ecef !important;
}

/* Accordion Styles */
.accordion-button {
    font-weight: 500;
    background-color: #f8f9fa;
    border: none;
    border-radius: var(--border-radius) !important;
    margin-bottom: 0.5rem;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.accordion-item {
    border: none;
    margin-bottom: 1rem;
}

.accordion-body {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    background-color: #f8f9fa;
}

/* Contact Section */
.contact-info i {
    color: rgba(255, 255, 255, 0.8);
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--warning-color) !important;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color), #212529) !important;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .qr-type-btn {
        margin-bottom: 1rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .qr-type-btn i {
        font-size: 1.2rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .ad-space, #contact, footer {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    #qrResult {
        page-break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid;
    }
    
    .card {
        border: 1px solid var(--dark-color);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #343a40;
        --dark-color: #f8f9fa;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: dark;
    background-clip: text;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.shadow-custom {
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1) !important;
}

.border-custom {
    border: 2px solid var(--primary-color) !important;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}


@media (max-width: 768px) {
  .text-gradient {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #222 !important; /* لون واضح */
    background-clip: unset !important;
    color: #222 !important;
  }
}
