/* Custom CSS for Department of Robotics and Automation Website */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2D2D2D;
    overflow-x: hidden;
    background-color: #FFF8E7; /* Cream background */
}

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

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

::-webkit-scrollbar-track {
    background: #FFFBF0; /* Light cream */
}

::-webkit-scrollbar-thumb {
    background: #800020;
    border-radius: 4px;
}

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

/* Slideshow Styles */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

.slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    display: flex;
    opacity: 1;
}

.slide-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.slide-dot.active {
    background-color: white !important;
    transform: scale(1.2);
}

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

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

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

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

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

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

.animate-spin-slow {
    animation: spin 8s linear infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

/* Hero Background Images */
.hero-slide-1 {
    background: linear-gradient(135deg, #2D2D2D 0%, #4A4A4A 100%), url('https://images.unsplash.com/photo-1485827404703-89b55fcc595e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
}

.hero-slide-2 {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%), url('https://images.unsplash.com/photo-1559028006-448665bd7c7f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
}

.hero-slide-3 {
    background: linear-gradient(135deg, #404040 0%, #2D2D2D 100%), url('https://images.unsplash.com/photo-1567789884554-0b844b597180?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
}

/* Intersection Observer Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
}

/* Card hover effects */
.hover-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

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

/* Button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #D4AF37, #FFD700);
    color: #800020;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FFD700, #D4AF37);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #800020;
    padding: 12px 24px;
    border: 2px solid #D4AF37;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #800020;
    color: #FFF8E7;
    transform: translateY(-2px);
}

/* Navigation enhancements */
nav a {
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: #800020;
    transition: left 0.3s ease;
}

nav a:hover::before {
    left: 0;
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #FFF8E7; /* Cream */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 40;
    padding: 20px;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #2D2D2D;
    text-decoration: none;
    font-weight: 500;
}

.mobile-menu a:hover {
    color: #800020;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(128, 0, 32, 0.3);
    border-radius: 50%;
    border-top-color: #800020;
    animation: spin 1s ease-in-out infinite;
}

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

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

/* Text gradient effect */
.text-gradient {
    background: linear-gradient(135deg, #800020, #2D2D2D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive design enhancements */
@media (max-width: 768px) {
    .slide h2 {
        font-size: 2.5rem;
    }
    
    .slide p {
        font-size: 1rem;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .mobile-menu.active {
        display: block;
    }
}

/* Gallery lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox img,
.lightbox video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #800020;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2D2D2D;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #800020;
}

/* Table styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #FFFBF0; /* Light cream */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #800020;
    color: #FFF8E7;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #800020, #a0002a);
    transition: width 0.3s ease;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #2D2D2D;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
}
