/*
 * Theme Name: FBC Partille - Tema
 * Theme URI: https://www.pibs.se
 * Description: A brave, black-clad child theme for FBC Partille, built on the Frost theme, reflecting a premium, transparent, and inclusive brand.
 * Author: FBC Partille
 * Author URI: https://www.pibs.se
 * Template: frost
 * Version: 1.0.6
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: frost-pibs-child
 */

/* ===============================================
 * 1. GLOBAL STYLES
 * =============================================== */

body {
    background-image:
        url('assets/svg/path220_red.svg'),
        url('assets/svg/path19_red.svg'),
        url('assets/svg/path488_red.svg'),
        url('assets/svg/path85_red.svg'),
        url('assets/svg/path5_red.svg');
    /* Prevent repeating */
    background-repeat: no-repeat;

    /* Position the strokes */
    background-position:
        left -150px top 8%, 
        left -200px top 35%, 
        left -150px top 60%,
        right -150px top 20%, 
        right -200px top 50%; 

    /* Set the size of each stroke */
    background-size:
        200px,
        250px,
        200px,
        200px,
        250px;
    
    /* Make sure the background is not fixed */
    background-attachment: scroll;
  }

  @media (max-width: 782px) {
  body {

    background-position:
        left -80px top 8%, 
        left -130px top 35%, 
        left -80px top 60%,
        right -80px top 20%, 
        right -130px top 50%; 

    background-size:
        100px,
        150px,
        100px,
        100px,
        150px;
  }
}

:root {
  --header-height: 65px; /* Adjust this to your header's true height */
  --wp--custom--font-weight--medium: 600;
}

:where(figure) {
  margin-bottom: var(--wp--preset--spacing--x-small);
}

article h2, h3, h4 {
  padding-bottom: var(--wp--preset--spacing--x-small);
}

article h1 {
  padding-bottom: var(--wp--preset--spacing--small);
}

.wp-block-post-featured-image a {
  display: block !important;
}

.wp-block-cover h1, .team-previous-match h2, .team-next-match h2, 
.pibs-calendar-wrapper h2, .site-footer h3, .site-footer h4, 
.pibs-tab-content h2, .pibs-roster-container h2,
.start-grid-container h4, h2.news-list-title, .news-header-group h2, .news-header-group h1,
.pibs-roster-container h3, .pibs-roster-container p, .more-news h4, .team-news-query h4
{
  padding-bottom: 0px !important;
}

.more-news h4, .team-news-query h4, .start-grid-container h4
{
  margin-bottom: var(--wp--preset--spacing--x-small) !important;
}

.wp-block-post-excerpt
{
  margin: 0px !important;
}

.dashicons {
  color: var(--wp--preset--color--pibs-blue);
  font-size: 1.5rem;
  text-decoration: none;
}

.dashicons:hover {
  color: var(--wp--preset--color--pibs-black);
}

.wp-block-post-terms__separator {
  display: none;
}


/* ===============================================
 * 2. LINKS
 * =============================================== */

main a, .entry-content a, .start-grid-container a, .desktop-submenu-panel a, .sibling-nav-container a {
  position: relative; /* Keep this to ensure the after element is positioned correctly */
  text-decoration: none;
  color: inherit;
  color: var(--wp--preset--color--pibs-blue);
  display: inline-block;
}

main a:hover, .entry-content a:hover, .start-grid-container a:hover, .desktop-submenu-panel a:hover, .sibling-nav-container a:hover {
  text-decoration: none;
  color: var(--wp--preset--color--pibs-blue);
}


