/* =========================================================================
   VARIABLES & SETUP
   ========================================================================= */
:root {
    /* MOBILE HERO SHIFT */
    --hero-mobile-shift: 200px;
}

@media (max-width: 991px) {
    .subpage-hero {
        padding-top: var(--hero-mobile-shift) !important;
    }
    .contact-minimal {
        padding-top: var(--hero-mobile-shift) !important;
    }
}

:root {
    /* Brand Colors - Refined for 2026 */
    --clr-primary: #ffcc01;
    --clr-secondary: #033072;
    --clr-accent: #0070f3;
    --clr-button: #033072;
    /* Darker for more premium feel */
    --clr-button-hover: #022557;
    --clr-bg: #fcfdfe;
    /* Extremely clean light blue-white */
    --clr-bg-alt: #f1f5fa;
    --clr-text: #111111;
    --clr-text-light: #111111;
    --clr-white: #ffffff;

    /* Typography Hierarchy */
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    /* Unified for modern look */
    --line-height: 1.6;

    /* Layout & Surface */
    --container-width: 85%;
    --container-max: 1400px;
    --border-radius: 20px;
    /* More rounded for modern touch */
    --border-radius-sm: 12px;

    /* Depth & Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 25px 50px -12px rgba(3, 48, 114, 0.1);
    --text-max: 750px;

    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base pro rem (zaručeno min 16px) */
    overflow-x: hidden;
    width: 100%;
    -webkit-text-size-adjust: 100%; /* Fix pro odlišnou velikost mezer a fontů na iOS Safari/mobile */
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--clr-text);
    background-color: var(--clr-bg);
    line-height: var(--line-height);
    text-align: left;
    /* Nikdy do bloku podle zadání */
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    overflow-wrap: break-word; /* Prevents long text from breaking layout */
}

/* =========================================================================
   TYPOGRAPHY
   ========================================================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--clr-secondary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Použití clamp pro dynamické nadpisy */
h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

p {
    font-size: 1.125rem; /* 18px */
    color: var(--clr-text);
    margin-bottom: 1.5rem;
}

@media (max-width: 767px) {
    p {
        font-size: 1.0625rem;
        /* 17px */
    }
}

.text-primary {
    color: var(--clr-primary);
}

.text-secondary {
    color: var(--clr-secondary);
}

.text-white {
    color: var(--clr-white);
}

.bg-primary {
    background-color: var(--clr-primary);
    color: var(--clr-text);
}

.bg-primary-light {
    background-color: rgba(255, 204, 1, 0.1);
}

.bg-secondary {
    background-color: var(--clr-secondary);
    color: var(--clr-white);
}

.bg-white {
    background-color: var(--clr-white);
}

.bg-alt {
    background-color: var(--clr-bg-alt);
}

/* =========================================================================
   LAYOUT & CONTAINERS
   ========================================================================= */
.container {
    width: var(--container-width);
    max-width: var(--container-max);
    margin: 0 auto;
}

.text-content {
    max-width: 70%;
    /* Limit šířky textu na 70% dostupného prostoru (pro desktop) */
}

/* Mobil-first text limit */
@media (max-width: 768px) {
    .text-content {
        max-width: 100%;
    }
}

section {
    padding: 5rem 0;
    overflow-x: clip; /* Modern alternative to hidden that allows vertical overflow (shadows) but clips horizontal */
}

.ambulance-section {
    background-color: var(--clr-bg-alt);
    padding: 8rem 0;
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    overflow-x: clip;
}

.section-header-left {
    text-align: left;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 991px) {
    .section-header-left {
        padding-left: 0;
        text-align: center;
    }
}

.section-desc {
    font-size: 1.125rem;
    color: var(--clr-text);
    max-width: var(--text-max);
    margin-inline: auto;
    text-align: center;
}

@media (max-width: 767px) {
    .section-desc {
        font-size: 1.0625rem;
    }
}

/* Flex & Grid utilities */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-2col {
        grid-template-columns: repeat(2, 1fr);
        /* striktně 2 karty na řádek */
    }
}

