/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #791913;
    --secondary-color: #D7A74E;
    --text-color: #333;
    --bg-color: #fff;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding-top: 80px; /* Account for fixed navbar */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Slab', serif;
    font-weight: 500;
    color: var(--primary-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-description {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    margin-bottom: 3rem;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.2) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-location {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-location i {
    margin-right: 0.5rem;
}

.hero-buttons {
    display: flex !important;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: center;
    text-align: center;
    margin: 0 auto;
    width: fit-content;
}

.hero-image img {
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #c0953e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(215, 167, 78, 0.4);
    color: white;
}

.btn-compact-dark {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 700;
}

.btn-compact-dark:hover {
    background: #5a1210;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(121, 25, 19, 0.4);
}

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

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

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

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

/* Sections */
.section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

/* Research Cards */
.research-card {
    background: white;
    border-radius: 0;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    text-align: center;
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.research-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.research-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.research-card p {
    color: #666;
    line-height: 1.6;
}

/* Person Card */
.person-card {
    background: white;
    border-radius: 0;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.person-image {
    margin-bottom: 1.5rem;
}

.person-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.person-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin-top: 1rem;
    overflow-x: auto;
    padding: 0 0.5rem;
}


.person-links .btn {
    width: 25px;
    height: 25px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    background: rgba(255, 255, 255, 0.8);
}

.person-links .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.person-links .btn i {
    font-size: 0.7rem;
    margin: 0;
    color: #666;
}

.person-links .btn:hover i {
    color: var(--primary-color);
}

.person-links .btn svg {
    width: 10px;
    height: 10px;
}

.person-links .btn:hover svg {
    color: var(--primary-color);
}

.person-title {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.person-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}


/* Join Cards */
.join-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.join-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.join-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.join-card h5 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.join-card p {
    color: #666;
    line-height: 1.6;
}

/* News */
.news-item {
    background: white;
    border-radius: 0;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.news-date {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-item h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.news-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Contact */
.contact-info {
    background: white;
    border-radius: 0;
    padding: 2rem;
    box-shadow: var(--shadow);
    height: 100%;
}

.contact-info h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.social-link:hover {
    background: var(--secondary-color);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
    color: white;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Publications Page Styles */
.publications-page .hero::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* News Page Styles */
.news-page .hero::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Join Page Styles */
.join-page .hero::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Teaching Page Styles */
.teaching-page .hero::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.course-item {
    transition: all 0.3s ease;
}

.course-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Course Page Styles */
.course-page .hero::before {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.course-calendar table {
    width: 100%;
    border-collapse: collapse;
}

.course-calendar th,
.course-calendar td {
    text-align: left;
    vertical-align: top;
}

.course-calendar tbody tr:hover {
    background-color: #f8f9fa;
}

.course-navbar {
    margin-top: 0;
}

.course-navbar .nav-pills {
    gap: 1rem;
}

.course-navbar .nav-link {
    color: #555;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.course-navbar .nav-link:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

.course-navbar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.join-section {
    margin-bottom: 3rem;
}

.join-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    text-align: left;
}

.join-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.join-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.join-icon i {
    font-size: 3rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.join-card h3 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: left;
}

.join-subsection {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.join-subsection:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.join-subsection h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: left;
    font-size: 1.3rem;
}

.join-citation {
    background: #f8f9fa;
    border-left: 3px solid #6c757d;
    padding: 0.75rem 1rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
}

.join-citation p {
    margin: 0;
    color: #666;
}

.join-description {
    font-size: 1.1rem;
    color: #555;
    text-align: left;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.join-process, .join-requirements {
    margin: 2rem 0;
    text-align: left;
}

.join-process h5, .join-requirements h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.join-process ol, .join-requirements ul {
    padding-left: 1.5rem;
    text-align: left;
}

.join-process li, .join-requirements li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    color: #555;
}

.join-links {
    text-align: left;
    margin: 2rem 0;
}

.join-notes {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin-top: 2rem;
    border-radius: 0 8px 8px 0;
}

.join-notes p {
    margin: 0;
    color: #666;
    font-style: italic;
}

.join-notes strong {
    color: var(--primary-color);
}

.join-mission {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-color);
}

.join-mission h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.join-mission p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.join-mission p:last-child {
    margin-bottom: 0;
}

.faq-section {
    margin-top: 2rem;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.join-navbar {
    margin-top: 0;
}

.join-navbar .nav-pills {
    gap: 1rem;
}

.join-navbar .nav-link {
    color: #555;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.join-navbar .nav-link:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

.join-navbar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.join-section {
    scroll-margin-top: 100px;
}

.faq-item h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.faq-item a {
    color: #0066cc;
    text-decoration: none;
}

.faq-item a:hover {
    text-decoration: underline;
    color: #0052a3;
}

.faq-citation {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.faq-citation p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.faq-citation a {
    color: #0066cc;
    text-decoration: none;
}

.faq-citation a:hover {
    text-decoration: underline;
    color: #0052a3;
}

/* Consistent link styling for Join Us page */
.join-page .join-card a:not(.btn),
.join-page .join-section a:not(.btn),
.join-page .join-description a:not(.btn),
.join-page .join-process a:not(.btn),
.join-page .join-requirements a:not(.btn),
.join-page .join-mission a:not(.btn),
.join-page .join-subsection a:not(.btn) {
    color: #0066cc;
    text-decoration: none;
}

.join-page .join-card a:not(.btn):hover,
.join-page .join-section a:not(.btn):hover,
.join-page .join-description a:not(.btn):hover,
.join-page .join-process a:not(.btn):hover,
.join-page .join-requirements a:not(.btn):hover,
.join-page .join-mission a:not(.btn):hover,
.join-page .join-subsection a:not(.btn):hover {
    text-decoration: underline;
    color: #0052a3;
}

/* News Styles */
.news-item-compact {
    background: white;
    border-radius: 0;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-item-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.news-header {
    margin-bottom: 0.75rem;
}

.news-date {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.3;
}

.news-summary {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.news-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.news-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.news-link::after {
    content: '→';
    transition: transform 0.2s ease;
}

.news-link:hover::after {
    transform: translateX(2px);
}

.publication-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.publication-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.publication-authors {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.3;
    color: #666;
}

.publication-venue {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.3;
    color: #666;
    font-style: italic;
}

.publication-buttons {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.publication-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.publication-button:hover {
    background: var(--secondary-color);
}

.publication-button.active {
    background: var(--secondary-color);
}

.publication-content {
    display: none;
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: var(--light-bg);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.publication-content.show {
    display: block;
}

.publication-abstract {
    line-height: 1.4;
    font-size: 0.85rem;
}

.publication-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.4rem 0.8rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background 0.3s ease;
    white-space: nowrap;
    height: 32px;
}

.publication-link:hover {
    background: var(--secondary-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .person-links {
        gap: 0.3rem;
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0;
    }
    
    .person-links .btn {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }
    
    .person-links .btn i {
        font-size: 0.6rem;
    }
    
    .person-links .btn svg {
        width: 9px;
        height: 9px;
    }
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .research-card,
    .person-card,
    .join-card,
    .contact-info,
    .news-item {
        padding: 1.5rem;
    }
}