/* Default state for all links within the <main> content area */
main a::after, .entry-content a::after, .custom-footer-menu .wp-block-navigation-item a::after, .start-grid-container a::after, .desktop-submenu-panel a::after, .sibling-nav-container a::after, .pibs-tab-item::after {
  content: '';
  position: absolute;
  display: inline-block; 
  bottom: 0;
  left: 0;
  width: 100%; /* Set to full width */
  height: 3px;
  background-image: url('assets/svg/pen-brush-red.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  
  transform-origin: left; /* Animation starts from the left */
  transform: scaleX(0); /* Hide initially */
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

main a:hover::after, .entry-content a:hover::after, .custom-footer-menu .wp-block-navigation-item a:hover::after, .start-grid-container a:hover::after, .desktop-submenu-panel a:hover::after, .sibling-nav-container a:hover::after, .pibs-tab-item:hover::after {
  transform: scaleX(1); /* Show on hover */
}

.wp-block-button__link {
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

/* The links themselves */
.sibling-nav-container a {
  color: var(--wp--preset--color--pibs-black);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
}

.sibling-nav-container a:hover {
  color: var(--wp--preset--color--pibs-black);
}

.sibling-nav-container .current-menu-item > a::after {
  transform: scaleX(1);
}

.desktop-submenu-panel a {
  display: inline-block;
  padding: 0rem 0;
  text-decoration: none;
  color: var(--wp--preset--color--pibs-black);
  white-space: nowrap;
}

.desktop-submenu-panel a:hover {
  color: var(--wp--preset--color--pibs-black);
}

.pibs-tab-item {
    /* Nollställ knapp-stilar */
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    color: var(--wp--preset--color--pibs-blue);
    display: inline-block;
    text-decoration: none;
    position: relative; /* Keep this to ensure the after element is positioned correctly */
}
.pibs-tab-item:hover {
    color: var(--wp--preset--color--pibs-blue);
}

.pibs-tab-item.is-active {
    color: var(--wp--preset--color--pibs-black);
}

.pibs-tab-item.is-active::after {
    transform: scaleX(1);
}

.wp-block-button a {
  color: var(--wp--preset--color--pibs-white);
  text-decoration: none;
  background-color: var(--wp--preset--color--pibs-blue);
}

.wp-block-button a:hover {
  color: var(--wp--preset--color--pibs-white);
  text-decoration: none;
  background-color: var(--wp--preset--color--pibs-black);
}

/* Default state for all links within the <main> content area */
h1 a, h2 a, h3 a, h4 a {
  color: var(--wp--preset--color--pibs-black) !important;
  text-decoration: none !important;
}

/* This rule targets all links inside a headline and turns off the effect. */
figure a::after,
h1 a::after,
h2 a::after,
h3 a::after,
h4 a::after,
.pibs-roster-container a::after,
.pibs-calendar-wrapper a::after,
.wp-block-button a::after,
.taxonomy-category a::after,
.all-news-button-container a::after,
a:has(.dashicons)::after,
main.solidsport-video-gallery a::after,
.main-hero .hero-read-more::after
{
    transform: scaleX(0) !important;; /* Hide the brush stroke */
    height: 0px !important; /* Remove the height to avoid any spacing issues */
    display: none !important; /* Ensure it doesn't take up space */
}


@media (max-width: 720px) {

  .wp-block-post-excerpt__more-link {
  display: block !important;
  background-color: var(--wp--preset--color--pibs-blue);
  color: var(--wp--preset--color--pibs-white) !important; /* Use !important to override default link colors */
  padding: 1em 1em;
  border-radius: 5px;
  text-decoration: none;
  line-height: 1;
  transition: background-color 0.2s ease-in-out;
  margin-bottom: var(--wp--preset--spacing--x-small);
  text-align: center;
  margin-top: var(--wp--preset--spacing--x-small);
}

/* Add a subtle hover effect */
.wp-block-post-excerpt__more-link:hover {
  background-color: var(--wp--preset--color--pibs-black);
  color: var(--wp--preset--color--pibs-white);
  text-decoration: none;
}
  .wp-block-post-excerpt__more-link:hover::after {
  transform: scaleX(0) !important;
}
}


/* ===============================================
 * 2. DESKTOP HEADER & NAVIGATION
 * =============================================== */

/* --- Main Header Container --- */
.site-header {
  padding: 10px 15px;
  position: sticky;
  top: 0;
  z-index: 990;
  background-color: var(--wp--preset--color--pibs-black);
  color: var(--wp--preset--color--pibs-white);
}

/* --- Desktop Navigation Spacing & Links --- */
.site-header .hide-on-mobile .wp-block-navigation-item:not(:last-child) {
  margin-right: 2rem;
}

header.site-header {
  padding: 0px 0px;
}




/* ===============================================
 * 3. MOBILE MENU SYSTEM
 * =============================================== */

.mobile-menu-trigger {
   cursor: pointer;
   padding-bottom: 0px;
}

/* --- Panel Container --- */
.custom-mobile-menu-panel {
  background-color: var(--wp--preset--color--pibs-grey);
  color: var(--wp--preset--color--pibs-black);
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90%;
  height: 100vh;
  z-index: 10000;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.custom-mobile-menu-inner, .custom-mobile-menu-nav {
  padding-inline-start: 0;
  padding: 0rem 1.5rem;
  padding-bottom: var(--wp--preset--spacing--large);
}

/* --- reset lists --- */
.custom-mobile-menu-header ul,li {
  margin:0;
   padding: 0;
   text-indent: 0;
   list-style-type: none;
   padding-inline-start: 0;
   margin-block-end: 0;
   margin-block-start: 0;
}

ul.sub-menu, .mobile-menu-nav-list {
   padding: 0;
   padding-inline-start: 0;
   margin-block-end: 0;
   margin-block-start: 0;
}

/* --- Panel Header (Logo, Close Button, Separator) --- */
.custom-mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
}
.custom-mobile-menu-logo .custom-logo {
  max-height: 60px !important;
  width: auto !important;
}
.custom-mobile-menu-close {
  background: none;
  border: none;
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  color: var(--wp--preset--color--pibs-blue);
}

.custom-mobile-menu-close:hover {
  color: var(--wp--preset--color--pibs-black);
}

/* --- "Open" State for Panel and Overlay --- */
body.custom-mobile-menu-is-open .custom-mobile-menu-panel {
  transform: translateX(0);
  box-shadow: -5px 0 25px rgba(0,0,0,0.2);
}
body.custom-mobile-menu-is-open::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 9999;
}

.mobile-menu-nav-list > .menu-item {
  border-bottom: 1px solid #e0e0e0;
}

/* --- Link Styling --- */
.mobile-menu-nav-list a,
.mobile-menu-nav-list .submenu-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0;
  color: var(--wp--preset--color--pibs-black);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 500;
}
.mobile-menu-nav-list a:hover {
  text-decoration: none;
}

/* --- Accordion Submenu Styling --- */
.menu-item-has-children {
  position: relative;
}
.menu-item-has-children > a {
  width: 100%;
}
.submenu-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 54px; 
  background: none !important;
  border: none !important;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.submenu-toggle::before {
  content: '';
  position: absolute;
  right: 15px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  transform: rotate(45deg); /* Removed translateY */
  transition: transform 0.2s ease-in-out;
}
.menu-item.is-open > .submenu-toggle::before {
  transform: rotate(225deg); /* Removed translateY */
}

/* --- Submenu Visibility & Styling --- */
.sub-menu {
  display: none;
}
.menu-item.is-open > .sub-menu {
  display: block;
}
.sub-menu li a {
  font-size: 1.2rem;
  color: #555555;
  padding: 0.1rem 0px;
  margin: 0px;
}
.sub-menu .menu-item:first-child > a {
    padding-top: 0px;
}
.sub-menu .menu-item:last-child > a {
    padding-bottom: 0.5rem;
}




/* ===============================================
 * 4. RESPONSIVE VISIBILITY
 * =============================================== */

/* --- Default (Desktop) View --- */
.hide-on-mobile {
  display: flex !important;
}
.hide-on-desktop {
  display: none !important;
}
.custom-footer {
  display: block;
}
.mobile-footer {
  display: none;
}


/* --- Header Breakpoint @ 782px --- */
/* On screens 782px or less, swap the desktop nav for the mobile hamburger trigger */
@media (max-width: 782px) {
  .hide-on-mobile {
    display: none !important;
  }
  .hide-on-desktop {
    display: block !important;
  }
}

/* --- Footer Breakpoint @ 481px --- */
/* On screens 481px or less, swap the desktop footer for the mobile accordion footer */
@media (max-width: 481px) {
  .custom-footer {
    display: none !important;
  }
  .mobile-footer {
    display: block !important;
  }
}

/*
* ===============================================
* 5. Desktop Menu Animated Hover (Corrected)
* ===============================================
*/

.pibs-main-menu {
  margin-left: -5px !important;
}

/* --- Make each menu item a positioning container --- */
.pibs-main-menu .wp-block-navigation-item {
  position: relative;
}

/* --- Add padding to the items inside for spacing --- */
.pibs-main-menu .wp-block-navigation-item a,
.pibs-main-menu .wp-block-navigation-item .wp-block-navigation-submenu__toggle {
  text-decoration: none;
}

.pibs-main-menu .wp-block-navigation-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%; /* Set to full width */
  height: 3px;
  background-image: url('assets/svg/pen-brush-red.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  
  transform-origin: left; /* Animation starts from the left */
  transform: scaleX(0); /* Hide initially */
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.pibs-main-menu .wp-block-navigation-item:hover::after {
  transform: scaleX(1); /* Show on hover */
}

/* --- Fix for the dropdown arrow alignment (from previous step) --- */
.pibs-main-menu .wp-block-navigation-item.has-child {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}


.pibs-main-menu .wp-block-navigation__submenu-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 0.25em;
    padding: 0;

    /* Base64-enkodad version av din SVG-pil med vit färg */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M1.5 4L6 8L10.5 4' stroke-width='1.5' stroke='white'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* --- FINAL Custom Desktop Dropdown / Mega Menu --- */
.pibs-main-menu .has-custom-submenu {
  position: relative;
}

.desktop-submenu-toggle {
  cursor: pointer;
}

.desktop-submenu-panel {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 1.5rem;
  margin-top: 5px;
  background-color: var(--wp--preset--color--pibs-grey);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  z-index: 1000;
  min-width: 240px;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.desktop-submenu-panel li {
  margin-bottom: 0.5rem;
}

.desktop-submenu-panel.is-active {
  display: block !important;
  opacity: 1;
  visibility: visible;
}

.desktop-submenu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* EN kolumn */
.desktop-submenu-panel.single-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* TVÅ kolumner med rubriker & linje mellan */
.desktop-submenu-panel.two-columns-with-line {
  display: flex !important; /* överstyr grid */
  flex-direction: row;
  justify-content: space-between;
  gap: 2rem;
  min-width: 480px; /* lite bredare för två kolumner */
  border-top: 1px solid #ccc; /* linje mellan menyknappen och dropdownen */
  padding-top: 1rem;
}

.desktop-submenu-panel.two-columns-with-line .submenu-column {
  flex: 1;
}

.desktop-submenu-panel.two-columns-with-line h4 {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  border-bottom: 1px solid #ccc; /* liten linje under rubriken */
  padding-bottom: 0.25rem;
  color: var(--wp--preset--color--pibs-black);
}

.desktop-submenu-panel.two-columns-with-line ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
/*
* ===============================================
* 5. FOOTER STYLES
* ===============================================
*/

/* --- Main Footer Container --- */
.custom-footer {
  background-color: var(--wp--preset--color--pibs-grey);
  color: var(--wp--preset--color--pibs-black);
  padding: 2rem 1.5rem;
  padding-bottom: 1rem;
}

/* --- Three-Column Section --- */
.custom-footer-menu.wp-block-columns {
  /* This centers the group of columns */
  justify-content: center;
  /* This sets the space between the columns */
  gap: 4rem; 
}

/* THE FIX: Forcefully tells each column NOT to grow or shrink, and size based on its content */
.custom-footer .custom-footer-menu > .wp-block-column {
  flex: none; 
}

/* These rules keep the text inside the columns left-aligned */
.custom-footer-menu .wp-block-column {
  text-align: left;
}
.custom-footer-menu .wp-block-column .wp-block-navigation {
  align-items: flex-start;
}

/* Link styling (no change) */
.custom-footer-menu .wp-block-navigation-item a {
  color: var(--wp--preset--color--pibs-black);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0 0;
  display: inline-block; /* Ensures padding works correctly */
}

.custom-footer-menu .wp-block-navigation-item {
  margin: 0.15rem 0;
}

/* --- Social Icons --- */
.custom-footer .wp-block-social-links {
  /* Add some space above and below the icons */
  margin-top: 3rem;
  margin-bottom: 2rem;
}

/* --- Bottom Menu (Legal Links, etc.) --- */
.custom-footer > .wp-block-navigation {
  /* Adds space above the bottom menu */
  margin-top: 2rem;
}

/* THE FIX: Adds spacing between each link in the bottom menu */
.custom-footer > .wp-block-navigation .wp-block-navigation-item:not(:last-child) {
  margin-right: 1.5rem;
}

/*
* ===============================================
* 5. FINAL FOOTER STYLES (DESKTOP & MOBILE)
* ===============================================
*/

/* --- Default State (Desktop) --- */
.custom-footer {
  display: block; /* The editor-built footer is visible on desktop */
}
.mobile-footer {
  display: none; /* The PHP-built mobile footer is hidden on desktop */
}

/* --- Mobile Breakpoint --- */
@media (max-width: 481px) {
  /* Hide the desktop footer on mobile */
  .custom-footer {
    display: none !important;
  }
  /* Show our new mobile footer */
  .mobile-footer {
    display: block !important;
    background-color: var(--wp--preset--color--pibs-grey);
    padding: 1rem 1.5rem;
    text-align: center;
  }

  /* --- Mobile Accordion Styles --- */
  .accordion-item {
    border-bottom: 1px solid #e0e0e0;
  }

  .accordion-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.0rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
  }
  .accordion-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--pibs-black);
  }
  .accordion-icon {
    width: 12px;
    height: 12px;
    border-right: 2px solid #555;
    border-bottom: 2px solid #555;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
  }
  .accordion-item.is-open .accordion-icon {
    transform: rotate(225deg);
  }
  .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
  }
  .accordion-item.is-open .accordion-content {
    max-height: 500px;
  }
  .accordion-content-inner {
    overflow: hidden;
    padding-bottom: 1.5rem;
    text-align: left;
  }
  .accordion-content .wp-block-navigation {
    align-items: flex-start !important;
    font-size: 1rem;
  }
  .accordion-content .wp-block-navigation-item a {
    color: var(--pibs-black);
    padding: 0rem 0;
    text-decoration: none;
  }
  .accordion-content .wp-block-navigation-item a:hover {
    text-decoration: underline;
  }

  /* --- Mobile Social & Bottom Menu Styles --- */
  .mobile-footer-social {
    padding: 2rem 0;
  }
  .mobile-footer-bottom-nav .wp-block-navigation-item {
    padding: 0 0.5rem;
  }
  .mobile-footer-bottom-nav .wp-block-navigation-item a {
    color: #555555;
    font-size: 0.9rem;
    text-decoration: none;
  }
  .mobile-footer-bottom-nav .wp-block-navigation-item a:hover {
    color: var(--pibs-black);
  }
}


