/*
Theme Name: TRIUMPH Theme
Theme URI: http://www.triumph.unidu.hr
Author: University of Dubrovnik
Author URI: https://www.unidu.hr
Description: Custom WordPress theme for the TRIUMPH project website. Features header with TRIUMPH logo, project logo, and university logo, footer with NextGeneration EU logo, main menu, and news module.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: triumph-theme
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

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

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background-color: #fff;
    border-bottom: 3px solid #0066cc;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.triumph-logo {
    font-size: 32px;
    font-weight: bold;
    color: #0066cc;
    text-transform: uppercase;
}

.project-logo img,
.university-logo img {
    max-height: 80px;
    width: auto;
}

.university-logo a {
    display: block;
}

/* Navigation Menu */
.main-navigation {
    background-color: #0066cc;
    padding: 0;
}

.nav-container {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.main-navigation a:hover {
    background-color: #0052a3;
    text-decoration: none;
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Shared list styles: generic (.language-switcher) and plugin-specific wrappers */
.language-selector ul,
.language-switcher,
.language-selector--polylang ul,
.language-selector--wpml ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 0;
}

/* Shared link styles */
.language-selector li a,
.language-switcher li a {
    display: block;
    padding: 15px 12px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s, background-color 0.2s;
}

.language-selector li a:hover,
.language-switcher li a:hover {
    color: #fff;
    background-color: #0052a3;
    text-decoration: none;
}

/* Active language */
.language-selector li.current-lang a,
.language-switcher li.current-lang a {
    color: #fff;
    border-bottom: 3px solid #fff;
}

/* Polylang / WPML wrappers reuse the same link styles via .language-selector */
.language-selector--polylang,
.language-selector--wpml {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Main Content */
.site-content {
    min-height: 400px;
    padding: 40px 0;
}

/* News Module */
.news-section {
    margin-bottom: 40px;
}

.news-section h2 {
    font-size: 28px;
    color: #0066cc;
    margin-bottom: 20px;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.news-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.news-item-content {
    padding: 20px;
}

.news-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.news-item .post-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.news-item .excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-item .read-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: #0066cc;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.news-item .read-more:hover {
    background-color: #0052a3;
    text-decoration: none;
}

/* Footer Styles */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-info {
    flex: 1;
}

.footer-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.footer-info p {
    font-size: 14px;
    line-height: 1.8;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nextgen-logo img {
    max-height: 100px;
    width: auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    font-size: 14px;
}

/* Archive Pages */
.page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0066cc;
}

.page-title {
    font-size: 32px;
    color: #0066cc;
    margin-bottom: 10px;
}

.archive-description {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
}

/* Pagination */
.pagination,
.posts-pagination {
    margin: 40px 0;
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-block;
    padding: 10px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.page-numbers:hover,
.page-numbers.current {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
    text-decoration: none;
}

.page-numbers.dots {
    border: none;
    background: none;
}

/* Single Post Styles */
.entry-header {
    margin-bottom: 30px;
}

.entry-title {
    font-size: 36px;
    color: #0066cc;
    margin-bottom: 15px;
    line-height: 1.3;
}

.entry-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.entry-meta .byline {
    margin-left: 15px;
}

.post-thumbnail {
    margin-bottom: 30px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #0066cc;
}

.entry-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.tags-links {
    font-size: 14px;
    color: #666;
}

/* Post Navigation */
.post-navigation {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 2px solid #ddd;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.post-navigation .nav-title {
    font-size: 18px;
    color: #0066cc;
}

/* Page Links */
.page-links {
    margin: 30px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.page-links a {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 5px;
    background: #0066cc;
    color: #fff;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-logos {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        align-items: center;
    }

    .nav-container {
        flex-direction: column;
    }

    .language-selector {
        justify-content: center;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .entry-title {
        font-size: 28px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .post-navigation .nav-links {
        flex-direction: column;
        gap: 20px;
    }
}

/* About Project Template Styles */
.page-about-project .project-summary {
    background: #f9f9f9;
    padding: 30px;
    border-left: 4px solid #0066cc;
    margin-bottom: 30px;
    font-size: 18px;
    line-height: 1.8;
}

.extended-description-link {
    text-align: center;
    margin: 30px 0;
}

.extended-description-link .button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 18px;
}

.extended-description-link .button:hover {
    background-color: #0052a3;
}

.extended-description {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #ddd;
}

.project-images {
    margin-top: 40px;
}

.project-images .project-featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Research Team Template Styles */
.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.team-member {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.team-member-photo {
    width: 100%;
    overflow: hidden;
}

.team-member-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.team-member-info {
    padding: 20px;
}

.team-member-name {
    font-size: 22px;
    color: #0066cc;
    margin-bottom: 15px;
}

.team-member-bio {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.team-member-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.team-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.3s;
}

.team-link:hover {
    background: #e0e0e0;
    text-decoration: none;
}

.team-link .link-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.team-link .dashicons {
    margin-right: 5px;
}

/* Repository Template Styles */
.repository-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.repository-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.repository-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.repository-item-icon {
    font-size: 48px;
    color: #0066cc;
    margin-right: 20px;
}

.repository-item-icon .dashicons {
    width: 48px;
    height: 48px;
    font-size: 48px;
}

.repository-item-content {
    flex: 1;
}

.repository-item-title {
    font-size: 20px;
    color: #0066cc;
    margin-bottom: 10px;
}

.repository-item-date {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.repository-item-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.repository-item-download .button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.repository-item-download .button:hover {
    background-color: #0052a3;
    text-decoration: none;
}

.repository-item-download .dashicons {
    margin-right: 5px;
}

.repository-disclaimer {
    margin-top: 60px;
    padding: 30px;
    background: #f9f9f9;
    border-left: 4px solid #999;
    font-size: 13px;
    line-height: 1.8;
}

.repository-disclaimer hr {
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #ddd;
}

/* Gallery Lightbox Styles */
.post-gallery-lightbox {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #ddd;
}

.post-gallery-lightbox h3 {
    font-size: 24px;
    color: #0066cc;
    margin-bottom: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Button Styles */
.button,
.download-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0066cc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.button:hover,
.download-button:hover {
    background-color: #0052a3;
    text-decoration: none;
}

/* Responsive Updates for New Templates */
@media (max-width: 768px) {
    .team-members-grid,
    .repository-grid {
        grid-template-columns: 1fr;
    }
    
    .repository-item {
        flex-direction: column;
    }
    
    .repository-item-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .gallery-item img {
        height: 150px;
    }
}
