/*
Theme Name: Mediálne Centrum
Theme URI: https://medialnecentrum.sk
Author: Matúš Dráb
Description: Téma pre UNIPO Mediálne Centrum - Rádio, Televízia, Press
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: medialnecentrum
*/

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --background: #ffffff;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --primary: #6366f1;
    --primary-foreground: #ffffff;
    --secondary: #f1f5f9;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --border: #e2e8f0;
    --accent: #8b5cf6;
    --radius: 12px;
    --primary-hover: #4f46e5;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(to bottom, rgba(99, 102, 241, 0.05), transparent);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: white;
}

.logo-image {
    border-radius: var(--radius);
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
}

.logo-subtitle {
    font-size: 1rem;
    color: var(--muted-foreground);
}

/* Tab Navigation */
.tab-navigation {
    border-bottom: 1px solid var(--border);
    background-color: rgba(255, 255, 255, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 0;
}

.tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.tab:hover {
    color: var(--foreground);
    background-color: var(--secondary);
}

.tab.active.tab-radio {
    background: linear-gradient(135deg, #D82329, #E84C4F);
    color: white;
}

.tab.active.tab-telka {
    background: linear-gradient(135deg, #FF4546, #FF6B6C);
    color: white;
}

.tab.active.tab-press {
    background: linear-gradient(135deg, #2980BA, #4FA3D9);
    color: white;
}

.tab-icon {
    width: 1rem;
    height: 1rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.section-header p {
    color: var(--muted-foreground);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.card > a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image-default {
    background: linear-gradient(135deg, #6366f1, #6366f1cc);
}

.card-image-podcast {
    background: linear-gradient(135deg, #D82329, #D82329cc);
}

/* Card video container (16:9 aspect ratio) */
.card-video {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.card-video video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.card-video img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Radio images */
.radio-1 {
    background: linear-gradient(135deg, #D82329, #E84C4F);
}

.radio-2 {
    background: linear-gradient(135deg, #E84C4F, #F07A7D);
}

.radio-3 {
    background: linear-gradient(135deg, #F07A7D, #D82329);
}

/* TV images */
.tv-1 {
    background: linear-gradient(135deg, #FF4546, #FF6B6C);
}

.tv-2 {
    background: linear-gradient(135deg, #FF6B6C, #FF9A9B);
}

.tv-3 {
    background: linear-gradient(135deg, #FF9A9B, #FF4546);
}

/* Press images */
.press-1 {
    background: linear-gradient(135deg, #2980BA, #4FA3D9);
}

.press-2 {
    background: linear-gradient(135deg, #4FA3D9, #7FC4EE);
}

.press-3 {
    background: linear-gradient(135deg, #7FC4EE, #2980BA);
}

.card-content {
    padding: 1.25rem;
}

.card-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    margin-right: 0.25rem;
}

.card-badge.badge-purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.card-badge.badge-green {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.card-content h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.card-text {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.card-text p {
    margin-bottom: 0.5rem;
}

.card-text p:last-child {
    margin-bottom: 0;
}

.card-content a {
    color: var(--primary);
    text-decoration: none;
}

.card-content a:hover {
    text-decoration: underline;
}

.card-content audio {
    width: 100%;
    margin-top: 0.75rem;
    border-radius: 8px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    background-color: #f8fafc;
    padding: 1.5rem 0;
    text-align: center;
}

.footer p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        white-space: nowrap;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .section-header h1 {
        font-size: 1.5rem;
    }
}

/* Members Sections */
.clenovia-sekcia {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.clenovia-sekcia:first-child {
    margin-top: 0;
}

.clenovia-kategoria-nadpis {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--foreground);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

/* Members Grid */
.clenovia-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.clen-item {
    perspective: 1000px;
    text-align: center;
    cursor: default;
}

.clen-item.has-flip {
    cursor: pointer;
}

.clen-card-inner {
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.clen-item.flipped .clen-card-inner {
    transform: rotateY(180deg);
}

.clen-card-front,
.clen-card-back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.clen-card-front {
    position: relative;
}

.clen-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    box-sizing: border-box;
}

.clen-back-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.clen-back-bio {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--muted-foreground);
}

.clen-photo-wrapper {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
}

.clen-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.clen-photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
}

.clen-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--foreground);
}

.clen-name a {
    color: var(--primary);
    text-decoration: none;
}

.clen-name a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .clenovia-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .clenovia-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .clen-photo-wrapper {
        width: 120px;
        height: 120px;
    }
}

/* Video Lightbox */
.video-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.video-lightbox.active {
    display: flex;
}

.video-lightbox-content {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    aspect-ratio: 16 / 9;
}

.video-lightbox-content video {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

#video-lightbox-youtube {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    display: none;
}

.video-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10001;
}

.video-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Video Play Overlay on Cards */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.video-play-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.2s;
}

.video-play-overlay:hover::before {
    background: rgba(0, 0, 0, 0.4);
}

.video-play-overlay svg {
    width: 3.5rem;
    height: 3.5rem;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    position: relative;
    z-index: 1;
    transition: transform 0.2s;
}

.video-play-overlay:hover svg {
    transform: scale(1.1);
}

/* Video Card Actions (share/download) */
.video-card-actions {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.35rem;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s;
}

.card-video:hover .video-card-actions {
    opacity: 1;
}

.video-card-actions button,
.video-card-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.video-card-actions button:hover,
.video-card-actions a:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--foreground);
    transform: scale(1.1);
}

.video-card-actions svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

/* Podcast Card Share Action */
.podcast-share-actions {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s;
}
.card-image:hover .podcast-share-actions { opacity: 1; }
.podcast-share-actions button {
    display: flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; padding: 0;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
    border: none; border-radius: 50%; color: white;
    cursor: pointer; transition: all 0.2s;
}
.podcast-share-actions button:hover {
    background: rgba(255,255,255,0.9); color: var(--foreground); transform: scale(1.1);
}
.podcast-share-actions svg { width: 0.875rem; height: 0.875rem; flex-shrink: 0; }

/* Main Nav (optional) */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-nav ul li a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: #6366f1;
}

/* Load More Button */
.load-more-container {
    margin-top: 2rem;
    text-align: center;
}

.load-more-container .btn {
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.load-more-container button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.load-more-container button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Content filter (video & podcast) */
.content-filter {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Video filter tabs */
.video-filter .tab {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border);
}
.video-filter .tab:hover,
.video-filter .tab.active {
    background: var(--primary);
    color: white;
}

/* Pagination */
.pagination .page-numbers {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    text-decoration: none;
    border: 1px solid var(--border);
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--primary);
    color: white;
}

/* No content message */
.no-content {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--muted-foreground);
}

/* Page content */
.page-content {
    margin-bottom: 2rem;
}

/* Single post common styles */
.single-media-block {
    margin-bottom: 2rem;
}

.single-content {
    color: var(--muted-foreground);
    line-height: 1.8;
}

.single-navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.single-navigation .tab {
    display: inline-flex;
}

.single-video video {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius);
}

.single-post-thumbnail {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.single-podcast audio {
    width: 100%;
}

.podcast-embed {
    margin-top: 0.75rem;
}

/* Podcast filter tabs */
.podcast-filter .tab {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border);
}
.podcast-filter .tab:hover,
.podcast-filter .tab.active {
    background: var(--primary);
    color: white;
}

/* Text Block Cards */
.card.card-text-block {
    grid-column: 1 / -1;
    background: transparent;
    border: none;
    box-shadow: none;
}

.card.card-text-block:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.card-text-block-content {
    padding: 1.5rem 0;
    line-height: 1.8;
    color: var(--foreground);
    font-size: 0.95rem;
}

.card-text-block-content p {
    margin-bottom: 0.75rem;
    color: var(--muted-foreground);
}

.card-text-block-content p:last-child {
    margin-bottom: 0;
}

.card-text-block-content a {
    color: var(--primary);
    text-decoration: none;
}

.card-text-block-content a:hover {
    text-decoration: underline;
}

.card-text-block-content h2,
.card-text-block-content h3,
.card-text-block-content h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

/* Text blocks in video/podcast sections */
.videos-section .card-text-block,
.podcasts-section .card-text-block {
    margin-top: 1.5rem;
}

/* Section-level text blocks */
.section-text-block {
    padding: 1.5rem 0;
    line-height: 1.8;
    color: var(--foreground);
    font-size: 0.95rem;
}

.section-text-block p {
    margin-bottom: 0.75rem;
    color: var(--muted-foreground);
}

.section-text-block p:last-child {
    margin-bottom: 0;
}

.section-text-block a {
    color: var(--primary);
    text-decoration: none;
}

.section-text-block a:hover {
    text-decoration: underline;
}

.section-text-block h2,
.section-text-block h3,
.section-text-block h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}