/*
Theme Name: Panorama Szczyrk
Author: Motyw Dedykowany
Description: Nowoczesny responsywny motyw dla ośrodka wypoczynkowego Panorama w Szczyrku.
Version: 4.7 (Usunięcie domyślnego pogrubienia nagłówków h2 i h3 na podstronach)
*/

/* 1. Import fontów z Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Caacupe+One&family=Libre+Baskerville:ital,wght@0,400..700;1,400..700&family=Quicksand:wght@300..700&display=swap');

/* 2. Zmienne globalne i reset */
:root {
    --max-w: 1100px;
    --primary-color: #0d47a1;
    --accent: #e65100;
    --font-heading: 'Caacupe One', serif;
    --font-body: 'Quicksand', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: var(--font-body); 
    color: #333; 
    background: #fff; 
    padding-top: 150px; 
    line-height: 1.6; 
}

h1, h2, h3, h4, h5, h6 { line-height: 1.15; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 15px; }
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
a { text-decoration: none; color: inherit; }

/* 3. Biały nieprzezroczysty nagłówek */
.main-header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    background: #ffffff; 
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); 
    height: 80px; 
    display: flex; 
    align-items: center;
}

.header-grid { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    max-width: var(--max-w); 
    margin: 0 auto; 
    padding: 0 15px; 
}