/*
* ===============================================
* Tablet Footer Column Override
* ===============================================
*/

/* This targets the tablet breakpoint where the theme's default styles kick in. */
@media (max-width: 782px) and (min-width: 482px) {

  /* Force the columns container to stay as a horizontal row */
  .custom-footer .custom-footer-menu.wp-block-columns {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  /* Force each column to maintain its auto width and not stretch */
  .custom-footer .custom-footer-menu > .wp-block-column {
    flex-basis: auto !important;
    flex-grow: 0 !important;
  }
}

/*
* ===============================================
* 6. SECONDARY SIBLING NAVIGATION
* ===============================================
*/

/* The main container for the menu */
.sibling-nav-container {
  background-color: var(--wp--preset--color--pibs-grey);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  
  /* --- Positioning Logic --- */
  position: sticky;
  /* Use the --header-height variable we defined earlier */
  top: var(--header-height, 65px); 
  z-index: 989; /* Sit just below the main header's z-index of 990 */
}

/* The list of links */
.sibling-nav-container ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Centers the group of links */
  gap: 2rem; /* Sets the space between links */
}

@media (max-width: 782px) {
  .sibling-nav-container ul {
    /* On mobile, reduce the vertical gap between rows, while keeping a healthy horizontal gap */
    gap: 0.3rem 1rem; /* 0.5rem (vertical) | 1.5rem (horizontal) */
  }
}

