/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Discipline cards are informational (not clickable) in M2b. */
/* No hover-lift — transform and shadow removed so the card doesn't invite a click. */

/* About year badge positioning */
.about-year-badge {
    bottom: -20px;
    right: -20px;
}
@media (max-width: 768px) {
    .about-year-badge {
        position: static !important;
        margin-top: 16px;
    }
}

/* Button hover effects */
.gb-button {
    transition: all 0.3s ease;
}
.gb-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212,168,83,0.3);
}

/* Font families */
h1, h2, h3, .hero-title {
    font-family: 'Playfair Display', serif;
}

/* Footer link lists — drop browser-default bullets */
.gb-container-footer-section .footer-links,
.gb-container-footer-section .wp-block-list {
    list-style: none !important;
    padding-left: 0;
    margin-left: 0;
}
.gb-container-footer-section .footer-links li {
    list-style: none;
}
.gb-container-footer-section .footer-links li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}
.gb-container-footer-section .footer-links li a:hover {
    color: var(--accent);
}

/* CTA-style nav menu item — matches the hero PRIJAVA V PORTAL button (no arrow icon). */
.main-navigation .menu-item.menu-cta {
    display: flex;
    align-items: center;
}
.main-navigation .menu-item.menu-cta > a {
    background-color: var(--accent);
    color: var(--primary-dark) !important;
    border-radius: 4px;
    padding: 10px 26px !important;
    margin-left: 12px;
    font-weight: 700 !important;
    letter-spacing: 1px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    height: auto;
    transition: all 0.25s ease;
}
.main-navigation .menu-item.menu-cta > a:hover,
.main-navigation .menu-item.menu-cta > a:focus {
    background-color: var(--accent);
    color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(212, 168, 83, 0.3);
}
@media (max-width: 768px) {
    /* In the off-canvas mobile menu, drop the button styling and follow native flow */
    .main-navigation .menu-item.menu-cta {
        display: block;
    }
    .main-navigation .menu-item.menu-cta > a {
        background-color: transparent;
        color: inherit !important;
        padding: 0 20px !important;
        margin-left: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

/* ============================================================
   Homepage news cards (#novice section)
   Mirrors the discipline-card aesthetic: white bg, soft border,
   rounded corners, shadow, image-on-top, hover lift.
   ============================================================ */
.news-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.news-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee8df;
    box-shadow: 0 4px 16px rgba(61, 79, 95, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(61, 79, 95, 0.15);
}
.news-card .wp-block-post-featured-image {
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #3d4f5f 0%, #d4a853 100%);
    height: 200px;
    position: relative;
}
.news-card .wp-block-post-featured-image a {
    display: block;
    width: 100%;
    height: 100%;
}
.news-card .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.news-card:hover .wp-block-post-featured-image img {
    transform: scale(1.04);
}
.news-card .gb-container-news-card-body {
    flex: 1;
    min-height: 180px;
}
.news-card .wp-block-post-date {
    color: var(--accent) !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.news-card .wp-block-post-title {
    margin: 0 !important;
}
.news-card .wp-block-post-title a {
    color: var(--primary) !important;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    transition: color 0.2s ease;
}
.news-card .wp-block-post-title a:hover {
    color: var(--accent) !important;
}
.news-card .wp-block-post-excerpt {
    margin: 0 !important;
    color: var(--text-light) !important;
}
.news-card .wp-block-post-excerpt p {
    margin: 0;
    line-height: 1.6;
}
.news-card .wp-block-read-more {
    margin-top: auto !important;
    color: var(--accent) !important;
    text-decoration: none;
    font-weight: 700;
    align-self: flex-start;
    transition: gap 0.2s ease;
}
.news-card .wp-block-read-more:hover {
    text-decoration: underline;
}

/* ============================================================
   Single-post hero header + centered article body
   Hero = featured image as bg, dark gradient overlay, title + meta centered.
   Body = no sidebar, max-width 760px, larger type.
   ============================================================ */

/* Hero */
.sdr-post-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    height: 440px;
    background-color: var(--primary-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-bottom: 56px;
}
.sdr-post-hero.no-image {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}
.sdr-post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(42,54,64,0.78) 100%);
    pointer-events: none;
}
.sdr-post-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 920px;
    padding: 48px 24px;
}
.sdr-post-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}
.sdr-post-hero-meta a {
    color: var(--accent) !important;
    text-decoration: none;
}
.sdr-post-hero-meta a:hover {
    text-decoration: underline;
}
.sdr-post-hero-sep {
    opacity: 0.5;
    color: #ffffff;
}
.sdr-post-hero-date {
    color: rgba(255,255,255,0.92);
}
.sdr-post-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 18px rgba(0,0,0,0.4);
}
@media (max-width: 900px) {
    .sdr-post-hero { height: auto; min-height: 360px; }
    .sdr-post-hero-title { font-size: 36px; }
}
@media (max-width: 600px) {
    .sdr-post-hero { min-height: 300px; }
    .sdr-post-hero-inner { padding: 40px 20px; }
    .sdr-post-hero-title { font-size: 28px; }
    .sdr-post-hero-meta { font-size: 11px; letter-spacing: 1.5px; }
}

/* Close the 20px gap GeneratePress puts above the main content on single posts */
body.single-post #main {
    margin-top: 0 !important;
}
/* Hero sits flush under the header — opt-out of any inherited padding too */
body.single-post .sdr-post-hero {
    margin-top: 0;
}

