/* =====================
    Global Styles
    ===================== */
:root {
    --primary-color: #2980b9;
    --secondary-color: #3498db;
    --accent-color: #f39c12;
    --light-gray-color: #f8f9fa;
    --medium-gray-color: #e9ecef;
    --dark-gray-color: #6c757d;
    --text-color: #343a40;
    --white-color: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --border-radius: 8px;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    --header-height-desktop: 80px;
    --header-height-mobile: 70px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white-color);
    overflow-x: hidden;
    padding-top: var(--header-height-desktop);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    line-height: 1.3;
}
h1 { font-size: 2.8rem; }
h2 {
    font-size: 2.2rem; text-align: center; margin-bottom: 2.5rem;
    position: relative; padding-bottom: 1rem;
}
h2::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%); width: 80px; height: 4px;
    background-color: var(--secondary-color); border-radius: 2px;
}
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; color: var(--secondary-color); }
p { margin-bottom: 1rem; font-size: 1.05rem; }
a {
    color: var(--secondary-color); text-decoration: none;
    transition: color var(--transition-speed) ease;
}
a:hover { color: var(--primary-color); text-decoration: underline; }

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: block;
}

ul, ol { margin-bottom: 1rem; padding-left: 20px; }

/* =====================
    Header & Navigation
    ===================== */
header {
    background-color: var(--white-color);
    padding: 0;
    min-height: var(--header-height-desktop);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo h1 { font-size: 1.8rem; margin: 0; color: var(--primary-color); }
.logo p { font-size: 0.85rem; margin: 0; color: var(--dark-gray-color); }

nav#mainNav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

nav#mainNav a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    padding: 0.5rem 0;
    position: relative;
    display: block;
}

nav#mainNav a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 3px; background-color: var(--secondary-color);
    transition: width var(--transition-speed) ease;
}
nav#mainNav a:hover::after, nav#mainNav a.active::after { width: 100%; }
nav#mainNav a.active { color: var(--secondary-color); }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 35px;
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* =====================
    Main Content & Specific Sections
    ===================== */
main { /* padding-top jest na body */ }
section { padding: 4rem 0; }
section.bg-light { background-color: var(--light-gray-color); }
section.bg-primary-light { background-color: #eaf5ff; }

/* Hero Section - ZMIANA ZGODNIE Z OPCJĄ A */
.hero {
    /* Używamy dwóch warstw tła: gradientu i obrazu */
    background-image: linear-gradient(rgba(41, 128, 185, 0.7), rgba(52, 152, 219, 0.7)), url('img/zdrowezeby.jpg');
    background-repeat: no-repeat, no-repeat; /* dla każdej warstwy */
    background-position: center center, center center; /* dla każdej warstwy */
    background-size: cover, contain; /* gradient pokrywa, obraz jest 'contain' */
    
    color: var(--white-color);
    padding: 6rem 0; /* Można dostosować padding, jeśli 'contain' zmniejszy optycznie wysokość */
    text-align: center;
    min-height: 70vh; /* Możesz eksperymentować ze zwiększeniem, np. 80vh, 85vh */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative; /* Ważne, jeśli będziesz dodawać pseudo-elementy */
}

.hero-content { 
    max-width: 800px; 
    animation: fadeInDown 1s ease-out;
    position: relative; /* Upewnienie się, że treść jest nad tłem */
    z-index: 2;
}
.hero h2 { 
    font-size: 3.5rem; 
    color: var(--white-color); 
    margin-bottom: 1rem; 
    font-weight: 700; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3); 
}
.hero h2::after { background-color: var(--accent-color); }
.hero .subtitle { font-size: 1.5rem; margin-bottom: 2rem; font-weight: 300; line-height: 1.6; }