/*
* ===============================================
* 6. PARTNER LOGO GALLERY (Final Version)
* ===============================================
*/


/* The main gallery container */
.partner-logo-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem 2rem !important;
  margin-top: 2.5rem;
}
/* The individual logo's container */
.wp-block-gallery.partner-logo-gallery figure.wp-block-image {
  margin: 0 !important;
  display: flex;
    justify-content: center; /* horisontellt */
    align-items: center;     /* vertikalt */
}


.wp-block-gallery.has-nested-images figure.wp-block-image > a {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The logo image itself */
.wp-block-gallery.partner-logo-gallery figure.wp-block-image img {
  max-height: 60px;
  max-width: 200px !important;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

/* FIX: This rule forcefully overrides the 'is-cropped' style from the theme,
   ensuring your logos are never cut, even if the toggle is on by mistake. */
.partner-logo-gallery.is-cropped .wp-block-image img {
  position: static;
  width: auto;
  height: 100%;
}

/* On hover, bring the logo to full color */
.wp-block-gallery.partner-logo-gallery figure.wp-block-image img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

@media (max-width: 782px) {
  .wp-block-gallery.partner-logo-gallery figure.wp-block-image img {
  max-width: 130px !important;
}
}

/*
* ===============================================
* 7. PARTNER SECTION SPACING
* ===============================================
*/

/* Adds padding to the top and bottom of the entire section */
.partner-section-wrapper {
  padding: 2rem;
}


/*
* ===============================================
* 8. HOMEPAGE HERO SECTION (Final Alignment & Animation)
* ===============================================
*/

/* 1. Defines the zoom-out animation */
@keyframes heroZoomOut {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1);
  }
}

/* 2. The main Cover Block - acts as a clipping mask for the zoom effect */
.main-hero .wp-block-cover {
  overflow: hidden;
}

/* 3. The Background Image - applies the animation */
.main-hero .wp-block-cover__image-background {
  animation: heroZoomOut 1s ease-out forwards;
}

/* 4. THE ALIGNMENT FIX: Force the inner container and its children to align left */
.main-hero .wp-block-cover__inner-container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important; /* Vertically centers the whole group */
  align-items: flex-start !important; /* Horizontally aligns the group to the left */
}

/* 5. Hero Content Styling */
.main-hero .wp-block-post-title,
.main-hero .wp-block-post-excerpt,
.main-hero .hero-read-more {
  text-align: left !important; /* Force text alignment */
  margin-left: 0 !important;
  margin-right: auto !important; /* Pin content to the left */
}

.main-hero .wp-block-post-title {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  margin-bottom: 1rem;
  padding-bottom: 0px !important;
  font-size: 2rem;
}
.main-hero .wp-block-post-title a {
  color: inherit !important;
  text-decoration: none;
}

.main-hero .wp-block-post-excerpt {
  color: var(--wp--preset--color--pibs-white);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
  line-height: 1.6;
  max-width: 55ch;
  font-size: 1rem;
}