/* Article body. Outer container matches the site content width so the
   article column is flush with hero / other sections; prose paragraphs and
   headings stay narrow (720px) for readability, but images and galleries
   are allowed to breathe wider. */
body.single-post #primary,
body.single-post .content-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto;
}
body.single-post .inside-article {
    max-width: 100%;
    padding: 0 40px;
}
body.single-post .entry-content {
    max-width: 100%;
    padding: 0;
}
body.single-post .entry-content > * {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
body.single-post .entry-content > .wp-block-image,
body.single-post .entry-content > .wp-block-gallery {
    max-width: 960px;
}
body.single-post .entry-content > .wp-block-file {
    max-width: 720px;
}
@media (max-width: 640px) {
    body.single-post .inside-article { padding: 0 20px; }
}
body.single-post .entry-content h2,
body.single-post .entry-content h3,
body.single-post .entry-content h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    margin-top: 48px;
    margin-bottom: 16px;
    line-height: 1.3;
}
body.single-post .entry-content h2 { font-size: 30px; }
body.single-post .entry-content h3 { font-size: 24px; }
body.single-post .entry-content h4 { font-size: 20px; }
body.single-post .entry-content p,
body.single-post .entry-content li {
    font-size: 17px;
    line-height: 1.75;
    color: #2c2c2c;
}
body.single-post .entry-content p {
    margin-bottom: 20px;
}
body.single-post .entry-content ul,
body.single-post .entry-content ol {
    margin-bottom: 24px;
    padding-left: 22px;
}
body.single-post .entry-content li {
    margin-bottom: 8px;
}
body.single-post .entry-content .wp-block-image {
    text-align: center;
    margin: 40px auto;
}
body.single-post .entry-content .wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
body.single-post .entry-content .wp-block-image img:hover {
    transform: scale(1.01);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
body.single-post .entry-content .wp-block-file {
    background: #ffffff;
    border: 1px solid #eee8df;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 40px auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
body.single-post .entry-content .wp-block-file__button {
    background-color: var(--accent) !important;
    color: var(--primary-dark) !important;
    border-radius: 4px;
    padding: 10px 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    margin-left: 16px;
}
body.single-post .entry-content .wp-block-separator {
    max-width: 200px;
    margin: 56px auto;
    border-top: 1px solid #eee8df;
}

/* Footer nav under article */
.sdr-post-footer-nav {
    max-width: 760px;
    margin: 64px auto 80px;
    padding: 32px 24px 0;
    border-top: 1px solid #eee8df;
    text-align: center;
}
.sdr-post-back-link {
    color: var(--primary) !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: color 0.2s ease, gap 0.2s ease;
}
.sdr-post-back-link:hover {
    color: var(--accent) !important;
}

/* GLightbox visual tweaks */
.glightbox-clean .gslide-description { font-family: inherit; }
.gprev, .gnext, .gclose { color: #fff !important; }
.gslide-image img { border-radius: 8px; }

/* Hint to homepage gallery thumbnails that clicking opens a lightbox */
section#galerija .wp-block-gallery img,
.gb-container-galerija-section img {
    cursor: zoom-in;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
section#galerija .wp-block-gallery img:hover,
.gb-container-galerija-section img:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

/* ============================================================
   Members portal: when sdr-portal-active body class is present,
   hide site chrome so the dashboard sidebar takes the viewport.
   ============================================================ */
body.sdr-portal-active .site-header,
body.sdr-portal-active #masthead,
body.sdr-portal-active .site-footer,
body.sdr-portal-active footer.gb-container-footer-section,
body.sdr-portal-active footer.site-info,
body.sdr-portal-active .footer-widgets {
    display: none !important;
}
body.sdr-portal-active #main,
body.sdr-portal-active .site-content,
body.sdr-portal-active #page {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}
body.sdr-portal-active .inside-article,
body.sdr-portal-active .entry-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
}

/* Sidebar logo image (replacement for the 🎯 + "SD Radovljica" text) */
.sdr-sidebar-header .sdr-sidebar-logo-link {
    display: block;
    text-align: center;
    margin-bottom: 8px;
}
.sdr-sidebar-header .sdr-sidebar-logo-img {
    max-width: 150px;
    height: auto;
    margin: 0 auto;
    display: block;
    background: #ffffff;
    padding: 8px;
    border-radius: 8px;
}

/* Admin members table inside the portal */
.sdr-portal-admin-members {
    padding: 32px;
    max-width: 100%;
}
.sdr-portal-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.sdr-portal-page-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: var(--primary);
    margin: 0;
}
.sdr-portal-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #eee8df;
}
.sdr-portal-filters select,
.sdr-portal-filters input[type="search"] {
    padding: 8px 12px;
    border: 1px solid #d4d0c8;
    border-radius: 4px;
    font-size: 14px;
}
.sdr-portal-filters input[type="search"] {
    flex: 1;
    min-width: 200px;
}
.sdr-portal-summary {
    margin: 8px 0 16px;
    color: var(--text-light);
    font-size: 14px;
}
.sdr-portal-members-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(61,79,95,0.06);
}
.sdr-portal-members-table th,
.sdr-portal-members-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee8df;
}
.sdr-portal-members-table th {
    background: #f7f3ec;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}
.sdr-portal-members-table tbody tr:hover {
    background: #faf6ee;
}
.sdr-portal-members-table tbody tr:last-child td {
    border-bottom: none;
}
.sdr-portal-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-light);
}
