/* Custom CSS for Nodesign PHP */

/* Mobile menu toggle */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.mobile-menu.active {
    max-height: 500px; /* Enough to show all menu items */
}

/* For larger screens, ensure mobile menu is hidden */
@media (min-width: 1024px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Primary brand color - #FC4513 */
.hero-gradient {
    background: #FC4513 !important;
}

.bg-gradient-primary {
    background: #FC4513 !important;
}

.bg-primary {
    background-color: #FC4513 !important;
}

.text-primary {
    color: #FC4513 !important;
}

.text-gradient-primary {
    color: #FC4513 !important;
}

.border-primary {
    border-color: #FC4513 !important;
}

.hover\:bg-primary:hover {
    background-color: #FC4513 !important;
}

.hover\:text-primary:hover {
    color: #FC4513 !important;
}

/* Button hover effects */
.btn-gradient-hover:hover {
    background: #d63e11 !important; /* Darker shade of #FC4513 */
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(252, 69, 19, 0.15);
}

/* Button styles */
.btn-primary {
    background: #FC4513 !important;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #d63e11 !important; /* Darker shade */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(252, 69, 19, 0.4) !important;
}

/* --- Dark Theme (Dracula) --- */
body.dark-theme {
    background-color: #282a36 !important;
    color: #f8f8f2 !important;
}

/* Override Tailwind Backgrounds */
.dark-theme .bg-white {
    background-color: #282a36 !important;
}

.dark-theme .bg-gray-50, 
.dark-theme .bg-gray-100,
.dark-theme .bg-gray-200 {
    background-color: #282a36 !important; /* Main background */
}

.dark-theme .bg-gray-900 {
    background-color: #21222c !important; /* Darker background for footer */
}

/* Cards and sections that need contrast */
.dark-theme .bg-white.shadow-lg,
.dark-theme .bg-white.shadow,
.dark-theme .card,
.dark-theme nav.bg-white {
    background-color: #44475a !important; /* Current Line */
    color: #f8f8f2 !important;
}

/* Text Colors */
.dark-theme .text-gray-900,
.dark-theme .text-gray-800,
.dark-theme .text-gray-700 {
    color: #f8f8f2 !important; /* Foreground */
}

.dark-theme .text-gray-600,
.dark-theme .text-gray-500,
.dark-theme .text-gray-400 {
    color: #bd93f9 !important; /* Purple for secondary text */
}

/* Borders */
.dark-theme .border-gray-200,
.dark-theme .border-gray-300 {
    border-color: #6272a4 !important; /* Comment */
}

/* Links and Accents */
.dark-theme a.text-gray-700:hover,
.dark-theme a.text-gray-600:hover {
    color: #ff79c6 !important; /* Pink */
}

/* Specific overrides for inputs if any */
.dark-theme input, 
.dark-theme textarea, 
.dark-theme select {
    background-color: #282a36 !important;
    color: #f8f8f2 !important;
    border-color: #6272a4 !important;
}

/* --- Theme Switcher & Back to Top --- */
.theme-switch-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #44475a;
    color: #f8f8f2;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    border: 2px solid #bd93f9;
}

.theme-switch-btn:hover {
    transform: translateY(-3px);
    background-color: #6272a4;
}

.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #FC4513;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: #d63e11;
    transform: translateY(-3px);
}

/* Dark theme adjustments for buttons */
.dark-theme .theme-switch-btn {
    background-color: #f8f8f2;
    color: #282a36;
    border-color: #ff79c6;
}

/* Enhanced button styles */
.btn-gradient {
    background: #FC4513;
    transition: all 0.3s ease;
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(252, 69, 19, 0.1);
}

.btn-gradient:hover {
    background: #d63e11; /* Darker shade */
    box-shadow: 0 10px 25px rgba(252, 69, 19, 0.3);
    transform: translateY(-2px);
}

/* Form styles */
.form-control {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #FC4513 !important;
    box-shadow: 0 0 0 3px rgba(252, 69, 19, 0.1) !important;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #FC4513 !important;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert styles */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.alert-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Gradient text utilities */
.text-gradient {
    background: linear-gradient(135deg, #dc2626, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #dc2626, #f97316);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #b91c1c, #ea580c);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-full {
        width: 100% !important;
    }
    
    .mobile-text-center {
        text-align: center !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .btn-gradient,
    .hero-gradient {
        background: #dc2626 !important;
        color: white !important;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1a1a1a;
        color: #ffffff;
    }
}

/* 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;
}

/* Focus styles for better accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #dc2626 !important;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #dc2626 !important;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Header glass effect */
.header-glass {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(220, 38, 38, 0.1);
}

/* Enhanced mobile menu */
.mobile-menu {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.98);
}

/* Responsive text adjustments */
@media (max-width: 640px) {
    .text-4xl {
        font-size: 2rem !important;
        line-height: 2.5rem !important;
    }
    
    .text-5xl {
        font-size: 2.5rem !important;
        line-height: 3rem !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-gradient {
        border: 2px solid #000 !important;
    }
    
    .text-gradient {
        -webkit-text-fill-color: #dc2626 !important;
        background: none !important;
    }
}