.clean-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* =========================================================================
   COMPONENTS
   ========================================================================= */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--clr-button);
    color: var(--clr-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--clr-button-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--clr-white);
    color: var(--clr-secondary);
    border: 1px solid rgba(0, 26, 51, 0.1);
}

.btn-secondary:hover {
    background-color: var(--clr-bg-alt);
    border-color: var(--clr-secondary);
}

.btn-hero-ambulance {
    background-color: var(--clr-secondary);
    color: var(--clr-white);
    border: 1px solid var(--clr-secondary);
    box-shadow: var(--shadow-md);
    font-weight: 700;
}

.btn-hero-ambulance:hover {
    background-color: var(--clr-button-hover);
    border-color: var(--clr-button-hover);
    color: var(--clr-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Glassmorphism Effect - Refined */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-premium);
    padding: 3rem;
    transition: var(--transition);
}

.hover-float {
    transition: var(--transition);
}

.hover-float:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium), 0 10px 20px -5px rgba(0, 0, 0, 0.05);
}

/* Contrast Cards Instead of Glass */
.card-solid-gray,
.card-solid-yellow {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    padding: 2.5rem;
    transition: var(--transition);
}

.card-solid-gray {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-solid-yellow {
    background: #fffcf0;
    border: 1px solid rgba(255, 204, 1, 0.2);
}

/* Icon holders */
.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(3, 48, 114, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--clr-secondary);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.ambulance-card,
.ambulance-detail-card {
    display: flex;
    flex-direction: column;
    padding: 3rem;
    border-radius: var(--border-radius);
    min-width: 0; /* Prevents flex from expanding beyond parent */
}

@media (max-width: 767px) {
    .ambulance-card,
    .ambulance-detail-card {
        padding: 2rem 1.5rem; /* Reduced padding on mobile */
    }
}

main > section:last-of-type {
    padding-bottom: 8rem;
}

@media (max-width: 991px) {
    main > section:last-of-type {
        padding-bottom: 50px;
    }
}

.ambulance-card:hover .card-icon,
.ambulance-detail-card:hover .card-icon {
    background: var(--clr-secondary);
    color: var(--clr-white);
    transform: scale(1.1) rotate(-5deg);
}

.ambulance-card h3 {
    margin-bottom: 1rem;
    font-weight: 700;
}

.ambulance-card p {
    color: var(--clr-text);
    font-size: 1.125rem;
    margin: 0;
}

@media (max-width: 767px) {
    .ambulance-card p {
        font-size: 1.0625rem;
    }
}

.ambulance-detail-card li {
    font-size: 1.125rem;
    color: var(--clr-text);
}

@media (max-width: 767px) {
    .ambulance-detail-card li {
        font-size: 1.0625rem;
    }
}

/* =========================================================================
   HEADER / NAVIGATION
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(3, 48, 114, 0.03) 0%, rgba(3, 48, 114, 0.01) 100%), var(--clr-bg-alt);
    z-index: 1000;

    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar-inner {
    width: 90%;
    max-width: 1600px; /* Increased from 1300px */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    text-decoration: none;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar .logo {
    position: relative;
    z-index: 3;
}

.logo-img {
    height: 105px;
    width: auto;
    filter: none;
    margin: 0 0 -4.5rem; /* Balanced overhang for smaller logo */
    transition: var(--transition);
}

.brand-text {
    font-weight: 800;
    color: var(--clr-secondary); /* Velmi tmavá námořnická modř */
    letter-spacing: -0.02em;
    font-size: 1.5rem;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--clr-secondary);
    font-weight: 400;
}

.nav-links {
    display: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--clr-secondary);
    font-weight: 500;
    font-size: 1.125rem;
    position: relative;
    padding: 0.5rem 0.25rem;
    white-space: nowrap; /* Prevents text from breaking into multiple lines */
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--clr-accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--clr-primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger-menu {
    border: none;
    background: rgba(3, 48, 114, 0.05);
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 1.25rem;
    color: var(--clr-secondary);
    cursor: pointer;
    display: block;
}

.navbar .hamburger-menu {
    position: relative;
    z-index: 3;
}

