/*
Theme Name: Przedszkole Sióstr Serafitek
Theme URI: https://serafitki.nowytarg.pl/
Author: Twój Software House
Description: Dedykowany motyw dla Przedszkola Sióstr Serafitek w Nowym Targu.
Version: 1.1.1
License: GNU General Public License v2 or later
Text Domain: serafitki
*/

/* =========================================
   1. ZMIENNE I RESET
   ========================================= */

:root {
    --primary-blue: #6B9AC4;
    --accent-yellow: #F4D35E;
    --bg-cream: #F9F7F2;
    --text-dark: #333333;
    --text-light: #ffffff;
    --secondary-blue: #5A82A3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
    /* FIX: Zmieniamy flex na block, aby ukryć ewentualne błędy białych znaków (BOM) */
    display: block; 
    min-height: 100vh;
    position: relative;
    padding-bottom: 0; /* Reset */
}

/* =========================================
   2. NAWIGACJA (LOGO PIECZĘĆ)
   ========================================= */

nav {
    background: white;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 80px;
}

/* FIX: Obsługa paska admina WP */
body.admin-bar nav {
    top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar nav { top: 46px; }
}

.logo { position: relative; }

.logo img, 
.custom-logo-link img {
    position: absolute;
    top: -40px;
    left: 0;
    height: 120px;
    width: auto;
    z-index: 101;
    background: white;
    padding: 10px;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-links ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links ul li a {
    text-decoration: none;
    color: var(--text-dark);
    margin-left: 2rem;
    font-weight: 700;
    transition: color 0.3s;
    display: inline-block;
}

.nav-links ul li a:hover { color: var(--primary-blue); }
.nav-links ul li.current-menu-item a { color: var(--primary-blue); }

.nav-links ul li.btn-nav a {
    background-color: var(--accent-yellow);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    color: var(--text-dark) !important;
    margin-left: 2rem;
}

/* =========================================
   3. SEKCJE GŁÓWNE
   ========================================= */

.hero {
    min-height: 85vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 60px 20px;
    position: relative;
}

.hero-content { max-width: 800px; z-index: 2; }
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; text-shadow: 0 2px 4px rgba(0,0,0,0.2); line-height: 1.2; }
.hero p { font-size: 1.25rem; margin-bottom: 2rem; font-weight: 400; }

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Fredoka', sans-serif;
    transition: transform 0.2s;
    margin: 10px;
    border: none;
    cursor: pointer;
}
.btn:hover { transform: scale(1.05); }
.btn-primary { background-color: var(--accent-yellow); color: var(--text-dark); box-shadow: 0 4px 10px rgba(244, 211, 94, 0.4); }
.btn-outline { background-color: transparent; border: 2px solid white; color: white; }

/* Features */
.features {
    padding: 5rem 10%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}
.card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.card:hover { transform: translateY(-10px); }
.icon-box { font-size: 3rem; margin-bottom: 1rem; color: var(--primary-blue); }
.card h3 { margin-bottom: 1rem; color: var(--secondary-blue); }

/* About */
.about-section { padding: 5rem 10%; display: flex; align-items: center; gap: 4rem; flex-wrap: wrap; }
.about-text { flex: 1; }
.about-img { flex: 1; min-width: 300px; }
.about-img img { width: 100%; border-radius: 20px; box-shadow: 15px 15px 0px var(--accent-yellow); height: auto; }
h2.section-title { color: var(--primary-blue); font-size: 2.5rem; margin-bottom: 1.5rem; }

/* Groups Home */
.groups { background-color: white; padding: 5rem 10%; text-align: center; }
.group-grid { display: flex; justify-content: center; gap: 2rem; margin-top: 3rem; flex-wrap: wrap; }
.group-item {
    background: var(--bg-cream);
    padding: 2rem;
    border-radius: 20px;
    width: 250px;
    border: 2px solid #eee;
    transition: transform 0.3s;
    text-decoration: none;
    color: var(--text-dark);
}
.group-item:hover { transform: translateY(-5px); }
.group-circle {
    width: 80px; height: 80px; background: var(--primary-blue); color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 1rem; overflow: hidden;
}
.group-circle img { width: 100%; height: 100%; object-fit: cover; }

