:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ==================== ANIMATIONS ==================== */

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

@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 float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(20px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Animation Classes */
.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

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

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* ==================== HERO SECTION ==================== */

.hero-section {
    animation: fadeInDown 0.6s ease-in-out;
    position: relative;
    z-index: 1;
}

.hero-section .display-3 {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

/* ==================== CARDS ==================== */

.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.card:hover {
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2) !important;
}

.conference-card {
    border-radius: 12px;
}

.conference-card img {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.conference-card:hover img {
    transform: scale(1.15) rotate(1deg);
}

.service-card {
    position: relative;
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px) !important;
}

.service-card .card-body {
    box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.1);
}

.project-card {
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
}

.project-card:nth-child(2n) {
    border-left-color: var(--secondary-color);
}

.project-card:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15) !important;
}

.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-5px);
}

/* ==================== BUTTONS ==================== */

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #0e7c74 0%, #2bc86d 100%);
    transform: translateY(-2px);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ==================== FORMS ==================== */

.form-control {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.3rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    transition: color 0.3s ease;
}

/* ==================== NAVIGATION ==================== */

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    transform: translateY(-2px);
}

/* ==================== TABLES ==================== */

.table {
    border-collapse: collapse;
}

.table thead th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e0e0e0;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

.table tbody td {
    vertical-align: middle;
}

/* ==================== ALERTS ==================== */

.alert {
    border: none;
    border-radius: 12px;
    border-left: 5px solid;
    animation: slideDown 0.3s ease-out;
}

.alert-info {
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1), rgba(23, 162, 184, 0.05));
}

.alert-success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
}

.alert-danger {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
}

.alert-warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
}

/* ==================== BADGES ==================== */

.badge {
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

.badge.pulse {
    animation: pulse 2s infinite;
}

/* ==================== FOOTER ==================== */

footer {
    margin-top: auto;
    background-color: #2c3e50;
    border-top: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

footer a {
    text-decoration: none;
    color: #67b26f;
    transition: all 0.3s ease;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #82d982;
    transition: width 0.3s ease;
}

footer a:hover {
    color: #82d982;
}

footer a:hover::after {
    width: 100%;
}

/* ==================== STATS SECTION ==================== */

.stat-box {
    padding: 30px;
    border-radius: 12px;
    transition: all 0.4s ease;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.stat-box:hover {
    transform: translateY(-10px);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.stat-box h3 {
    transition: color 0.3s ease;
}

.stat-box:hover h3 {
    filter: brightness(1.2);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 15px !important;
        min-height: auto;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .card {
        margin-bottom: 20px;
    }

    .table {
        font-size: 0.9rem;
    }

    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .stat-box {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .display-3 {
        font-size: 1.8rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* ==================== UTILITIES ==================== */

.sticky-top {
    position: sticky;
    top: 20px;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Gradient backgrounds */
.bg-gradient-1 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.bg-gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bg-gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Smooth transitions */
* {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Conference card specific */
.conference-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.conference-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.conference-card .card-text:last-child {
    margin-top: auto;
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Smooth page transitions */
@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

main {
    animation: pageLoad 0.5s ease-out;
}