/* 6. "Read More" Button Styling */
.main-hero .hero-read-more {
    margin-top: 2rem;
}
.main-hero .hero-read-more {
  display: inline-block;
  background-color: var(--wp--preset--color--pibs-blue);
  color: var(--wp--preset--color--pibs-white) !important;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
  border-radius: 5px;;
}
.main-hero .hero-read-more:hover {
  background-color: var(--wp--preset--color--pibs-black);
  text-decoration: none;
}



/*
* ===============================================
* CATEGORY LABEL STYLES
* ===============================================
*/

/* Targets the link inside your category block */
.taxonomy-category a {
  display: inline-block; /* Necessary for padding and background to apply correctly */
  background-color: var(--wp--preset--color--pibs-blue);
  color: var(--wp--preset--color--pibs-white) !important; /* Use !important to override default link colors */
  padding: 0.4em 0.8em;
  border-radius: 5px;
  text-decoration: none;
  line-height: 1;
  transition: background-color 0.2s ease-in-out;
  margin-bottom: 0.4rem;
}

/* Add a subtle hover effect */
.taxonomy-category a:hover {
  background-color: var(--wp--preset--color--pibs-black);
  color: var(--wp--preset--color--pibs-white);
  text-decoration: none;
}

.taxonomy-category .current-cat a {
  background-color: var(--wp--preset--color--pibs-black);
  color: var(--wp--preset--color--pibs-white);
  text-decoration: none;
}



/*
* ===============================================
* 16. PLAYER ROSTER STYLES
* ===============================================
*/

.pibs-roster-container {
  padding-top: var(--wp--preset--spacing--small);
}

.pibs-roster-container figure.wp-block-image {
  display: block !important;
  margin-top: 0px;
  margin-bottom: 0px;
}

.pibs-roster-container .wp-block-columns {
  margin-top: 0px;
  margin-bottom: 0px;
}

.pibs-roster-container .wp-block-column {
  margin-bottom: var(--wp--preset--spacing--small);
}

.pibs-roster-container H2 {
  padding-left: var(--wp--preset--spacing--small);
  padding-right: var(--wp--preset--spacing--small);
  margin-bottom: var(--wp--preset--spacing--small);
  margin-top: 0px;
}

.pibs-roster-container p {
  margin: 0;
  line-height: 1.5rem;
}


@media (max-width: 782px) {
  .pibs-roster-container H2 {
  text-align: center;
}
}




/*
* ===============================================
* 17. BLOCK-BASED CALENDAR STYLES
* ===============================================
*/

/* Huvud-wrapper för kalendern */
.pibs-calendar-wrapper {
    padding-left: var(--wp--preset--spacing--small);
    padding-right: var(--wp--preset--spacing--small);
    padding-top: var(--wp--preset--spacing--small);
}

.wp-block-buttons.is-justify-content-right {
    justify-content: flex-end;
}

.pibs-calendar-wrapper .wp-block-heading {
    margin: 0;
    text-transform: capitalize;
}
.pibs-calendar-wrapper .wp-block-buttons a.wp-block-button__link {
    background-color: var(--wp--preset--color--pibs-blue);
    color: var(--wp--preset--color--pibs-white);
    padding: 0.5rem;
    border: none;
    text-decoration: none;
}
.pibs-calendar-wrapper .wp-block-buttons a.wp-block-button__link:hover {
    border-color: #e0e0e0;
    text-decoration: none;
}

/* Själva kalender-gridden */
.pibs-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid #e0e0e0;
    border-right: none;
    border-left: 1px solid #e0e0e0;
    margin-top: 0.7rem;
}

/* Veckodagar */
.calendar-weekday {
    font-weight: 600;
    text-align: center;
    padding: 0.75rem 0.5rem;
    background-color: var(--wp--preset--color--pibs-grey);
}

/* Dagar i månaden */
.calendar-day {
    min-height: 120px;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    padding: 0.5rem;
}
.calendar-day:nth-child(7n+1) {
    border-left: none;
}
.calendar-day.is-empty {
    background-color: var(--wp--preset--color--pibs-grey);
}
.calendar-day.current-day {
    background-color: var(--wp--preset--color--pibs-grey);
}
.day-number {
    font-weight: 500;
    font-size: 0.9rem;
}

.day-name-mobile {
      display: none;
    }

/* Händelser */
.events-container {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.calendar-event {
    color: var(--wp--preset--color--pibs-white);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calendar-event.type-match {
    background-color: var(--wp--preset--color--pibs-red);
}
.calendar-event.type-other {
    background-color: var(--wp--preset--color--pibs-blue);
}

/* -- Event Modal Styles -- */
.calendar-event {
    cursor: pointer;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 1rem;
}
.modal-content {
  background: white;
  padding: 1.5rem 2rem 2rem 2rem;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--wp--preset--color--pibs-blue);
  cursor: pointer;
  line-height: 1;
  padding: 0;
}
.modal-close:hover {
    color: var(--wp--preset--color--pibs-black);
}
.modal-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--wp--preset--color--pibs-black);
}
.modal-content p {
    margin: 0.5rem 0;
    color: #333;
    font-size: 1rem;
}
.modal-description-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* -- Responsive Calendar Styles -- */
@media (max-width: 782px) {
  .pibs-calendar-wrapper {
    padding-left: 0px;
    padding-right: 0px;
    padding-top: var(--wp--preset--spacing--small);
}
    .pibs-calendar-wrapper .wp-block-heading {
        font-size: 1.2rem;
        padding-top: 0.5rem;
    }
    .pibs-calendar-wrapper .wp-block-buttons a.wp-block-button__link {
        font-size: 0.8rem;
        margin-right: var(--wp--preset--spacing--small);
        margin-left: var(--wp--preset--spacing--small);
    }
    .calendar-weekday {
        display: none; /* Dölj Mån, Tis, etc. på mobil */
    }
    .pibs-calendar-grid {
        display: block; /* Byt från grid till block-layout */
        border-top: none;
        margin-top: 0px;
    }
    .calendar-day {
        display: flex;
        align-items: flex-start;
        min-height: 0;
        padding: 0.75rem;
        border-left: none;
        gap: 1rem;
    }
    .calendar-day:not(:last-child) {
        border-bottom: 1px solid #e0e0e0;
    }
    .calendar-day.is-empty {
        display: none; /* Dölj tomma dagar */
    }
    .day-number-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 50px;
        flex-shrink: 0;
    }
    .day-number {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--wp--preset--color--pibs-blue);
    }
    .day-name-mobile {
      display: block;
        font-size: 0.7rem;
        text-transform: uppercase;
        color: #777;
    }
    .events-container {
        flex-grow: 1;
        margin-top: 0;
    }
    .calendar-event {
        white-space: normal; /* Tillåt texten att radbrytas */
        padding: 6px 8px;
    }
}


