/* Lead IT Custom Styles */
/* Additional styling and overrides for the Lead IT website */

/* Define custom colors that match our brand */
:root {
    --lead-blue: #3B82F6;
    --lead-dark-blue: #1E40AF;
    --lead-green: #10B981;
    --lead-orange: #F59E0B;
    --lead-grey: #6B7280;
    --lead-dark-grey: #374151;
}

/* Custom Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.8); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Moving Alert Banner Animation */
@keyframes moveLeft {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.moving-text-container {
    width: 100%;
    overflow: hidden;
}

.moving-text {
    animation: moveLeft 90s linear infinite;
    animation-delay: 0s;
    display: flex;
    align-items: center;
    min-width: 200%;
}

/* Responsive Images for News Cards */
.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-image:hover {
    transform: scale(1.05);
}

/* Admin Dashboard Styles */
.admin-news-image {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* News Filter Styles */
.category-filter {
    background-color: #f3f4f6;
    color: #6b7280;
    transition: all 0.3s ease;
}

.category-filter:hover {
    background-color: #e5e7eb;
    transform: translateY(-2px);
}

.category-filter.active {
    background-color: var(--lead-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* News Card Animations */
.news-card {
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* News Modal Styles */
#news-modal {
    backdrop-filter: blur(8px);
    z-index: 9999;
}

.prose h1,
.prose h2,
.prose h3 {
    color: var(--lead-dark-grey);
}

.prose p {
    line-height: 1.8;
    margin-bottom: 1.5em;
}

/* Loading animations */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* News Page Styles */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* News Modal Styles */
#news-modal {
    backdrop-filter: blur(4px);
}

#news-modal .prose {
    color: #6B7280;
    line-height: 1.8;
    font-size: 16px;
}

#news-modal .prose p {
    margin-bottom: 1rem;
}

#news-modal .prose h1,
#news-modal .prose h2,
#news-modal .prose h3 {
    color: #374151;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.read-more-btn {
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    transform: translateX(4px);
}

.edit-news-btn {
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.edit-news-btn:hover {
    background-color: rgba(251, 146, 60, 0.1);
    transform: scale(1.1);
}

/* Line clamp utility for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
}

/* Enhanced Button Styles */
.btn-gradient {
    background: linear-gradient(45deg, var(--lead-blue), var(--lead-green));
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-hover::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.card-hover:hover::before {
    animation: shine 0.6s ease-in-out;
    opacity: 1;
}

/* Floating Animation */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Pulse Glow Effect */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Text Animation */
.text-gradient {
    background: linear-gradient(45deg, var(--lead-blue), var(--lead-green), var(--lead-orange));
    background-size: 300% 300%;
    animation: gradient-shift 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Icon Animations */
.icon-bounce:hover {
    animation: bounce 0.6s ease-in-out;
}

.icon-spin:hover {
    animation: spin 1s linear infinite;
}

.icon-wobble:hover {
    animation: wobble 0.8s ease-in-out;
}

/* Loading Animation */
.loading-dots::after {
    content: '';
    animation: typing 1.5s steps(3, end) infinite;
}

/* Responsive Glassmorphism */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced Navigation */
.nav-item {
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.5s;
}

.nav-item:hover::before {
    left: 100%;
}

/* Parallax Effects */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--lead-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--lead-dark-blue);
}

/* Section Dividers */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--lead-blue), var(--lead-green), var(--lead-orange));
    margin: 2rem 0;
}

/* Interactive Elements */
.interactive-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

.interactive-hover:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Notification Styles */
.notification {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--lead-blue);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Loading animation enhancements */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Custom button hover effects */
.btn-hover-scale {
    transition: transform 0.2s ease-in-out;
}

.btn-hover-scale:hover {
    transform: scale(1.05);
}

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

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    border-color: var(--lead-blue);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
    
    .mobile-center {
        text-align: center;
    }
    
    .mobile-stack {
        flex-direction: column;
    }
    
    .float-animation {
        animation: none; /* Disable animations on mobile for performance */
    }
}

.form-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Custom gradient backgrounds */
.gradient-blue {
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

/* Enhanced card shadows */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Navigation enhancements */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3B82F6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

.mobile-menu.active {
    max-height: 500px;
}

/* Testimonial card enhancements */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3B82F6, #10B981, #F59E0B);
}

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

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Scroll to top button animation */
.scroll-to-top {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

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

.scroll-to-top:hover {
    transform: translateY(-2px);
}

/* Modal animations */
.modal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transition: transform 0.3s ease;
    transform: scale(0.9);
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Custom focus states */
.focus-ring:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Enhanced typography */
.text-gradient {
    background: linear-gradient(135deg, #3B82F6, #10B981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero section enhancements */
.hero-bg {
    position: relative;
    overflow: hidden;
}

.hero-bg::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 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,0 0,800 400,1000 1000,400 1000,0"/></svg>');
    background-size: cover;
    background-position: center;
}

/* Service card enhancements */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

/* Form validation styles */
.form-error {
    border-color: #EF4444;
    background-color: #FEF2F2;
}

.form-success {
    border-color: #10B981;
    background-color: #F0FDF4;
}

.error-message {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.success-message {
    color: #10B981;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5E7EB;
    border-top: 4px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mobile-text-sm {
        font-size: 0.875rem;
    }
    
    .mobile-hidden {
        display: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-after: always;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        /* Dark mode styles can be added here */
    }
}

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

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom animations for AOS */
[data-aos="fade-up"] {
    transform: translate3d(0, 20px, 0);
    opacity: 0;
}

[data-aos="fade-up"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-down"] {
    transform: translate3d(0, -20px, 0);
    opacity: 0;
}

[data-aos="fade-down"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-left"] {
    transform: translate3d(-20px, 0, 0);
    opacity: 0;
}

[data-aos="fade-left"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-right"] {
    transform: translate3d(20px, 0, 0);
    opacity: 0;
}

[data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 1px solid;
    border-image: linear-gradient(135deg, #3B82F6, #10B981) 1;
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Custom transitions */
.transition-all-slow {
    transition: all 0.5s ease;
}

.transition-all-fast {
    transition: all 0.1s ease;
}
