/* Custom CSS for University of Kigali Conference 2026 */

/* CSS Variables */
:root {
    --primary-color: #8B1538;
    --secondary-color: #5A0D26;
    --accent-color: #C9A050;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --white: #ffffff;
    
    --gradient-primary: linear-gradient(135deg, #8B1538 0%, #5A0D26 100%);
    --gradient-hero: linear-gradient(135deg, rgba(139, 21, 56, 0.9) 0%, rgba(90, 13, 38, 0.95) 100%);
    
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    
    --border-radius: 10px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
    position: relative;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin-bottom: 2rem;
}

.section-description {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* Navigation */
.navbar {
    background: rgba(90, 13, 38, 0.95) !important;
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    position: fixed !important;
    top: 0;
    width: 100%;
}

.navbar.scrolled {
    background: rgba(90, 13, 38, 0.98) !important;
    padding: 0.5rem 0;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand-text {
    line-height: 1.2;
}

.brand-title {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 400;
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color) !important;
}

.navbar-nav .btn-primary {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--dark-color) !important;
    font-weight: 600;
}

.navbar-nav .btn-primary:hover {
    background: #e6c200;
    border-color: #e6c200;
    transform: translateY(-2px);
}

/* Language Dropdown Styles */
.navbar-nav .dropdown-toggle {
    color: var(--white) !important;
    text-decoration: none;
}

.navbar-nav .dropdown-toggle:after {
    margin-left: 0.5rem;
}

.navbar-nav .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
    color: var(--dark-color);
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-nav .dropdown-item:hover {
    background: var(--primary-color);
    color: var(--white);
}

.navbar-nav .dropdown-item i {
    width: 20px;
}

#currentLanguage {
    font-weight: 600;
    text-transform: uppercase;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    position: relative;
    background: linear-gradient(135deg, rgba(139, 21, 56, 0.5) 0%, rgba(90, 13, 38, 0.6) 100%), url('../images/Hero Section.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* Prevent any unwanted movement */
    transform: none !important;
    padding-top: 80px; /* Account for fixed navbar */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(46, 139, 87, 0.05) 0%, rgba(30, 86, 49, 0.1) 100%);
    z-index: 1;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0); /* Force hardware acceleration */
    contain: layout style paint; /* CSS containment for better performance */
}

/* Disable particles on low-end devices */
@media (prefers-reduced-motion: reduce) {
    .hero-particles {
        display: none;
    }
}

/* Reduce particles on mobile for better performance */
@media (max-width: 768px) {
    .hero-particles {
        opacity: 0.5;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    width: 100%;
}

.conference-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    animation: pulse 2s infinite;
}

.badge-text {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.title-highlight {
    color: var(--accent-color);
    position: relative;
}

.title-main {
    color: var(--white);
}

.title-accent {
    color: #98FB98;
}

.hero-subtitle h2 {
    font-size: 2.2rem;
    font-weight: 500;
    color: #E0E0E0;
    font-style: italic;
    margin-bottom: 2rem;
}

.conference-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-item i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

.hero-actions {
    margin: 3rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    border-radius: var(--border-radius);
    padding: 0.8rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--dark-color);
}

.btn-primary:hover {
    background: #e6c200;
    color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

.btn-outline-light {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.scroll-indicator {
    animation: bounce 2s infinite;
}

.scroll-arrow {
    font-size: 1.5rem;
    color: var(--accent-color);
    cursor: pointer;
    transition: var(--transition);
}

.scroll-arrow:hover {
    transform: translateY(5px);
    color: var(--white);
}

/* About Section */
#about {
    padding: 6rem 0;
}

.conference-stats {
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    transition: var(--transition);
    border: 1px solid #e9ecef;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
    background: var(--white);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-secondary);
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.02);
}

/* Themes Section */
#themes {
    padding: 6rem 0;
}

.theme-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid #e9ecef;
    height: 100%;
}

.theme-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.theme-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.theme-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.3;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-description {
    color: #6c757d;
    text-align: center;
    line-height: 1.6;
}

/* Photo Gallery Section */
#photo-gallery {
    padding: 6rem 0;
    background: #f8f9fa;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