.cta-button { display: inline-block; background-color: var(--accent-color); color: var(--white-color); padding: 1rem 2.5rem; border-radius: 50px; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; text-transform: uppercase; text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease; }
.cta-button:hover { background-color: #e68a00; transform: translateY(-3px); text-decoration: none; color: var(--white-color); }
.cta-button.secondary { background-color: var(--secondary-color); }
.cta-button.secondary:hover { background-color: var(--primary-color); }

.page-intro { background-color: var(--secondary-color); color: var(--white-color); padding: 3rem 0; text-align: center; margin-bottom: 3rem; }
.page-intro h2 { color: var(--white-color); margin-bottom: 0.5rem; }
.page-intro h2::after { display: none; }
.page-intro .subtitle { font-size: 1.2rem; opacity: 0.9; max-width: 700px; margin: 0 auto; }

/* About Short Section (na stronie głównej) */
.about-short { padding: 4rem 0; }
.about-short-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.about-image {
    flex-shrink: 0;
    max-width: 300px; 
    width: 100%;     
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.about-text {
    flex-grow: 1;
    min-width: 0; 
}

.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 2rem; }
.service-box { background-color: var(--white-color); padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--shadow); text-align: center; transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease; }
.service-box:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.service-box .service-icon { font-size: 3rem; color: var(--secondary-color); margin-bottom: 1rem; }
.service-box h4 { margin-bottom: 0.8rem; font-size: 1.5rem; }
.service-box p { font-size: 0.95rem; margin-bottom: 1.2rem; color: var(--dark-gray-color); }
.service-box a { display: inline-block; padding: 0.6rem 1.2rem; background-color: var(--secondary-color); color: var(--white-color); border-radius: 20px; font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.service-box a:hover { background-color: var(--primary-color); color: var(--white-color); }

.contact-quick { text-align: center; padding: 4rem 0; }
.contact-quick p { font-size: 1.1rem; margin-bottom: 0.8rem; }
.contact-quick .cta-button { margin-top: 1.5rem; }

.doctor-profile { padding: 3rem 0; }
.profile-content { display: flex; flex-direction: column; align-items: center; gap: 2.5rem; text-align: center; }
.profile-content .profile-image.large {
    width: 280px; height: 280px; max-width: 100%;
    object-fit: cover; border-radius: 50%;
    box-shadow: 0 0 0 8px var(--white-color), var(--shadow); margin-bottom: 1rem;
}
.profile-text { max-width: 800px; margin: 0 auto; text-align: left; }
.profile-text p { font-size: 1.1rem; line-height: 1.8; }

.clinic-description { padding: 3rem 0; }
.clinic-description .section-image.large {
    width: 100%; max-width: 600px; height: auto;
    margin: 2rem auto; box-shadow: var(--shadow);
}

.service-detail { padding: 2rem 0 4rem 0; }
.service-detail .container > h3 { text-align: center; font-size: 2rem; margin-bottom: 2.5rem; }
.service-detail .section-image {
    width: 100%; max-width: 500px; height: auto;
    margin: 0 auto 2rem auto; border: 5px solid var(--white-color); box-shadow: var(--shadow);
}
.service-detail ul { list-style: none; padding-left: 0; }
.service-detail ul li { padding-left: 1.5rem; position: relative; margin-bottom: 0.8rem; }
.service-detail ul li::before { content: '\2713'; position: absolute; left: 0; color: var(--secondary-color); font-weight: bold; }

.price-list table { width: 100%; border-collapse: collapse; margin-top: 2rem; box-shadow: var(--shadow); border-radius: var(--border-radius); overflow: hidden; }
.price-list th, .price-list td { padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--medium-gray-color); }
.price-list th { background-color: var(--primary-color); color: var(--white-color); font-family: var(--font-heading); font-weight: 600; font-size: 1.1rem; }
.price-list tr:nth-child(even) { background-color: var(--light-gray-color); }
.price-list tr:last-child td { border-bottom: none; }
.price-list td:last-child { font-weight: bold; color: var(--secondary-color); text-align: right; }
.price-list .cta-button { display: block; width: fit-content; margin: 2.5rem auto 0 auto; }

.contact-section .container { text-align: center; }
.contact-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; text-align: left; }
.contact-details, .opening-hours { background-color: var(--light-gray-color); padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--shadow); }
.contact-details h4, .opening-hours h4 { margin-bottom: 1.5rem; text-align: center; color: var(--primary-color); }
.contact-details p, .opening-hours ul li { margin-bottom: 0.8rem; font-size: 1.05rem; }
.contact-details strong { color: var(--primary-color); }
.opening-hours ul { list-style: none; padding: 0; }
.opening-hours li { border-bottom: 1px dashed var(--medium-gray-color); padding-bottom: 0.8rem; }
.opening-hours li:last-child { border-bottom: none; }
.map-container { width: 100%; height: 450px; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 2rem; }
.map-container iframe { width: 100%; height: 100%; border: 0; }

