/* Custom styles for Defender Control website */

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Custom focus styles for accessibility */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Compact FAQ Section Styles */
.faq-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .faq-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* FAQ Category Buttons */
.faq-category-btn {
    background: white;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.faq-category-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.faq-category-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.faq-category-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* FAQ Item Styles */
.faq-item {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.faq-item.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.faq-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* FAQ Question Button */
.faq-question {
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-question-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.faq-icon-wrapper {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.faq-category-icon {
    width: 1rem;
    height: 1rem;
    color: #3b82f6;
}

.faq-text {
    flex: 1;
}

.faq-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.faq-category-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.125rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.faq-arrow {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .faq-arrow {
    transform: rotate(180deg);
    color: #3b82f6;
}

/* FAQ Answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.faq-answer.open {
    max-height: 300px;
}

.faq-answer-content {
    padding: 0 1rem 1rem 1rem;
}

.faq-answer-content p {
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
}

.faq-answer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.75rem;
}

.faq-helpful {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.faq-feedback {
    display: flex;
    gap: 0.25rem;
}

.faq-thumbs-up,
.faq-thumbs-down {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.faq-thumbs-up:hover,
.faq-thumbs-down:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.faq-thumbs-up:active,
.faq-thumbs-down:active {
    transform: scale(0.95);
}

/* FAQ Animation Classes */
.faq-item.animate-in {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 640px) {
    .faq-container {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .faq-question {
        padding: 0.75rem;
    }
    
    .faq-question-content {
        gap: 0.5rem;
    }
    
    .faq-icon-wrapper {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .faq-category-icon {
        width: 0.875rem;
        height: 0.875rem;
    }
    
    .faq-title {
        font-size: 0.875rem;
    }
    
    .faq-answer-content {
        padding: 0 0.75rem 0.75rem 0.75rem;
    }
    
    .faq-answer-footer {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}


/* Fixed Download Button */
.fixed-download-btn {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    transition: all 0.3s ease;
}

.fixed-download-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 16px 12px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    min-width: 60px;
    min-height: 60px;
}

.fixed-download-link:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
}

.fixed-download-text {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    text-align: center;
    line-height: 1.2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fixed-download-btn {
        right: 15px;
        top: auto;
        bottom: 20px;
        transform: none;
    }
    
    .fixed-download-link {
        padding: 12px 10px;
        min-width: 50px;
        min-height: 50px;
    }
    
    .fixed-download-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .fixed-download-btn {
        right: 10px;
        bottom: 15px;
    }
    
    .fixed-download-link {
        padding: 10px 8px;
        min-width: 45px;
        min-height: 45px;
    }
    
    .fixed-download-text {
        font-size: 9px;
    }
}

/* Custom gradient backgrounds */
.gradient-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Enhanced button styles */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #3b82f6;
    transform: translateY(-1px);
}

/* Code block styling */
code {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

pre code {
    display: block;
    padding: 1rem;
    background-color: #1f2937;
    color: #f9fafb;
    border-radius: 0.5rem;
    overflow-x: auto;
}

/* Enhanced card styles */
.card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Warning and alert styles */
.alert-warning {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-info {
    background-color: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.alert-success {
    background-color: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

/* Mobile menu animations */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-exit {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 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%;
    }
}

/* Enhanced typography */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 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;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background-color: #ffffff;
    }
    
    .text-gray-700 {
        color: #000000;
    }
    
    .border-gray-200 {
        border-color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support (if implemented) */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .dark-mode .bg-white {
        background-color: #374151;
    }
    
    .dark-mode .text-gray-900 {
        color: #f9fafb;
    }
    
    .dark-mode .text-gray-700 {
        color: #d1d5db;
    }
}

/* Responsive design enhancements */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Accessibility improvements */
.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;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: #3b82f6;
    color: white;
    border-radius: 0.25rem;
}

/* Enhanced form styles */
.form-input {
    transition: all 0.2s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 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);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Custom checkbox and radio styles */
.custom-checkbox {
    position: relative;
    display: inline-block;
}

.custom-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.custom-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 4px;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark:after {
    display: block;
}