/* Animated border effect */
.gallery-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8B1538, #C9A050, #5A0D26, #8B1538);
    background-size: 400%;
    border-radius: 15px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 21, 56, 0.3);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 15px;
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 21, 56, 0.9), rgba(90, 13, 38, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 15px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: #fff;
    font-size: 3rem;
    transform: scale(0);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
    #photo-gallery {
        padding: 4rem 0;
    }
    
    .gallery-item {
        margin-bottom: 1rem;
    }
    
    .gallery-overlay i {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .gallery-item {
        aspect-ratio: 1/1;
    }
}

/* Speakers Section */
#speakers {
    padding: 6rem 0;
}

.speaker-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 2rem;
}

.speaker-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.speaker-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.speaker-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.speaker-card:hover .speaker-image img {
    transform: scale(1.1);
}

.speaker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.speaker-card:hover .speaker-overlay {
    opacity: 0.9;
}

.speaker-social {
    display: flex;
    gap: 1rem;
}

.speaker-social a {
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.speaker-social a:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

.speaker-info {
    padding: 1.5rem;
    text-align: center;
}

.speaker-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.speaker-title {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.speaker-bio {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Program Section */
#program {
    padding: 6rem 0;
}

.program-tabs .nav-pills .nav-link {
    color: var(--dark-color);
    background: transparent;
    border: 2px solid #e9ecef;
    margin: 0 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.program-tabs .nav-pills .nav-link.active,
.program-tabs .nav-pills .nav-link:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.program-day {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.program-item {
    display: flex;
    align-items: start;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.program-item:last-child {
    border-bottom: none;
}

.program-time {
    min-width: 100px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.program-content {
    flex: 1;
    margin-left: 2rem;
}

.program-session {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.program-speaker {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.program-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Contact Section */
#contact {
    padding: 6rem 0;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item i {
    width: 20px;
    text-align: center;
}

.contact-item a {
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

#contactForm .form-control,
#contactForm .form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

#contactForm .form-control:focus,
#contactForm .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(46, 139, 87, 0.25);
}

#contactForm .form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

#contactForm .btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

#contactForm .btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 139, 87, 0.3);
}

.social-links-contact .btn {
    border-radius: 25px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.social-links-contact .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Registration Section */
#register {
    padding: 4rem 0;
    background: var(--gradient-primary) !important;
}

/* Footer */
.footer {
    background: #1a1a1a !important;
    color: var(--white);
}

.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-logo {
    width: 50px;
    height: 50px;
}

.footer-title {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #cccccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.contact-info {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #cccccc;
}

.contact-item i {
    color: var(--accent-color);
    width: 20px;
}

.contact-item a {
    color: #cccccc;
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 215, 0, 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-color);
    color: var(--dark-color);
    transform: translateY(-3px);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 60px; /* Smaller navbar padding on mobile */
        background-attachment: scroll; /* Better performance on mobile */
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle h2 {
        font-size: 1.5rem;
    }
    
    .conference-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .detail-item {
        justify-content: center;
        width: 100%;
        text-align: center;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 80%;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .program-item {
        flex-direction: column;
        text-align: center;
    }
    
    .program-content {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .program-tabs .nav-pills {
        flex-direction: column;
    }
    
    .program-tabs .nav-pills .nav-link {
        margin: 0.25rem 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 70px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-subtitle h2 {
        font-size: 1.3rem;
    }
    
    .navbar-brand .brand-title {
        font-size: 1rem;
    }
    
    .navbar-brand .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .conference-badge {
        padding: 0.4rem 1rem;
    }
    
    .badge-text {
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .hero-actions .btn {
        width: 90%;
    }
    
    .detail-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Conference Theme Section Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scaleX(1);
    }
    50% {
        opacity: 0.7;
        transform: scaleX(1.1);
    }
}

/* Responsive adjustments for theme section */
@media (max-width: 768px) {
    #conference-theme .theme-content {
        padding: 2rem 0 !important;
    }
    
    #conference-theme .theme-title {
        font-size: 2rem !important;
    }
    
    #conference-theme .theme-subtitle {
        font-size: 1.3rem !important;
    }
    
    #conference-theme .floating-element {
        display: none;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    .scroll-indicator,
    .footer {
        display: none;
    }
    
    body {
        color: black;
    }
    
    .section-title {
        color: black;
    }
}