.header-loc { font-size: 14px; font-weight: 600; color: #555; }
.header-logo img { max-height: 52px; }

.header-btns .btn { 
    display: inline-block;
    padding: 10px 20px; 
    margin-left: 10px; 
    border-radius: 6px; 
    font-weight: 600; 
    font-size: 14px;
    border: 1px solid var(--primary-color); 
    transition: all 0.3s ease;
}

.header-btns .btn-outline { background: transparent; color: var(--primary-color); }
.header-btns .btn-outline:hover { background: #f0f4f8; }
.header-btns .btn-res { background: var(--primary-color); color: #ffffff; }
.header-btns .btn-res:hover { background: #083377; }

#mobile-menu-toggle { display: none; }

/* 4. Menu Liquid Glass (Dropdown + Kontakt i Social Media) */
.glass-menu-wrapper { 
    position: fixed; 
    top: 90px; 
    left: 0; 
    right: 0; 
    z-index: 999; 
    display: flex; 
    justify-content: center; 
    pointer-events: none; 
}

.glass-menu { 
    pointer-events: auto; 
    width: 100%; 
    max-width: var(--max-w); 
    background: rgba(13, 71, 161, 0.70); 
    backdrop-filter: blur(14px); 
    -webkit-backdrop-filter: blur(14px); 
    border: 1px solid rgba(255, 255, 255, 0.25); 
    border-radius: 12px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 24px; 
    height: 60px; 
    color: #ffffff; 
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); 
}

.nav-left > ul { display: flex; list-style: none; gap: 24px; align-items: center; }
.nav-left ul li { position: relative; padding: 18px 0; }
.nav-left ul li a { color: #ffffff; font-weight: 600; font-size: 15px; transition: color 0.3s ease; display: block; }
.nav-left ul li a:hover { color: #bbdefb; }

.nav-left ul li.menu-item-has-children > a::after {
    content: "\f0d7"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: 6px; font-size: 13px; opacity: 0.8;
}

.nav-left ul ul {
    position: absolute; top: 100%; left: 0; background: rgba(13, 71, 161, 0.90); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 10px; min-width: 230px; list-style: none; padding: 10px 0; display: none; 
    flex-direction: column; gap: 0; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); z-index: 1000;
}
.nav-left ul li:hover > ul { display: flex; animation: fadeInMenu 0.3s ease forwards; }
.nav-left ul ul li { padding: 0; }
.nav-left ul ul li a { padding: 12px 24px; font-size: 14px; font-weight: 500; color: #ffffff; transition: all 0.25s ease; }
.nav-left ul ul li a:hover { background: rgba(255, 255, 255, 0.15); padding-left: 28px; color: #ffffff; }
.nav-left ul ul li.menu-item-has-children > a::after { content: "\f0da"; }

/* Prawa strona (Kontakt Desktop) */
.nav-right { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.nav-right a { color: #ffffff; transition: color 0.25s ease, opacity 0.25s ease; }
.nav-right a:hover { text-decoration: underline; opacity: 0.9; }

/* Ikony Social Media */
.nav-right .social-icons { display: flex; gap: 14px; align-items: center; }
.nav-right .social-icons a:hover { color: var(--accent); text-decoration: none; opacity: 1; transform: none; }

.nav-right .email-text { display: none; }
.nav-right .contact-phones { display: flex; align-items: center; gap: 8px; }
.nav-right .sep { opacity: 0.5; margin: 0 5px; }

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 5. Sekcje i układ */
.page-module { padding: 30px 0; }
.hero + .page-module { padding-top: 50px; }

.hero { position: relative; height: 75vh; margin-top: -150px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; color: #ffffff; }
.hero video { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%; z-index: -2; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.52); z-index: -1; }
.hero h1 { font-family: var(--font-heading); font-size: 46px; font-weight: normal; margin-bottom: 20px; line-height: 1.1; text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6); }
.hero h2 { font-size: 22px; font-weight: 400; line-height: 1.35; max-width: 900px; margin: 0 auto; }

.section-title { text-align: center; font-family: var(--font-heading); font-size: 40px; font-weight: normal; margin-bottom: 40px; color: var(--primary-color); letter-spacing: 0.5px; line-height: 1.15; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.grid-2.reverse { direction: rtl; }
.grid-2.reverse > * { direction: ltr; }

.grid-2 h2, .grid-2 h3, .card-content h3 { font-family: var(--font-heading); font-weight: normal; color: var(--primary-color); margin-bottom: 15px; line-height: 1.15; }
.grid-2 h2 { font-size: 34px; }
.grid-2 h3, .card-content h3 { font-size: 24px; }

/* 6. Karty ofert i wpisów (Pionowe i Poziome) */
.card { 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.06); 
    background: #ffffff; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.card img { width: 100%; height: 240px; object-fit: cover; border-radius: 0; transition: opacity 0.3s ease; }
.card a:hover img { opacity: 0.85; }

.card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.card-content h3 a { color: inherit; transition: color 0.3s ease; }
.card-content h3 a:hover { color: var(--accent); }
.card-content p { flex-grow: 1; margin-bottom: 15px; }

.card-link { display: inline-block; margin-top: auto; color: var(--primary-color); font-weight: 700; font-size: 15px; transition: color 0.3s ease; }
.card-link:hover { color: var(--accent); }

/* --- Układ Poziomy dla sekcji Aktualna Oferta --- */
.list-cards-container { display: flex; flex-direction: column; gap: 30px; }
.card-horizontal { flex-direction: row; align-items: stretch; }
.card-horizontal .card-img-link { width: 45%; flex-shrink: 0; display: flex; align-items: center; background: #f4f5f7; }
.card-horizontal img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; }
.card-horizontal .card-content { width: 55%; padding: 40px; justify-content: center; }

/* Sekcja blogowa */
.section-blog { background: #f8f9fa; padding: 50px 40px; border-radius: 20px; }

/* 7. Udogodnienia */
.icons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.icon-box { padding: 35px 25px; background: #f8f9fa; border-radius: 12px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.icon-box:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.icon-box i { font-size: 42px; color: var(--accent); margin-bottom: 20px; }
.icon-box h3 { font-family: var(--font-heading); font-size: 22px; font-weight: normal; color: var(--primary-color); margin-bottom: 12px; }
.icon-box p { font-weight: 500; color: #555; font-size: 15px; line-height: 1.5; }

/* 8. Stopka */
.site-footer { background: #f8f9fa; padding: 60px 0 40px; border-top: 1px solid #e9ecef; }
.footer-grid { display: grid; grid-template-columns: 0.9fr 1.1fr 1.8fr 2.2fr; gap: 30px; font-size: 15px; }
.footer-grid h4 { font-family: var(--font-heading); font-weight: normal; font-size: 20px; margin-bottom: 15px; color: var(--primary-color); line-height: 1.2; }

/* Style dedykowane dla akapitów, ikon i linków w stopce */
.footer-grid p { margin-bottom: 8px; color: #444; }
.footer-grid i { width: 22px; text-align: left; color: var(--primary-color); margin-right: 5px; }
.footer-grid a { transition: color 0.3s ease; }
.footer-grid a[href^="mailto:"], .footer-grid a[href^="tel:"] { white-space: nowrap; }
.footer-grid a:hover { color: var(--accent); text-decoration: none; }

.footer-subtext { font-size: 13px; color: #777 !important; margin-top: -12px; margin-bottom: 15px !important; }
.footer-person { font-weight: 600; color: #333 !important; margin-top: 10px; margin-bottom: 4px !important; }
.footer-person:first-of-type { margin-top: 0; }
.footer-person-space { margin-bottom: 20px !important; }

/* 10. Przycisk Przewiń do góry */
#scroll-to-top { position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px; background: var(--primary-color); color: #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
#scroll-to-top.show { opacity: 1; visibility: visible; }
#scroll-to-top:hover { background: var(--accent); transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); color: #ffffff; }

/* 11. Podstrony i wpisy (page.php, single.php) - DESKTOP */
.subpage-hero {
    position: relative;
    height: 40vh;
    min-height: 330px;
    margin-top: -150px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
    padding-top: 150px; 
    padding-bottom: 0;
}

.subpage-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.54);
    z-index: 1;
}

.subpage-hero .hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 0;
    transform: translateY(-10px);
}

.subpage-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: normal;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.15;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

.post-meta {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.post-meta i { margin-right: 6px; }
.page-content { font-size: 17px; line-height: 1.8; color: #444; }
.page-content p { margin-bottom: 22px; }

/* Nagłówki h2 i h3 na podstronach bez pogrubienia - spójne ze stroną główną */
.page-content h2, 
.page-content h3 { 
    font-family: var(--font-heading); 
    font-weight: normal; 
    color: var(--primary-color); 
    margin-top: 35px; 
    margin-bottom: 15px; 
    line-height: 1.15; 
}
.page-content h2 { 
    font-size: 32px; 
}
.page-content h3 { 
    font-size: 24px; 
}

/* Listy numerowane */
.page-content ol { 
    margin: 0 0 24px 28px; 
}
.page-content ol li { 
    margin-bottom: 8px; 
}

/* Listy wypunktowane ze strzałkami w kolorze nagłówków */
.page-content ul:not(.wp-block-gallery):not(.gallery) {
    list-style: none;
    margin: 0 0 24px 0;
    padding-left: 0;
}

.page-content ul:not(.wp-block-gallery):not(.gallery) > li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
}

.page-content ul:not(.wp-block-gallery):not(.gallery) > li::before {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 2px;
    top: 5px;
    font-size: 11px;
}

.page-content ul ul {
    margin: 8px 0 8px 10px;
}

/* Domyślny margines dla zdjęć wplecionych w treść */
.page-content img { margin: 25px 0; border-radius: 10px; }

/* ========================================================
   ELEGANCKIE LINKI TEKSTOWE (Tylko w treści artykułów/podstron)
   ======================================================== */
.page-content p a, 
.page-content li a {
    color: inherit; 
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--primary-color); 
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.page-content p a:hover, 
.page-content li a:hover {
    color: var(--primary-color); 
    text-decoration-color: var(--primary-color); 
}
/* ======================================================== */

/* ZABEZPIECZENIE 1: Odseparowanie kart z shortcode od stylów artykułu */
.page-content .card {
    font-size: 16px; 
    line-height: 1.6;
    color: #333;
}
.page-content .card img { 
    margin: 0; 
    border-radius: 0; 
}
.page-content .card h3 { 
    margin-top: 0; 
    line-height: 1.15;
}
.page-content .card p { 
    margin-bottom: 15px; 
    font-size: 16px;
    line-height: 1.6;
}

/* ZABEZPIECZENIE 2: Galerie bez marginesów i bez punktatorów */
.page-content .wp-block-gallery img,
.page-content .gallery img {
    margin: 0;
}
.page-content .wp-block-gallery li::before,
.page-content .gallery li::before {
    content: none;
}

/* Przyciski nawigacyjne wpisów */
.post-navigation { display: flex; justify-content: space-between; gap: 25px; margin-top: 50px; padding-top: 30px; border-top: 1px solid #e9ecef; }
.nav-prev, .nav-next { flex: 1; }
.btn-post-nav { display: flex; flex-direction: column; padding: 16px 22px; border-radius: 10px; border: 1px solid #e0e0e0; background: #fdfdfd; transition: all 0.3s ease; }
.btn-post-nav:hover { border-color: var(--primary-color); background: #f4f8fd; transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.btn-post-nav .nav-label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; letter-spacing: 0.5px; }
.btn-post-nav .nav-title { font-size: 15px; font-weight: 600; color: var(--primary-color); }
.btn-post-nav.text-right { text-align: right; align-items: flex-end; }

/* 9. Responsywność */
@media (max-width: 900px) {
    .header-loc, .header-btns { display: none; }
    .header-grid { justify-content: space-between; } 
    
    #mobile-menu-toggle { display: block; background: transparent; border: none; font-size: 26px; color: var(--primary-color); cursor: pointer; outline: none; }

    .glass-menu-wrapper { top: 80px; bottom: auto; padding: 0 15px; opacity: 0; visibility: hidden; transform: translateY(-15px); transition: all 0.3s ease; }
    .glass-menu-wrapper.menu-open { opacity: 1; visibility: visible; transform: translateY(0); }
    .glass-menu { flex-direction: column; height: auto; max-height: calc(100vh - 100px); overflow-y: auto; padding: 20px 25px; border-radius: 0 0 12px 12px; align-items: flex-start; }

    .nav-left { width: 100%; }
    .nav-left > ul { flex-direction: column; width: 100%; gap: 0; }
    .nav-left ul li { width: 100%; padding: 0; }
    .nav-left ul li a { padding: 15px 5px; border-bottom: 1px solid rgba(255,255,255,0.15); display: flex; justify-content: space-between; }
    .nav-left ul li:last-child > a { border-bottom: none; }

    /* Ukrywamy podmenu domyślnie, reagujemy na klasę .submenu-open, dodaną przez JavaScript */
    .nav-left ul ul { position: static; display: none; background: rgba(0,0,0,0.12); box-shadow: none; border: none; min-width: 100%; padding: 5px 0; border-radius: 8px; margin-top: 5px; margin-bottom: 10px; }
    
    .nav-left ul li.menu-item-has-children.submenu-open > ul {
        display: flex;
        animation: fadeInMenu 0.3s ease forwards;
    }
    .nav-left ul li.menu-item-has-children.submenu-open > a::after {
        content: "\f0d7";
        transform: rotate(180deg);
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .nav-left ul ul li a { padding: 12px 20px; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-left ul ul li:last-child > a { border-bottom: none; }

    /* ZAGĘSZCZONA SEKCJA KONTAKTOWA */
    .nav-right { display: flex; flex-direction: column; width: 100%; margin-top: 15px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.25); align-items: center; gap: 10px; }
    .nav-right .sep { display: none; }
    
    .nav-right .social-icons { display: flex; gap: 20px; justify-content: center; width: 100%; margin-bottom: 0; }
    .nav-right .social-icons i { font-size: 24px; }
    
    .nav-right .email-text { display: inline-block; margin-left: 10px; font-weight: 500; }
    .nav-right .contact-email { display: flex; align-items: center; justify-content: center; font-size: 16px; }
    
    .nav-right .contact-phones { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 16px; }
    .nav-right .contact-phones i { font-size: 20px; margin-bottom: 2px; }
    .nav-right a { padding: 2px 5px; } 

    .grid-3, .icons-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 25px; }
    
    /* Adaptacja poziomych kart na tablety */
    .card-horizontal { flex-direction: column; }
    .card-horizontal .card-img-link { width: 100%; }
    .card-horizontal img { height: 240px; aspect-ratio: auto; }
    .card-horizontal .card-content { width: 100%; padding: 25px; }
    
    .page-module { padding: 25px 0; }
    .hero + .page-module { padding-top: 40px; }
    #scroll-to-top { bottom: 20px; right: 20px; }

    .subpage-hero { height: 42vh; min-height: 320px; padding-top: 80px; padding-bottom: 0; }
    .subpage-hero .hero-inner { transform: none; width: 100%; text-align: center; }
}

@media (max-width: 650px) {
    .page-module { padding: 20px 0; }
    .hero + .page-module { padding-top: 30px; }
    .section-blog { padding: 30px 15px; }
    
    .grid-3, .grid-2, .icons-grid, .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    
    .hero h1 { font-size: 32px; }
    .hero h2 { font-size: 18px; }
    .section-title { font-size: 28px; margin-bottom: 30px; }

    .subpage-hero { height: 45vh; min-height: 320px; padding-top: 80px; padding-bottom: 0; }
    .subpage-hero .hero-inner { transform: none; width: 100%; text-align: center; padding: 0 15px; }
    .subpage-title { font-size: 26px; margin-bottom: 8px; text-align: center; }
    .post-meta { font-size: 13px; text-align: center; }

    .post-navigation { flex-direction: column; gap: 15px; }
    .btn-post-nav.text-right { text-align: left; align-items: flex-start; }
}