/* Custom CSS for AdvaMinds Website */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Account for fixed navbar height + some extra space */
}

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

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

::-webkit-scrollbar-thumb {
    background: #DC1F26;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B01820;
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bounce Slow Animation for Hero Icons */
@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navigation Active Link */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #DC1F26;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    margin-top: 10px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #4B5563;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-menu a:hover {
    background: #DC1F26;
    color: white;
    padding-left: 25px;
}

.dropdown-menu a i {
    margin-right: 8px;
    width: 16px;
}


/* Button Hover Effects */
button, .button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active, .button:active {
    transform: scale(0.95);
}

/* Card Hover Effect */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift: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);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #DC1F26 0%, #4FA9C7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Reveal Animation */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Table */
@media (max-width: 768px) {
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 12px 8px !important;
    }
}

/* Custom Focus Styles */
input:focus, textarea:focus {
    ring: 2px;
    ring-color: #DC1F26;
    border-color: #DC1F26;
}

/* Hero Section Background Pattern */
.hero-pattern {
    background-image: 
        linear-gradient(45deg, rgba(220, 31, 38, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(79, 169, 199, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(220, 31, 38, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(79, 169, 199, 0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Timeline Connector Animation */
.timeline-dot {
    position: relative;
}

.timeline-dot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Stats Counter Animation */
@keyframes countUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.count-animation {
    animation: countUp 0.6s ease-out;
}

/* Image Overlay Effect */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(220, 31, 38, 0.8) 0%, rgba(79, 169, 199, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
    opacity: 1;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

#mobile-menu.hidden {
    transform: scaleY(0);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: scaleY(1);
    opacity: 1;
}

/* Scroll to Top Button */
#scrollToTop {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#scrollToTop.show {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Form Input Floating Label Effect */
.form-group {
    position: relative;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem);
    font-size: 0.75rem;
    color: #DC1F26;
}

/* Print Styles */
@media print {
    nav, footer, #scrollToTop {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* CTA Button Pulse Animation */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(79, 70, 229, 0.6), 0 0 40px rgba(79, 70, 229, 0.4);
    }
}

.cta-button {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Smooth Entrance Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideInUp 0.8s ease-out;
}

/* Stagger Animation for Cards */
.stagger-animation {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.stagger-animation:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation:nth-child(6) { animation-delay: 0.6s; }

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid #DC1F26;
    outline-offset: 2px;
}

/* Custom Selection Color */
::selection {
    background-color: #DC1F26;
    color: white;
}

::-moz-selection {
    background-color: #DC1F26;
    color: white;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #DC1F26;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}