/* News Home */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem; }
.news-card {
    background: white; border-radius: 20px; overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); transition: transform 0.3s, box-shadow 0.3s;
    display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.news-img-link { display: block; height: 200px; overflow: hidden; position: relative; background-color: #eee; }
.news-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-card:hover .news-thumb { transform: scale(1.1); }
.news-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #ccc; background-color: #f4f4f4; }
.news-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.news-meta { font-size: 0.85rem; color: #888; margin-bottom: 0.5rem; font-weight: 700; }
.news-title { font-size: 1.25rem; margin-bottom: 0.8rem; line-height: 1.4; }
.news-title a { text-decoration: none; color: var(--text-dark); transition: color 0.2s; }
.news-title a:hover { color: var(--primary-blue); }
.news-excerpt { font-size: 0.95rem; color: #555; margin-bottom: 1.5rem; flex-grow: 1; }
.read-more-link { text-decoration: none; color: var(--primary-blue); font-weight: bold; font-size: 0.9rem; align-self: flex-start; }

/* =========================================
   4. STOPKA
   ========================================= */

footer {
    background-color: var(--secondary-blue);
    color: white;
    padding: 3rem 10%;
    text-align: center;
    /* FIX: Stopka bez flexboxa na body - proste margin-top */
    width: 100%;
    margin-top: 4rem; 
}

.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; text-align: left; margin-bottom: 2rem; }
.footer-col { flex: 1; min-width: 200px; }
.footer-col h4 { margin-bottom: 1rem; color: var(--accent-yellow); font-size: 1.2rem; }
.footer-col p, .footer-col a { color: white; line-height: 1.8; text-decoration: none; }
.footer-col a:hover { color: var(--accent-yellow); text-decoration: underline; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li a { color: white; text-decoration: none; transition: color 0.2s; }
.copyright { border-top: 1px solid rgba(255,255,255,0.2); padding-top: 2rem; font-size: 0.9rem; font-style: italic; width: 100%; }

/* =========================================
   5. PODSTRONY & UTILS
   ========================================= */

.page-header {
    background: linear-gradient(rgba(107, 154, 196, 0.8), rgba(90, 130, 163, 0.9)), 
                url('https://images.unsplash.com/photo-1503454537195-1dcabb73ffb9?auto=format&fit=crop&w=1920&q=80');
    background-size: cover; background-position: center; padding: 4rem 2rem; text-align: center; color: white; margin-bottom: 2rem;
}
.page-header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }

/* Archive Group */
.archive-grid { margin-top: 0; }
.badge-age { background: var(--bg-cream); border: 1px solid var(--accent-yellow); padding: 2px 10px; border-radius: 10px; font-size: 0.85rem; font-weight: bold; color: var(--secondary-blue); display: inline-block; margin-bottom: 0.5rem; }
.btn-sm { display: inline-block; text-decoration: none; background-color: var(--primary-blue); color: white !important; border-radius: 20px; transition: background 0.3s; }
.btn-sm:hover { background-color: var(--secondary-blue); }

/* Single Group Edu */
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.edu-col { background: var(--bg-cream); padding: 2rem; border-radius: 15px; border: 1px solid #eee; text-align: center; }
.edu-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.edu-col h3 { color: var(--secondary-blue); margin-bottom: 1.5rem; font-size: 1.3rem; border-bottom: 2px solid var(--accent-yellow); display: inline-block; padding-bottom: 5px; }
.edu-content { text-align: left; font-size: 1rem; }
.wierszyk-style { text-align: center; font-style: italic; white-space: pre-line; }
.video-container iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; }

/* Utils */
.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1.5em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1.5em; }
img.alignright, img.alignleft { max-width: 50%; }
.wp-block-button__link { background-color: var(--accent-yellow); color: var(--text-dark) !important; border-radius: 50px; padding: 0.8rem 2rem; text-decoration: none; font-weight: bold; }

/* Responsive */
@media (max-width: 992px) {
    .edu-grid { grid-template-columns: 1fr; gap: 2rem; }
    .entry-content-wrapper { flex-direction: column; }
}

@media (max-width: 768px) {
    nav { height: auto; flex-direction: column; padding: 1rem; }
    .logo img, .custom-logo-link img { position: static; height: 80px; top: auto; left: auto; padding: 0; background: transparent; box-shadow: none; border-radius: 0; margin-bottom: 1rem; }
    .nav-links { width: 100%; }
    .nav-links ul { flex-direction: column; align-items: center; }
    .nav-links ul li a { margin-left: 0; margin-bottom: 1rem; display: block; }
    .nav-links ul li.btn-nav a { margin-left: 0; }
    .hero h1 { font-size: 2.5rem; }
    .features { margin-top: 2rem; padding: 2rem 5%; }
    .about-section { flex-direction: column-reverse; padding: 3rem 5%; }
    .footer-content { flex-direction: column; text-align: center; }
}