/*
* ===============================================
* 18. TABS, SCHEDULE & STANDINGS STYLES (Sammanslagen)
* ===============================================
*/

/* --- Flik-navigering --- */
.pibs-tabs-nav {
    padding-top: var(--wp--preset--spacing--small);
}
.pibs-tabs-nav .wp-block-column {
    padding: 0;
    text-align: center;
}

/* --- Flik-innehåll --- */
.pibs-tab-content {
    display: none;
}
.pibs-tab-content.is-active {
    display: block;
}

/* --- Gemensam rubrik för serier --- */
.schedule-series-title {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* --- Spelschema (Ny lista-design) --- */
.pibs-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.pibs-match-row {
    background-color: var(--wp--preset--color--pibs-grey);
    padding: 0.75rem 1rem;
    border-radius: 5px;
}
.match-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.25rem;
}
.match-main-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
}
.match-result a {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--wp--preset--color--pibs-blue);
    text-decoration: none;
    min-width: 50px;
    text-align: right;
}

/* --- Serietabell --- */
.pibs-standings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    /* Från din kod: Centrerar tabellen */
    margin-left: auto;
    margin-right: auto;
    max-width: 800px; 
}
.pibs-standings-table th,
.pibs-standings-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}
.pibs-standings-table thead th {
    background-color: var(--wp--preset--color--pibs-grey);
    font-weight: 600;
}
.pibs-standings-table tbody tr:hover {
    background-color: #f9f9f9;
}
.pibs-standings-table td[data-label="P"] strong {
    font-weight: 600;
}
/* Vänsterställer alla tabellrubriker */
.pibs-schedule-table th,
.pibs-standings-table th {
    text-align: left;
}

/* --- Responsivitet för Spelschema & Tabell --- */
@media (max-width: 782px) {

    /* --- Responsivitet för serietabellen --- */
    .pibs-standings-table {
        display: table; /* Återställ till tabell-layout */
        table-layout: fixed; /* VIKTIGT: Tvingar tabellen att respektera våra bredder */
        width: 100%;
        font-size: 0.8rem; /* Mindre text för att få plats */
    }

    .pibs-standings-table thead {
        display: table-header-group; /* Visa rubrikerna igen */
    }

    .pibs-standings-table tr {
        display: table-row; /* Återställ rader */
        margin-bottom: 0;
        border: none;
    }

    .pibs-standings-table td,
    .pibs-standings-table th {
        display: table-cell; /* Återställ celler */
        padding: 0.5rem 0.4rem; /* Minskat padding */
        text-align: center; /* Centrera siffror */
    }

    /* Justera text-justering för specifika kolumner */
    .pibs-standings-table th:nth-child(2),
    .pibs-standings-table td:nth-child(2) {
        text-align: left; /* Vänsterställ lagnamn */
        word-break: break-word; /* Tillåt långa lagnamn att radbrytas */
    }

    /* Definiera specifika bredder för varje kolumn */
    .pibs-standings-table colgroup col {
        width: 9%; /* M, V, O, F, P */
    }
    .pibs-standings-table colgroup col:nth-child(1) {
        width: 10%; /* Pos */
    }
    .pibs-standings-table colgroup col:nth-child(2) {
        width: 28%; /* Lag (mer plats) */
    }
    .pibs-standings-table colgroup col:nth-child(7) {
        width: 18%; /* GM-IM */
    }
}
@media (max-width: 600px) {
    /* --- Responsivitet för spelschemat --- */
    .pibs-schedule-list .match-main-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        font-size: 0.9rem;
    }
    .pibs-schedule-list .schedule-series-title {
        padding-left: 1rem;
    }
    .pibs-schedule-list .match-result {
        width: 100%;
    }
    .pibs-schedule-list .match-result a {
        text-align: left;
    }
}


/*
* ===============================================
* 20. CUSTOM TEAM PAGE COVER IMAGE
* ===============================================
*/

.team-cover-image {
    /* Sätter en svart bakgrundsfärg. Detta är viktigt för att fylla utrymmet
       runt bilden när vi använder object-fit: contain. */
    /* Tvingar blocket till en 16:9 widescreen-proportion. */
    aspect-ratio: 16 / 9;
    
    /* Nollställer höjdinställningar från redigeraren för att låta aspect-ratio bestämma höjden. */
    min-height: auto !important;
    height: auto !important;
    
    /* Behåller den svarta bakgrunden som fallback ifall bilden inte laddas. */
    background-color: #000000;
}

/* 1. Gör overlay-lagret mörkare (60% opacitet) */
.team-cover-image .wp-block-cover__background {
    /* Tvingar overlay-färgen att vara svart istället för vit */
    background-color: #000000 !important;
    /* Ställer in opaciteten. 0.6 = 60% mörker. */
    opacity: 0.3 !important;
}

/* 2. Ändrar bilden så att hela bilden visas istället för att beskäras */
.team-cover-image .wp-block-cover__image-background {
    object-fit: cover;
}

@media (max-width: 782px) {
  
  .team-previous-match {
    border-right: none;
    border-bottom-color: var(--wp--preset--color--pibs-grey);
    border-bottom-width: 3px;
    border-bottom-style: solid;
}

}

