/* Custom CSS for Conference Website */

:root {
    --primary-color: #303D5D;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.main-content {
    margin-top: 76px; /* Account for fixed navbar */
    min-height: calc(100vh - 76px);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1.2rem; /* Увеличено с 1rem до 1.2rem */
    transition: color 0.3s ease;
    white-space: nowrap; /* Предотвращает перенос текста */
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Увеличиваем ширину выпадающих меню */
.dropdown-menu {
    min-width: 200px; /* Минимальная ширина для выпадающих меню */
}

.dropdown-item {
    padding: 0.5rem 1.2rem; /* Увеличиваем отступы в выпадающих элементах */
    white-space: nowrap;
}

/* Стили для переключателя языков */
.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.navbar-nav .dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Улучшенные стили для длинных текстов в навигации */
.navbar-nav .nav-link {
    min-width: fit-content; /* Минимальная ширина по содержимому */
}

/* Специальные стили для переключателя языков */
.navbar-nav .dropdown-toggle::after {
    margin-left: 0.5em;
}

/* Hero Section */
.hero-section {
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, rgba(13, 110, 253, 0.9) 0%, rgba(0, 86, 179, 0.9) 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Hero section with background image */
.hero-section[style*="background-image"] {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Fallback for when background image is not available */
.hero-section.no-bg-image {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a2a4a 100%);
}

/* Background image overlay for better text readability */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.card-img-top {
    border-radius: 10px 10px 0 0;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Speaker Cards */
.speaker-card {
    transition: all 0.3s ease;
}

.speaker-card:hover {
    transform: translateY(-5px);
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
}

.gallery-item img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Footer */
footer {
    margin-top: auto;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .main-content {
        margin-top: 60px;
    }
    
    /* Адаптивные стили для навигации */
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem; /* Уменьшаем отступы на мобильных */
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        min-width: 180px; /* Уменьшаем ширину выпадающих меню на мобильных */
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 50vh;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Enhanced text shadow for better readability on background images */
.hero-section h1.text-shadow {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
}

.hero-section .lead {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a2a4a 100%);
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