/* Desktop Nav */
@media (min-width: 1320px) {
    .navbar-inner {
        width: 95%;
        max-width: 2000px;
    }

    .nav-links {
        display: flex;
        gap: 1.75rem;
        align-items: center;
    }

    .nav-links a {
        font-size: 1.0625rem;
    }

    .hamburger-menu {
        display: none;
    }
}

/* =========================================================================
   HERO SECTION (Dental clinic design pattern)
   ========================================================================= */
.hero-section {
    position: relative;
    padding: 6rem 0 12rem; /* Original desktop padding */
    background: linear-gradient(135deg, rgba(3, 48, 114, 0.03) 0%, rgba(3, 48, 114, 0.01) 100%), var(--clr-bg-alt);
    border-radius: 0 0 80px 80px;
    overflow-x: clip; /* Prevents horizontal scroll from entrance animations */
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    text-align: left;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    animation: fadeInUp 0.8s ease-out both;
}

.category-text {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--clr-secondary);
    background: #ffedb3;

    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-content h1 {
    color: var(--clr-secondary);
    margin-bottom: 2rem;
    line-height: 1.1;
    font-weight: 800;
}

.hero-content h1 .text-secondary {
    color: var(--clr-accent);
    display: block;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--clr-text);
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 600px;
}

@media (max-width: 767px) {
    .hero-desc {
        font-size: 1.0625rem;
        margin-bottom: 3.5rem; /* Zvětšeno pro sjednocení s mezerou pod tlačítky */
    }
}

.hero-btns {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    max-width: 100%;
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

.subpage-hero {
    padding: 10rem 0 4rem;
    border-radius: 0 0 50px 50px;
    background: linear-gradient(135deg, rgba(3, 48, 114, 0.03) 0%, rgba(3, 48, 114, 0.01) 100%), var(--clr-bg-alt);
}

.contact-minimal {
    padding-top: 12rem;
    padding-bottom: 8rem;
}


.hero-building {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    object-fit: cover;
    box-shadow: var(--shadow-premium);
}

/* Float cards updated for premium look */




@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(15px); /* Reduced from 30px to minimize overflow risk */
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (min-width: 992px) {
    .hero-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .hero-content {
        flex: 1;
        max-width: 600px; /* Constrain only on desktop side-by-side */
    }

    .hero-image-wrapper {
        flex: 1;
        max-width: 800px; /* Larger photo on wide desktop */
    }
}

/* =========================================================================
   BENTO GRID (Symmetrical)
   ========================================================================= */
.bento-section {
    padding-top: 0;
    margin-top: -4rem;
    /* Overlap with hero */
    position: relative;
    z-index: 30;
}

.bento-section .container {
    max-width: 1000px; /* Narrower container for this section specifically */
}

.bento-item {
    background: var(--clr-white);
    border-radius: 24px;
    padding: 2rem; /* Reduced from 2.5rem */
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(3, 48, 114, 0.03);
    transition: var(--transition);
    min-width: 0; /* Zabrání přetékání CSS gridu podle obsahu */
    max-width: 100%;
}

.grid-3col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (max-width: 991px) { /* Reset to standard tablet breakpoint */
    .bento-item {
        max-width: 600px;
        margin-inline: auto;
        width: 100%;
    }

    .hero-section {
        padding-top: 32rem; /* Massive padding to ensure the gap is doubled */
        padding-bottom: 2rem; /* Sjednoceno s mobilem pro stejný vizuální rytmus */
    }

    .hero-content .category-text {
        margin-top: 4rem; /* Additional push specifically for the tagline */
    }

    .bento-section {
        margin-top: 2rem; /* Zrušení překryvu i na tabletu, sjednoceno s mobilem */
    }
}

@media (max-width: 767px) { /* Scaled down for mobile */
    .hero-container {
        gap: 3.5rem; /* Zvětšeno, aby mezera mezi tlačítky a fotkou byla stejná jako nad tlačítky */
    }
    
    .hero-btns {
        margin-bottom: 0;
        gap: 1.5rem; /* Mírné zvětšení mezery mezi samotnými tlačítky při zalomení */
    }

    .hero-section {
        padding-top: 24rem;
        padding-bottom: 2rem; /* Zmenšeno odsazení od spodku fotky po šedý okraj */
    }

    .hero-content .category-text {
        margin-top: 3rem; 
    }
    
    .bento-section {
        margin-top: 2rem; /* Sjednoceno s padding-bottom nahoře (vzdálenost okraj -> box) */
    }
}

@media (min-width: 992px) {
    .grid-3col {
        grid-template-columns: 1.25fr 1fr 1fr;
        /* Dynamic widths */
    }
}


@media (max-width: 767px) {
    .bento-item {
        padding: 1.5rem; /* Významné zmenšení odsazení na mobilu */
    }
}

.card-solid-yellow {
    background: linear-gradient(135deg, #fff9e6 0%, #ffdf80 100%);
    border: 1px solid rgba(255, 204, 1, 0.4);
}

.card-solid-gray {
    background: var(--clr-white);
}

.bento-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bento-item h3 i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Umožní zalomení, pokud by časy přetékaly */
    gap: 0.25rem 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(3, 48, 114, 0.05);
}

.hours-list li:last-child {
    border-bottom: none;
}

.hours-list span {
    color: var(--clr-text-light);
    font-weight: 500;
}

.hours-list strong {
    color: var(--clr-secondary);
    font-weight: 700;
}

.contact-list li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.contact-list li:last-child {
    border-bottom: none;
}

.contact-label {
    min-width: 100px;
    color: var(--clr-text-light);
    font-size: 1rem;
    font-weight: 500;
}

.contact-sub-sec h3 {
    margin-bottom: 1.5rem;
}

.address-box {
    line-height: 1.8;
}

.contact-link {
    font-size: 1.5rem;
    font-weight: 800;
    margin-left: auto; /* Push to the right on desktop/tablet */
    color: var(--clr-secondary);
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap; /* Phone number stays together */
}

@media (max-width: 767px) {
    .contact-list li {
        gap: 0.25rem 1rem;
    }
    
    .contact-label {
        min-width: 0;
        width: 100%; /* Label takes full width on very small phones to force wrap */
    }

    .contact-link {
        margin-left: 0;
        font-size: 1.15rem;
    }
}

.contact-link:hover {
    color: var(--clr-accent);
    transform: translateX(4px);
}

/* =========================================================================
   TEAM SECTION
   ========================================================================= */
.personnel-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    list-style: none;
    /* pro jistotu */
    font-size: 1.125rem;
}