/*
* ===============================================
* 21. CATEGORY FILTER NEWS
* ===============================================
*/

.wp-block-categories {
    display: flex;
    list-style: none; /* Tar bort punktlistan */
    padding: 0; /* Tar bort standardmarginaler */
    padding-top: 1em;
    margin: 0;
    gap: 1em; /* Lägger till ett mellanrum mellan varje listobjekt */
}

.wp-block-query-pagination {
    padding-top: 1em;
}


/*
* ===============================================
* 22. STARTPAGE UPCOMING MATCHES
* ===============================================
*/

.upcoming-match-container {
    padding: 1rem;
    margin-bottom: 2rem;
    position: relative; /* Viktigt för att ::after ska positioneras korrekt */
    background-color: var(--wp--preset--color--pibs-grey);
}

.upcoming-match-container .match-logo {
    max-height: 40px;
    max-width: 55px;
    vertical-align: middle;
    padding-left: var(--wp--preset--spacing--x-small);
    padding-right: var(--wp--preset--spacing--x-small);
}

.upcoming-match-container .start-weekly-matches {
    display: flex;
    align-items: center; /* Detta centrerar innehållet vertikalt */
    justify-content: center;

}

.upcoming-match-container .upcoming-info {
    color: #555555;
    font-size: 0.8rem;
    margin-top: -12px;
}

.upcoming-match-container h3 {
    padding-bottom: var(--wp--preset--spacing--x-small);
}

.upcoming-match-container::after {
    content: '';
    position: absolute;
    bottom: 0; /* Placerar elementet längst ner på matchraden */
    left: 0;
    width: 100%;
    height: 5px; /* Justera höjden på din "border" */
    background-image: url('assets/svg/pen-brush-red.svg');
    background-size: 100% 100%; /* Skalar SVG:n till full bredd och höjd */
    background-repeat: no-repeat;
}

.upcoming-match-container::before {
    content: '';
    position: absolute;
    top: 0; /* Placerar elementet längst ner på matchraden */
    left: 0;
    width: 100%;
    height: 5px; /* Justera höjden på din "border" */
    background-image: url('assets/svg/pen-brush-red.svg');
    background-size: 100% 100%; /* Skalar SVG:n till full bredd och höjd */
    background-repeat: no-repeat;
}

.upcoming-match-container .upcoming-match-link a {
  position: relative; /* Keep this to ensure the after element is positioned correctly */
  text-decoration: none;
  color: inherit;
  text-align: center;
  display: inline-block;
  font-family: Oswald, sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
}

main.upcoming-match-container .upcoming-match-link a::after {
    content: '';
    position: absolute;
    bottom: 0; /* Placerar elementet längst ner på matchraden */
    left: 0;
    width: 100%;
    height: 5px; /* Justera höjden på din "border" */
    background-image: url('assets/svg/pen-brush-blue.svg');
    background-size: 100% 100%; /* Skalar SVG:n till full bredd och höjd */
    background-repeat: no-repeat;
    transform: scaleX(1);
}

main.upcoming-match-container .upcoming-match-link a:hover::after {
    background-image: url('assets/svg/pen-brush-red.svg');
}

@media (max-width: 930px) {
  
.upcoming-match-container {
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-left: 0;
    padding-right: 0;
}

/* Målrar det specifika kolumnblocket */
    .upcoming-match-container .wp-block-column {
        flex-basis: 100% !important;
        flex-grow: 0 !important;
    }

    /* Målrar även de kapslade kolumnerna */
    .upcoming-match-container .wp-block-columns {
        flex-wrap: wrap !important;
    }

.upcoming-match {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

}

/*
* ===============================================
* 22. WEEKLYMATCHES
* ===============================================
*/

.weekly-matches-container h2 {
    padding-bottom: var(--wp--preset--spacing--x-small);
}


.weekly-matches-container .pibs-weekly-schedule-list {
    margin-bottom: var(--wp--preset--spacing--small);
}

.weekly-matches-container .pibs-weekly-schedule-list .match-competition {
    font-size: var(--wp--preset--font-size--small);
}

/* Styles for all screen sizes (default) */
.weekly-matches-container .pibs-weekly-schedule-list .match-main-info {
  display: flex;
  justify-content: space-between; /* This will push the elements to the edges */
  align-items: center; /* This will vertically center them */
}

/* Styles specifically for mobile screens */
@media (max-width: 670px) {
  .weekly-matches-container .pibs-weekly-schedule-list .match-main-info {
    flex-direction: column;
    align-items: flex-start; /* Or 'center' depending on desired alignment */
  }
}
/*
* ===============================================
* 22. BOARD
* ===============================================
*/

.board-header {
    padding-bottom: 0px;
}

/*
* ===============================================
* 22. BILJETTER
* ===============================================
*/
.buy-ticket-button {
  font-size: var(--wp--preset--font-size--small);
  display: block;
  background-color: var(--wp--preset--color--pibs-blue);
  color: var(--wp--preset--color--pibs-white) !important; /* Use !important to override default link colors */
  padding: 0.8em 0.8em;
  border-radius: 5px;
  text-decoration: none;
  line-height: 1;
  transition: background-color 0.2s ease-in-out;
  margin-bottom: 0px;
  text-align: center;
  margin-top: 0px;
}

   .pibs-tickets-schedule-list .pibs-match-row {
        margin-bottom: var(--wp--preset--spacing--x-small);
    }

@media (max-width: 550px) {
   /* --- Responsivitet för biljetter --- */
    .pibs-tickets-schedule-list .match-main-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        font-size: 0.9rem;
    }
    .pibs-tickets-schedule-list .schedule-series-title {
        padding-left: 1rem;
    }
    .pibs-tickets-schedule-list .match-result {
        width: 100%;
    }
    .pibs-tickets-schedule-list .match-result a {
        text-align: left;
    }
     }

