/* KCCC-CRU Website Styles */

/* Color Variables from Logo */
:root {
    --primary-navy: #1B365D;
    --primary-teal: #2D8B8B;
    --secondary-teal: #4ECDC4;
    --accent-gray: #8B8B8B;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Activities Styles */
.activity-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.speaker-photo {
    transition: transform 0.2s ease;
}

.speaker-item:hover .speaker-photo {
    transform: scale(1.1);
}

.speaker-bio-hover {
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-width: 250px;
}

.speaker-item:hover .speaker-bio-hover {
    display: block !important;
}

/* Registration Modal Styles */
.modal-lg {
    max-width: 800px;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Activity Type Colors */
.bg-course { background-color: #007bff !important; }
.bg-event { background-color: #28a745 !important; }
.bg-conference { background-color: #17a2b8 !important; }
.bg-research { background-color: #ffc107 !important; }
.bg-project { background-color: #6c757d !important; }


.badge {
    font-size: 0.75em;
    padding: 0.35em 0.65em;
}

.card-body {
    padding: 1.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* RTL Support for Arabic */
[dir="rtl"] .activity-card .col-md-4 {
    border-inline-start: none;
    border-inline-end: 1px solid #dee2e6;
}

[dir="rtl"] .speaker-item .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

@media (max-width: 768px) {
    .activity-card .col-md-4 {
        border-top: none !important;  /* This line is different/missing */
        border-top: 1px solid #dee2e6;
    }
    
    .speaker-bio-hover {
        display: none !important;
    }
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary-teal);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-navy);
}

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.cover-image {
    position: relative;
    height: 450px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.cover-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 40px 30px;
    border-radius: 12px;
    backdrop-filter: blur(0px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--primary-navy);
}

.logo {
    height: 50px;
    width: auto;
}

.brand-text h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--primary-navy);
}

.brand-text p {
    font-size: 0.9rem;
    color: var(--primary-teal);
    margin-bottom: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.bio-container {
    position: relative;
}

.bio-text {
    line-height: 1.5;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.bio-text.truncated {
    max-height: calc(1.5em * 8); /* 8 lines */
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
}

.see-more-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-weight: 500;
    text-decoration: underline;
    font-size: 0.9em;
    margin-top: 8px;
}


.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-teal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-teal);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--primary-teal);
    color: var(--white);
    border-color: var(--primary-teal);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-navy);
    transition: all 0.3s ease;
}

/* Main Content */
.main {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-teal) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--secondary-teal);
    color: var(--white);
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-teal);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-navy);
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    color: var(--primary-navy);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Card Styles */
.card {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-teal));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
}

.card h3 {
    color: var(--primary-navy);
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Team Cards */
.team-card {
    text-align: center;
}

.team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    object-fit: cover;
    border: 4px solid var(--secondary-teal);
}

.team-card h3 {
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.team-card .title {
    color: var(--primary-teal);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Project Cards */
.project-card {
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border-radius: 10px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.project-category {
    background: var(--light-gray);
    color: var(--primary-navy);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-link {
    color: var(--primary-teal);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--primary-navy);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--secondary-teal);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--secondary-teal);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--primary-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--secondary-teal);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-brand a {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-list {
    flex-direction: row-reverse;
}

[dir="rtl"] .footer-content {
    text-align: right;
}

[dir="rtl"] .contact-info p {
    flex-direction: row-reverse;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

