/* Custom CSS for Dr. Jaladi Rajarao Memorial Website */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* Root Variables */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-hero-1: rgba(30, 58, 138, 0.95);
    --gradient-hero-2: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    --gradient-hero-3: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #374151;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

.display-1, .display-2, .display-3, .display-4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Navigation Styles */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(30, 58, 138, 0.95) !important;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(30, 58, 138, 1) !important;
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem !important;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 25px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--warning-color) !important;
    background: rgba(245, 158, 11, 0.1);
    transform: translateY(-2px);
}

/* Hero Slider Styles */
.hero-slider {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide-1 {
    background: rgba(30, 58, 138, 0.95);
}

.hero-slide-2 {
    background: var(--gradient-hero-2);
}

.hero-slide-3 {
    background: var(--gradient-hero-3);
}

.hero-slide::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="%23ffffff" fill-opacity="0.05" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image, .hero-icon {
    animation: fadeInUp 1s ease-out;
}

.profile-circle {
    width: 200px;
    height: 200px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow-2xl);
    border: 5px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.profile-circle:hover {
    transform: scale(1.05) rotate(5deg);
}

.profile-circle i {
    font-size: 4rem;
    color: white;
}

.hero-buttons .btn {
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2xl);
}

/* Carousel Enhancements */
.carousel-indicators {
    bottom: 30px;
}

.carousel-indicators button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0 5px;
    border: 2px solid white;
    background: transparent;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background: var(--warning-color);
    border-color: var(--warning-color);
    transform: scale(1.2);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 30px;
    height: 30px;
    background-size: 100%;
}

/* Animations */
@keyframes fadeInUp {
    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 bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.slide-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

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

.delay-1 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.delay-2 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.delay-3 {
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

/* Card Styles */
.card {
    border: none;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 15px;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
}

.card-body {
    position: relative;
}

/* Achievement Items */
.achievement-item {
    transition: all 0.3s ease;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid transparent;
}

.achievement-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: var(--primary-color);
    transform: translateX(10px);
}

.achievement-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.achievement-item:hover .achievement-icon {
    background: var(--primary-color);
    color: white !important;
    transform: scale(1.1);
}

/* Value Icons */
.value-icon {
    transition: all 0.3s ease;
}

.value-icon:hover {
    transform: scale(1.2) rotate(10deg);
}

/* Jaladi Jayanthi Cards */
.jayanthi-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: none;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.jayanthi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--warning-color);
}

.awards-card {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: none;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.awards-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--primary-color);
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--warning-color));
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    top: 0;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -12px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -12px;
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    top: 15px;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -20px;
    border-left-color: white;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: white;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-2xl);
}

/* Award Category Cards */
.award-category-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 15px;
    background: white;
}

.award-category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-15px);
    box-shadow: var(--shadow-2xl);
}

.award-category-card:hover i {
    transform: scale(1.3) rotate(15deg);
}

/* Publication Cards */
.publication-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    background: white;
    position: relative;
    overflow: hidden;
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: all 0.3s ease;
}

.publication-card:hover::before {
    transform: scaleY(1);
}

.publication-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

/* Author Avatar */
.author-avatar {
    transition: all 0.3s ease;
}

.author-avatar:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Legacy Icons */
.legacy-icon {
    transition: all 0.3s ease;
}

.legacy-icon:hover {
    transform: scale(1.3) rotate(15deg);
}

/* Social Links */
.social-links a {
    transition: all 0.3s ease;
    display: inline-block;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 5px;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    background: var(--warning-color);
    color: var(--dark-color) !important;
}

/* Button Enhancements */
.btn {
    transition: all 0.3s ease;
    font-weight: 600;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    border: none;
}

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

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-warning {
    background: var(--gradient-secondary);
    border: none;
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.modal-header {
    border-bottom: none;
    background: var(--gradient-primary);
}

.modal-footer {
    border-top: none;
    background: #f8fafc;
}

/* Form Enhancements */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    padding: 12px 16px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
    transform: translateY(-2px);
}

.form-label {
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* Badge Enhancements */
.badge {
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.875rem;
}

/* Section Spacing */
section {
    padding: 80px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 60px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }
    
    .timeline-marker {
        left: 10px !important;
        right: auto !important;
    }
    
    .timeline-content::before {
        left: -20px !important;
        right: auto !important;
        border-right-color: white !important;
        border-left-color: transparent !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .display-2 {
        font-size: 2.5rem;
    }
    
    .profile-circle {
        width: 150px;
        height: 150px;
    }
    
    .profile-circle i {
        font-size: 3rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.scroll-to-top:hover {
    background: var(--gradient-secondary);
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-2xl);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* Intersection Observer Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Print Styles */
@media print {
    .navbar,
    .scroll-to-top,
    .modal,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators {
        display: none !important;
    }
    
    .hero-slider {
        background: white !important;
        color: black !important;
        height: auto !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    section {
        padding: 40px 0 !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --warning-color: #ff8c00;
        --success-color: #008000;
        --danger-color: #dc143c;
    }
}

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