/*
* ===============================================
* 22. SOLIDSPORT STARTSIDAN
* ===============================================
*/
     .solidsport-video-gallery .wp-block-columns.is-layout-flex {
    gap: 20px;
}

h4.solidsport-title-text {
  font-size: 0.9rem; 
  color: var(--wp--preset--color--pibs-black);
  margin-bottom: 0 !important;
  margin-top: var(--wp--preset--spacing--x-small);
  padding-bottom: 0 !important;
}

.solidsport-figure {
    position: relative;
    display: block;
}

.solidsport-dashicon {
    position: absolute;
    top: 41%;
    left: 41%;
    transform: translate(-50%, -50%);
    color: #CB0538;
    font-size: 4rem !important;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.solidsport-link-wrapper:hover .solidsport-dashicon {
    opacity: 1;
}

/* Uppdaterad CSS för att centrera lag-loggorna */
.solidsport-badges {
    position: absolute;
    top: 25%; /* Justera avstånd från botten */
    left: 50%; /* Flytta till mitten */
    transform: translateX(-50%) !important; /* Korrigera för att centrera */
    display: flex;
    justify-content: center; /* Centrera ikonerna inom div-elementet */
    gap: 32px;
    z-index: 10;
}

.solidsport-badge {
    max-width: 64px;
    max-height: 64px !important;
    border-radius: 20%;
    background-color: white;
    padding: 5px;
}

p.solidsport-event-text, p.solidsport-date-text {
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
  font-family: var(--wp--preset--font-family--oswald);
  font-weight: 400;
  color: #555555;
  font-style: italic;
  margin-top: 4px;
}

@media (max-width: 1000px) {
    .solidsport-title-text {
  font-size: 0.8rem; 
}

.solidsport-badge {
    max-width: 48px;
    max-height: 48px !important;
}
}

@media (max-width: 900px) {
    .solidsport-title-text {
  font-size: 0.7rem; 
}

.solidsport-dashicon {
    top: 35%;
    left: 40%;
}

}

@media (max-width: 781px) {
    .solidsport-video-gallery .wp-block-columns .wp-block-column {
        flex: 1 0 45% !important; /* Två kolumner på surfplattor */
    }
        .solidsport-title-text {
  font-size: 0.9rem; 
}
.solidsport-dashicon {
    top: 42%;
    left: 44%;
}
.solidsport-badge {
    max-width: 64px;
    max-height: 64px !important;
}

}

@media (max-width: 580px) {
    .solidsport-video-gallery .wp-block-columns .wp-block-column {
        flex: 1 0 100% !important; /* Får varje kolumn att ta upp 100% av bredden */
    }

.solidsport-badge {
    max-width: 64px;
    max-height: 64px !important;
}

h4.solidsport-title-text {
  font-size: 1rem; 
}

}

/*
* ===============================================
* 22. MVP
* ===============================================
*/

/* Stilar för de nya separatorerna */
.pibs-mvp-group-separator {
    margin-top: 30px; /* Stort mellanrum mellan Målvakter och Utespelare */
    margin-bottom: 15px; 
    border-top: 2px solid var(--wp--preset--color--pibs-blue); 
}

.pibs-mvp-line-separator {
    /* Litet mellanrum mellan Line-grupper */
    height: 4px; 
}
.pibs-team-group-heading {
    /* Stilar för Målvakt/Utespelare rubriker */
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
}
/* Gör Team-rubriken lite större */
.pibs-mvp-team-column h3.wp-block-heading {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* --- SPELARE/MARKERING --- */

.pibs-player-row {
    margin-bottom: 4px; /* Mellanrum mellan spelare */
}

/* Dölj radio-knappen HELT */
.pibs-player-row input[type='radio'] {
    position: absolute !important; 
    opacity: 0 !important;         
    pointer-events: none !important; 
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pibs-player-row label {
    display: flex; 
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border: 2px solid var(--wp--preset--color--pibs-grey); /* Använd PIBS-grey */
    border-radius: 4px;
    transition: background-color 0.2s, border-color 0.2s;
    justify-content: space-between; 
}

/* Dölj Dashicon som standard */
.pibs-mvp-star {
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--wp--preset--color--pibs-red); /* Röd som standard på stjärnan */
    font-size: 1.2em;
    margin-left: 10px;
}

/* 1. Visa stjärnan vid HOVER */
.pibs-player-row label:hover {
    background-color: var(--wp--preset--color--pibs-grey); /* PIBS-grey vid hover */
    border-color: var(--wp--preset--color--pibs-blue); /* PIBS-blue vid hover */
}
.pibs-player-row label:hover .pibs-mvp-star {
    opacity: 0.5;
}

/* 2. Visa stjärnan och ändra färg vid VALD (checked) */
.pibs-player-row input[type='radio']:checked + label {
    background-color: var(--wp--preset--color--pibs-grey);
    border-color: var(--wp--preset--color--pibs-blue);
    font-weight: 600;
}

/* 3. Tydlig markering av stjärnan när spelaren är VALD */
.pibs-player-row input[type='radio']:checked + label .pibs-mvp-star {
    opacity: 1; 
    color: var(--wp--preset--color--pibs-red); /* Röd färg vid vald */
}

/* Stilar för sammanfattningen */
#pibs-mvp-summary strong {
    font-weight: bold;
}
.pibs-summary-selection {
    font-weight: normal; /* Återställ fetstil från strong */
}

.pibs-player-list {
    padding-left: 0px;
}

.pibs-player-position {
    font-size: 0.7rem;
}

.pibs-mvp-team-column.home-team {
    margin-right: var(--wp--preset--spacing--x-small);
}

.pibs-submit-vote-button {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block; /* Säkerställer att den kan centreras */
}

.pibs-summary-selection {
    text-align: center;
    display: block;
}

@media (max-width: 781px) {
    .pibs-mvp-team-column.home-team, .pibs-mvp-team-column.away-team {
    margin-right: var(--wp--preset--spacing--x-small);
    margin-left: var(--wp--preset--spacing--x-small);
}

}