@media (max-width: 767px) {
    .personnel-list li {
        font-size: 1.0625rem;
    }
}

/* Custom odrážky */
.personnel-list li::before {
    content: "•";
    color: var(--clr-button);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    position: absolute;
    left: 0;
}

.staff-card {
    scroll-margin-top: 7rem;
}

@media (max-width: 991px) {
    .staff-card {
        scroll-margin-top: 13rem;
    }
}

@media (max-width: 767px) {
    .staff-card {
        padding: 1.25rem !important;
        gap: 1.5rem !important;
        width: 100%;
        max-width: 100%;
    }

    .staff-image-col,
    .staff-content-col {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100%;
    }

    .staff-card h2 {
        font-size: clamp(1.5rem, 8vw, 2rem);
        overflow-wrap: anywhere;
    }

    .staff-card p {
        overflow-wrap: anywhere;
    }

    .staff-diplomas {
        gap: 0.75rem !important;
    }

    .staff-diplomas img {
        width: auto;
        max-width: 100%;
        height: 78px !important;
        object-fit: contain;
    }
}

/* Left Aligned Section Detail */
.section-style-left {
    max-width: 800px;
    margin: 0 auto; /* Centrování celého bloku v sekci */
}

.h2-left {
    margin-top: 0;
    margin-bottom: 2rem;
    text-align: left !important;
}

.about-content-left p {
    text-align: left !important;
    margin-bottom: 1.5rem;
}

.lead-text {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--clr-secondary);
    line-height: 1.4;
}

/* CAROUSEL FIXES */
.carousel-container {
    position: relative;
    padding: 2rem 0;
}

.carousel-wrapper {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    gap: 20px;
}

.carousel-card {
    flex: 0 0 100%;
    text-align: center;
    transition: none;
    background: transparent !important;
    /* Force transparent */
    box-shadow: none !important;
    /* Explicitly remove shadow */
    padding: 0 !important;
}