footer { background-color: var(--text-color); color: var(--light-gray-color); padding: 3rem 0; text-align: center; margin-top: 3rem; }
footer .container p { margin-bottom: 0.5rem; font-size: 0.9rem; }
footer a { color: var(--secondary-color); }
footer a:hover { color: var(--white-color); }

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.reveal-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; } .mb-3 { margin-bottom: 3rem; }

/* =====================
    Responsive Design
   ===================== */
@media (max-width: 992px) {
    .hero h2 { font-size: 2.8rem; }
    .hero .subtitle { font-size: 1.3rem; }
    .about-short-content { flex-direction: column; text-align: center; }
    .about-image { margin: 0 auto 2rem auto; max-width: 400px; }
    .profile-content .profile-image.large { width: 220px; height: 220px; }
    .clinic-description .section-image.large { max-width: 90%; }
    .service-detail .section-image { max-width: 90%; }
}

@media (max-width: 768px) {
    body { padding-top: var(--header-height-mobile); }
    header { min-height: var(--header-height-mobile); }
    header .container { position: relative; }

    .logo { flex-grow: 1; margin-right: 1rem; text-align: left; }
    .logo h1 { font-size: 1.4rem; }
    .logo p { font-size: 0.7rem; }

    .menu-toggle { display: flex; }

    nav#mainNav {
        display: none; position: absolute;
        top: var(--header-height-mobile); left: 0; width: 100%;
        background-color: var(--white-color);
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
        border-top: 1px solid var(--medium-gray-color);
    }
    nav#mainNav.menu-opened { display: block; }
    nav#mainNav ul { flex-direction: column; width: 100%; gap: 0; }
    nav#mainNav ul li { text-align: center; width: 100%; border-bottom: 1px solid var(--medium-gray-color); }
    nav#mainNav ul li:last-child { border-bottom: none; }
    nav#mainNav a { width: 100%; display: block; padding: 1rem; color: var(--text-color); }
    nav#mainNav a:hover, nav#mainNav a.active { background-color: var(--light-gray-color); color: var(--primary-color); }
    nav#mainNav a::after { display: none; }

    /* Hero section na mobilnych */
    .hero { padding: 4rem 0; min-height: 50vh; /* Mniejsza wysokość na mobilnych */ }
    .hero h2 { font-size: 2.0rem; /* Mniejszy tekst */ }
    .hero .subtitle { font-size: 1.0rem; }


    h1 { font-size: 2.0rem; } /* Ogólne H1 */
    h2 { font-size: 1.6rem; margin-bottom: 1.5rem; } /* Ogólne H2 */

    .cta-button { font-size: 0.9rem; padding: 0.7rem 1.8rem; }
    .service-grid { grid-template-columns: 1fr; }
    .contact-info-grid { grid-template-columns: 1fr; }
    .map-container { height: 300px; }
    .price-list th, .price-list td { padding: 0.7rem; font-size: 0.85rem; }
    .price-list td:last-child { font-size: 0.9rem; }
    .profile-content .profile-image.large { width: 180px; height: 180px; }
    .about-image { max-width: 350px; }
    .clinic-description .section-image.large,
    .service-detail .section-image { border-width: 3px; }
}

@media (max-width: 480px) {
    .logo h1 { font-size: 1.2rem; }
    .logo p { display: none; }

    .hero { min-height: 60vh; padding: 3rem 0; } /* Dalsze dostosowanie wysokości hero */
    .hero h2 { font-size: 1.8rem; }
    .hero .subtitle { font-size: 0.9rem; }

    .page-intro { padding: 1.5rem 0; }
    .page-intro h2 { font-size: 1.4rem; }
    .page-intro .subtitle { font-size: 0.9rem; }
    section { padding: 2rem 0; }
    .profile-content .profile-image.large { width: 150px; height: 150px; }
    .about-image { max-width: 100%; }
    .clinic-description .section-image.large,
    .service-detail .section-image {
        max-width: 100%; border: none;
        padding-left: 0; padding-right: 0;
    }
    .map-container { height: 250px; }
}


/* === Kafelki usług (6) + ikony SVG (jednolity wygląd na całej stronie) === */
.service-grid--six{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px){
  .service-grid--six{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px){
  .service-grid--six{ grid-template-columns: 1fr; }
}
.service-box .service-icon{
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: #f6f9ff;
  border: 1px solid #e6eefc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
}
.service-box .service-icon svg{
  width: 40px;
  height: 40px;
  display: block;
}
