/* Custom styles for Defender Control website */

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    min-height: 100vh;
    background-color: #f8fafc;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.12) 0, transparent 25%),
        radial-gradient(circle at 90% 10%, rgba(14, 165, 233, 0.18) 0, transparent 30%);
}

.font-display {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.global-gradient {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.5), transparent 55%);
    opacity: 0.8;
    z-index: -2;
    pointer-events: none;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 120px 120px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.hero-section {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.icon-badge {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stat-card {
    position: relative;
    border-radius: 1.5rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.95);
    padding: 1.75rem;
    box-shadow: 0 25px 60px -45px rgba(15, 23, 42, 0.6);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    background-color: transparent;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.shadow-glow {
    box-shadow: 0 25px 45px -25px rgba(59, 130, 246, 0.8);
}

.hero-preview {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    background-color: rgba(15, 23, 42, 0.8);
    padding: 1rem;
}

.screenshot-grid figure {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.screenshot-grid .screenshot-img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    background-color: #0f172a;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.screenshot-grid figcaption {
    flex: 1;
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .screenshot-grid .screenshot-img {
        height: 220px;
        padding: 0.75rem;
    }
}

/* Custom focus styles for accessibility */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Skip to content link styling */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: #2563eb;
    color: white;
    border-radius: 0.375rem;
    z-index: 50;
}

/* Mobile menu animations */
.mobile-menu-button {
    transition: all 0.3s ease;
}

.mobile-menu-button:hover {
    transform: scale(1.05);
}

/* FAQ accordion animations */
.faq-question {
    transition: all 0.3s ease;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.faq-answer:not(.hidden) {
    max-height: 500px;
}

/* Custom button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Hero section gradient animation */
.hero-gradient {
    background: linear-gradient(-45deg, #3b82f6, #1d4ed8, #1e40af, #1e3a8a);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Testimonial card styling */
.testimonial-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-color: #3b82f6;
    transform: translateY(-2px);
}

/* Code block styling */
.code-block {
    background: #1f2937;
    color: #10b981;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* Warning banner animation */
.warning-banner {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid #ef4444;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.95;
    }
}

/* Safety section styling */
.safety-section {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-left: 4px solid #ef4444;
}

/* Download section styling */
.download-section {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

/* FAQ search styling */
.faq-search {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.faq-search:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Star rating animation */
.star-rating {
    animation: twinkle 2s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

/* Loading animation for images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .bg-gradient-to-r,
    .bg-blue-600,
    .bg-gray-900 {
        background: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000 !important;
    }
    
    .text-gray-700 {
        color: #000000 !important;
    }
    
    .bg-gray-50 {
        background-color: #ffffff !important;
        border: 1px solid #000000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .dark-mode .bg-white {
        background-color: #374151 !important;
    }
    
    .dark-mode .text-gray-900 {
        color: #f9fafb !important;
    }
    
    .dark-mode .text-gray-700 {
        color: #d1d5db !important;
    }
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Success/Error states */
.success-state {
    border-color: #10b981;
    background-color: #ecfdf5;
}

.error-state {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* Custom checkbox and radio styles */
.custom-checkbox {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: white;
    cursor: pointer;
    position: relative;
}

.custom-checkbox:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Custom progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Custom badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