@media (min-width: 768px) {
    .carousel-card {
        flex: 0 0 calc(50% - 10px); /* Fill full width with 20px gap */
    }
}

@media (min-width: 1024px) {
    .carousel-card {
        flex: 0 0 calc(25% - 15px);
    }
}

.team-img-wrapper {
    width: 100%;
    aspect-ratio: 4/5;
    /* Taller rectangular format */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-broz {
    object-position: center 10%; /* Posunutí výřezu nahoru pro MUDr. Brože */
}

/* Remove hover scale */
.carousel-card:hover .team-img-wrapper img {
    transform: none;
}

.carousel-card h4 {
    margin-bottom: 0.25rem;
    color: var(--clr-secondary);
    font-size: 1.1rem;
    font-weight: 700;
}

.carousel-card span {
    color: var(--clr-text-light);
    font-size: 0.875rem;
}

.carousel-btn {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(3, 48, 114, 0.1);
    background: var(--clr-white);
    color: var(--clr-secondary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--clr-secondary);
    color: var(--clr-white);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: -15px; /* Tighter on desktop/tablet */
}

.next-btn {
    right: -15px; /* Tighter on desktop/tablet */
}

/* Na mobilu tlačítka překrývají okraje pro úsporu místa */
@media (max-width: 1024px) {
    .prev-btn {
        left: -22px;
    }

    .next-btn {
        right: -22px;
    }
}

@media (max-width: 576px) {
    .prev-btn {
        left: 5px;
    }

    .next-btn {
        right: 5px;
    }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.main-footer {
    background-color: #033072;
    color: var(--clr-white);
    padding: 6rem 0 0;
    margin-top: -80px; /* Overlap the preceding section to hide background in corners */
    position: relative;
    z-index: 10;
    border-radius: 80px 80px 0 0;
    overflow: hidden; /* Prevent horizontal scroll from curved top */
}

@media (max-width: 991px) {
    .main-footer {
        margin-top: 0 !important;
        padding-top: 5rem;
        border-radius: 60px 60px 0 0;
    }

    .carousel-btn {
        top: 44.5%; /* Corrected lower position for smaller screens */
    }

    .carousel-container {
        padding-bottom: 0; /* Zrušeno pro sjednocení s výškou ostatních sekcí na mobilu */
    }

    section,
    .ambulance-section {
        padding: 4.5rem 0 !important; /* Slightly larger vertical spacing for better airiness */
    }

    .ambulance-detail-section,
    .zakroky-detail-section,
    .piercing-section,
    .cenik-section {
        padding-bottom: 50px !important;
    }
}

.footer-contact-link {
    color: var(--clr-white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact-link:hover {
    color: var(--clr-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-heading {
    color: var(--clr-primary); /* Brighter yellow for better contrast on dark blue */
    font-weight: 800;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.footer-logo {
    margin-bottom: 2rem;
}

.footer-logo .brand-text,
.footer-logo .brand-sub {
    color: var(--clr-white);
}

.footer-logo .brand-sub {
    opacity: 0.7;
}

.footer-col p,
.footer-bottom p {
    color: var(--clr-white); /* Pure white for max contrast */
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.footer-links li::before {
    content: "•";
    color: var(--clr-primary); /* Yellow bullet */
    position: absolute;
    left: 0;
    font-weight: 800;
}

.footer-links li a {
    color: var(--clr-white); /* Pure white */
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.125rem;
}

.footer-links li a:hover {
    color: var(--clr-primary); /* High contrast hover */
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

/* =========================================================================
   COOKIE BANNER
   ========================================================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--clr-white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    padding: 1.5rem 0;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .cookie-content p {
        margin: 0;
    }
}

/* =========================================================================
   MOBILNÍ MENU FIX
   ========================================================================= */
.mobile-nav-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--clr-white);
    padding: 2rem;
    padding-top: calc(4.5rem + 10px); /* Keep logo clear with a subtle ~10px gap above menu items */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.mobile-nav-open a {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
}

.mobile-nav-open a::after {
    display: none !important;
}

.mobile-nav-open a:hover,
.mobile-nav-open a.active {
    color: var(--clr-secondary);
    background-color: rgba(3, 48, 114, 0.08);
}

.mobile-nav-open a.active {
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(3, 48, 114, 0.15);
}

/* =========================================================================
   PRIMARY HERO OVERRIDES (FIX FOR CACHING & SPECIFICITY)
   ========================================================================= */
@media (min-width: 992px) {
    #primary-hero {
        padding-top: 12rem !important;
    }
}

@media (max-width: 991px) {
    #primary-hero {
        padding-top: 100px !important;
    }
}

/* =========================================================================
   CONTENT EXPANSION (ONE-WAY READ MORE)
   ========================================================================= */
.read-more-wrapper {
    display: block;
}

.read-more-wrapper .more-text {
    display: none;
}

.read-more-wrapper.expanded .more-text {
    display: inline;
    animation: fadeInInline 0.5s ease-out both;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: var(--clr-secondary);
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0;
    margin-top: 1rem;
    font-family: var(--font-heading);
    transition: var(--transition);
}

.read-more-btn::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
}

.read-more-btn:hover {
    color: var(--clr-button-hover);
    text-decoration: underline;
}


/* =========================================================================
   AKTUALITY (NEWS) SECTION
   ========================================================================= */
.news-section {
    background-color: var(--clr-bg);
    padding: 6rem 0;
}

.news-wrapper {
    background-color: var(--clr-bg-alt);
    border-radius: 32px;
    padding: 4rem 2rem;
    box-shadow: var(--shadow-premium);
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .news-wrapper {
        padding: 5rem 4rem;
    }
}

@media (max-width: 767px) {
    .news-section .container {
        width: 92%;
    }

    .news-wrapper {
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .news-item {
        padding: 1.25rem;
    }
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 100%;
}

.news-item {
    background: var(--clr-white);
    padding: 2.5rem;
    box-shadow: var(--shadow-premium);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-item-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .news-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 3rem;
    }
    
    .news-item-header {
        flex: 0 0 200px;
    }
}

.news-item-date {
    font-size: 0.875rem;
    color: var(--clr-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-item h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
    color: var(--clr-secondary);
}

.news-item p {
    margin-bottom: 0;
    max-width: 100%;
}

.read-more-wrapper.expanded .read-more-btn {
}

@keyframes fadeInInline {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================================================
   GALLERY & LIGHTBOX
   ========================================================================= */
.gallery-hero {
    padding-bottom: 3rem;
}

.gallery-section {
    padding-top: 4rem;
    padding-bottom: 10rem;
    background: var(--clr-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.gallery-item {
    width: 100%;
    min-width: 0;
    aspect-ratio: 4 / 3;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--clr-bg-alt);
    cursor: zoom-in;
    padding: 0;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-4px);
    box-shadow: var(--shadow-premium);
    outline: none;
}

.gallery-item:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.35), var(--shadow-premium);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.04);
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem;
    background: rgba(0, 0, 0, 0.86);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-image {
    max-width: min(100%, 1400px);
    max-height: calc(100vh - 8rem);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.lightbox-btn {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    color: var(--clr-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.25s ease, transform 0.25s ease;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.06);
    outline: none;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-prev:focus-visible,
.lightbox-next:hover,
.lightbox-next:focus-visible {
    transform: translateY(-50%) scale(1.06);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .gallery-section {
        padding-top: 3rem !important;
    }

    .lightbox {
        padding: 4.5rem 1rem;
    }

    .lightbox-image {
        max-height: calc(100vh - 9rem);
    }

    .lightbox-btn {
        width: 42px;
        height: 42px;
        font-size: 1.05rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }

    .lightbox-prev {
        left: 0.75rem;
    }

    .lightbox-next {
        right: 0.75rem;
    }
}

@media (max-width: 767px) {
    .news-section .container {
        width: var(--container-width) !important;
    }

    .news-wrapper {
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        max-width: none !important;
    }

    .news-list {
        gap: 1rem !important;
    }

    .news-item {
        padding: 1.25rem !important;
        border-radius: 20px !important;
    }

    .cenik-section .card-solid-yellow {
        padding: 1.5rem !important;
    }
}




