
/*
Theme Name: ZSO Theme
Author: Jakub Kosmalski
Author URI: https://jakubkosmalski.pl
Description: Dedykowany motyw dla Zakładu Spektroskopii Optycznej z fixed headerem i Tailwind CSS.
Version: 2.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-header, full-width-template, tailwind
Text Domain: zso-theme
*/

@font-face {
    font-family: 'Acrobat';
    src: url('fonts/Acrobat-Regular.woff2') format('woff2'),
         url('fonts/Acrobat-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Acrobat';
    src: url('fonts/Acrobat-Bold.woff2') format('woff2'),
         url('fonts/Acrobat-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Acrobat', sans-serif;
    font-size: 20px;
    line-height: 27px;
    color: #142237;
}

@media (max-width: 1440px) {
    body {
        font-size: 18px;
        line-height: 24px;
    }
}

@media (max-width: 1024px) {
    body {
        font-size: 16px;
        line-height: 22px;
    }
}

p {
    margin-bottom: 14px;
}

p:last-child {
    margin-bottom: 0;
}

h2 {
    font-size: 30px !important;
    color: #5A1771;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 1.5rem !important;
}

#wpadminbar {
    display: none;
}

/* MENU */
.main-navigation ul {
    display: flex;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

.main-navigation ul li {
    height: 100%;
    display: flex;
    align-items: center;
}

.main-navigation ul li a {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    font-size: 16px; 
    font-weight: 500;
    color: #142237;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

@media (max-width: 1440px) {
    .main-navigation ul li a {
        font-size: 14px;
        padding: 0 0.75rem;
    }
}

@media (max-width: 1200px) {
    .main-navigation ul li a {
        font-size: 13px;
        padding: 0 0.5rem;
    }
}

.main-navigation ul li a:hover {
    color: #4a148c;
    background-color: #f9fafb;
}

.main-navigation ul li.current-menu-item a {
    background-color: #4a148c;
    color: white;
}

/* NAGŁÓWEK Z LINIAMI */
.zso-header, 
h1.zso-header,
h2.zso-header {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-bottom: 3rem;
    color: #4a148c; 
    font-family: 'Acrobat', sans-serif !important;
    font-size: 50px !important; 
    font-weight: 400; 
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.zso-header::before,
.zso-header::after {
    content: '';
    display: block;
    height: 1px;
    background-color: #d8b4e2;
    flex-grow: 1;
    max-width: 300px;
}

.zso-header::before { margin-right: 2rem; }
.zso-header::after { margin-left: 2rem; }

@media (max-width: 1440px) {
    .zso-header, h1.zso-header, h2.zso-header {
        font-size: 40px !important;
    }
}

@media (max-width: 1200px) {
    .zso-header, h1.zso-header, h2.zso-header {
        font-size: 34px !important;
    }
}

@media (max-width: 640px) {
    .zso-header::before, .zso-header::after { display: none; }
    .zso-header, h1.zso-header, h2.zso-header { font-size: 32px !important; }
}

/* SOCIAL ICONS */
.zso-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease-in-out;
}
.zso-social-icon:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    border-color: #4a148c;
    color: #4a148c;
}

/* NEWS GRID STYLES */
.news-date-thumb {
    text-align: center;
    position: absolute;
    top: 20px;
    right: 10px;
    background-color: #ffffff;
    padding: 8px;
}

.newscontainer {
    transition: box-shadow 0.3s ease-in-out;
    position: relative;
    margin-bottom: 30px;
    overflow: visible !important;
    z-index: 1;
}

.newscontainer:hover {
    box-shadow: 0px 0px 20px 5px rgba(49, 96, 147, 0.3);
    z-index: 50;
}

.newsthumbtitle {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    text-align: center;
    color: #5A1771;
    font-size: 22px;
    font-weight: bold;
    display: block;
}

.newsthumbtext {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    font-size: 18px;
    color: #535353;
    transition: color 0.3s ease-in-out;
}

.newscontainer:hover .newsthumbtext {
    color: #20538A;
}

.readmore {
    background-color: #5A1771;
    color: #ffffff;
    padding: 8px 24px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    position: absolute;
    bottom: -20px;
    right: 0;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.newscontainer:hover .readmore { opacity: 1; }

/* 
 * ==========================================================================
 * STYLE DLA WPBAKERY - TEMATYKA BADAWCZA (RESEARCH CARDS)
 * ==========================================================================
 */

.zso-research-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
    border: 1px solid #f3f4f6; 
    transition: all 0.3s ease-in-out;
    margin-bottom: 40px !important;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (min-width: 1024px) {
    .zso-research-card {
        width: 75% !important; 
    }
}

.zso-research-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); 
    transform: translateY(-2px);
}

/* KOLUMNA Z TREŚCIĄ (Prawa) */
.zso-card-content {
    padding: 2rem !important; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .zso-card-content {
        border-left: 4px solid #4a148c; 
    }
}

.zso-card-content h3 {
    color: #4a148c;
    font-family: 'Acrobat', sans-serif;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.zso-card-separator {
    width: 100%;
    height: 1px;
    background-color: #f3f4f6; 
    margin-bottom: 1rem;
    display: block;
}

.zso-card-content p {
    color: #374151; 
    font-size: 18px;
    line-height: 1.6;
    text-align: justify;
}

/* KOLUMNA ZE ZDJĘCIEM (Lewa) */
.zso-card-image {
    position: relative;
    padding: 0 !important;
    min-height: 250px;
    background-color: #e5e7eb;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
}

/* Fix dla WPBakery: Wymuszenie pełnej wysokości kontenerów obrazka */
.zso-card-image > .vc_column-inner {
    display: flex !important;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    padding: 0 !important;
}

.zso-card-image .wpb_wrapper {
    display: flex !important;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

.zso-card-image .wpb_single_image {
    display: flex !important;
    flex-direction: column;
    flex-grow: 1;
    margin-bottom: 0 !important; /* Usuwa dolny margines obrazka */
    width: 100%;
}

.zso-card-image .vc_figure,
.zso-card-image .vc_single_image-wrapper {
    display: flex !important;
    flex-grow: 1;
    width: 100%;
    height: 100%;
    margin: 0 !important;
}

.zso-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    vertical-align: bottom !important; 
    margin: 0 !important;
    max-width: none !important;
}

.zso-research-card:hover .zso-card-image img {
    transform: scale(1.05);
    transition: transform 0.7s ease;
}

/* 
 * FIX: WPBAKERY RAW HTML SPACE 
 * Rozwiązuje problem przerwy pod obrazkiem spowodowanej przez blokowy div z numerkiem.
 * WAŻNE: Usunięto klasę .wpb_content_element z listy selektorów, 
 * ponieważ obrazki też ją posiadają i znikały.
 * Teraz dotyczy to TYLKO kontenerów Raw HTML.
 */
.zso-card-image .wpb_raw_code,
.zso-card-image .wpb_raw_html {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 0 !important; /* Zerowa szerokość */
    height: 0 !important; /* Zerowa wysokość */
    margin: 0 !important;
    padding: 0 !important;
    z-index: 20;
    overflow: visible !important; /* Pozwala dziecku (.zso-card-badge) być widocznym */
}

/* NUMER (BADGE) */
.zso-card-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #4a148c; 
    color: white;
    padding: 8px 16px;
    font-size: 20px;
    font-weight: bold;
    border-bottom-right-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 30;
    width: auto;
    height: auto;
    white-space: nowrap;
}

/* GLOBAL BUTTONS SCALING */
button, .button, .btn, .readmore, .zso-tab-btn {
    transition: all 0.2s ease;
}

/* Google Translate Hiding - Aggressive */
iframe.goog-te-banner-frame,
iframe.goog-te-menu-frame,
iframe.skiptranslate,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
#goog-gt-tt,
.goog-te-balloon-frame,
#goog-gt-tt.skiptranslate,
.goog-tooltip,
.goog-tooltip:hover,
.goog-te-menu-value,
.goog-te-gadget,
.skiptranslate {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body {
    top: 0 !important;
    position: relative !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Fix for forced Google Translate top margin */
html {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Language Switcher Styling */
.zso-lang-switcher {
    border-left: 1px solid #eee;
    padding-left: 1rem;
    display: flex !important;
    align-items: center;
    min-width: 60px; /* Ensure space for one flag */
    justify-content: center;
}

.zso-lang-switcher img {
    height: 16px !important; 
    width: auto !important;
    max-width: none !important;
    object-fit: contain;
    pointer-events: none; /* Zapobiega blokowaniu kliknięcia przez samą grafikę */
}

#zso-flag-pl, #zso-flag-en {
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 99;
}

#zso-flag-pl.hidden, #zso-flag-en.hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .zso-lang-switcher {
        border-left: none;
        border-top: 1px solid #eee;
        padding-left: 0;
        padding-top: 1rem;
        margin-left: 0 !important;
        justify-content: center;
    }
}

@media (max-width: 1440px) {
    button, .button, .btn, .readmore {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        font-size: 0.9em !important;
    }
    .zso-tab-btn {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        font-size: 0.9em !important;
    }
}

@media (max-width: 1024px) {
    button, .button, .btn, .readmore {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}
