/**
 * Layout Styles
 *
 * Grid systém, kontejnery a základní layout stránky
 */

/* ============================================
 * CONTAINER
 * ============================================ */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.container-fluid {
    width: 100%;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ============================================
 * MAIN CONTENT
 * ============================================ */

.main-content {
    min-height: calc(100vh - var(--footer-height));
}

/* ============================================
 * HEADER
 * ============================================ */

.header {
    position: sticky;
    top: 0;
    z-index: var(--z-index-sticky);
    background-color: var(--color-white);
    border-bottom: var(--border-width) solid var(--color-gray-200);
    box-shadow: var(--shadow-sm);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-6);
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: var(--spacing-3) var(--spacing-4);
    color: var(--color-gray-700);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: var(--transition-all);
}

.nav-link:hover {
    color: var(--color-primary);
    background-color: var(--color-gray-50);
    text-decoration: none;
}

.nav-link.active {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}

/* Hamburger menu (mobil) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--color-gray-700);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-all);
}

/* ============================================
 * FOOTER
 * ============================================ */

.footer {
    background-color: var(--color-gray-800);
    color: var(--color-white);
    padding: var(--spacing-8) 0;
    position: relative;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-4);
    text-align: center;
    width: 100%;
}

.footer-text {
    font-size: var(--font-size-sm);
}

.footer-text a {
    color: var(--color-primary-light);
}

.footer-text a:hover {
    color: var(--color-white);
}

.footer-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-2);
    width: 100%;
}

.footer-ico {
    font-size: var(--font-size-sm);
    color: var(--color-gray-400);
}

.footer-credit {
    font-size: var(--font-size-sm);
    color: var(--color-gray-400);
}

.footer-credit a {
    color: var(--color-gray-300);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.footer-credit a:hover {
    color: var(--color-white);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-6);
    right: var(--spacing-6);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-white);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-all);
    z-index: var(--z-index-fixed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 0.7;
    visibility: visible;
}

.back-to-top:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* ============================================
 * HOMEPAGE
 * ============================================ */

.homepage {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.homepage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-8);
    padding: var(--spacing-8);
    position: relative;
    z-index: 1;
}

.service-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.service-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-decoration: none;
    transition: var(--transition-all);
    color: var(--color-white);
    box-shadow: var(--shadow-xl);
}

.service-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2xl);
    text-decoration: none;
}

.service-text-content {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-8);
    text-align: center;
    max-width: 80%;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

/* Barevné pozadí s 90% průhledností */
.service-text-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--theme-color);
    opacity: 0.9;
    z-index: -1;
    border-radius: inherit;
}

.service-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-4);
    color: var(--color-white);
    text-shadow: var(--text-shadow-md);
}

.service-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-white);
    text-shadow: var(--text-shadow-sm);
    margin: 0;
}

/* ============================================
 * SERVICE PAGE
 * ============================================ */

/* Hero Section */
.hero-section {
    min-height: 60vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Změněno z center na flex-start - obsah doleva */
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Změněno z center na flex-start - obsah doleva */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center; /* Text zůstává centrovaný */
    color: var(--color-white);
    padding: var(--spacing-8);
    max-width: 600px; /* Omezení šířky, aby to vypadalo lépe */
}

.hero-title {
    font-size: var(--font-size-5xl);
    margin-bottom: var(--spacing-4);
    color: var(--color-white);
    text-shadow: var(--text-shadow-lg);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-white);
    text-shadow: var(--text-shadow-md);
    margin-bottom: var(--spacing-8);
}

/* Office Hours Table */
.office-hours {
    background-color: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-6);
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    margin: 0 auto;
}

.section-subtitle {
    font-size: var(--font-size-2xl);
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-4);
    text-shadow: none;
}

.hours-table {
    width: 100%;
    margin: 0;
}

.hours-table td {
    padding: var(--spacing-3);
    border-bottom: var(--border-width) solid var(--color-gray-200);
}

.hours-table tr:last-child td {
    border-bottom: none;
}

.hours-table .day {
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-700);
}

.hours-table .hours {
    text-align: right;
    color: var(--color-gray-900);
}

/* Contact & News Section */
.contact-news-section {
    padding: var(--spacing-12) 0;
    background-color: var(--color-gray-50);
}

.three-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-6);
}

.box {
    background-color: var(--color-white);
    padding: var(--spacing-6);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.box-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-4);
    color: var(--color-gray-900);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: var(--spacing-2);
}

.contact-info,
.address-text {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

.contact-item {
    margin-bottom: var(--spacing-3);
}

.contact-item strong {
    display: inline-block;
    min-width: 60px;
}

.map-embed {
    margin-top: var(--spacing-4);
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius-md);
}

.map-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    max-width: 100%;
}

/* ============================================
 * CONTENT SECTIONS
 * ============================================ */

section {
    padding: var(--spacing-12) 0;
}

.section-title {
    font-size: var(--font-size-4xl);
    text-align: center;
    margin-bottom: var(--spacing-8);
    color: var(--color-gray-900);
}

/* Background Types */
.block-bg-none {
    background-color: var(--color-white);
}

.block-bg-color {
    /* Barva bude inline */
}

.block-bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.block-bg-image_overlay {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.block-bg-image_overlay .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.block-bg-image_overlay .container {
    position: relative;
    z-index: 1;
}

/* Service Description Section */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-8);
    align-items: center;
}

.content-wrapper.has-image {
    grid-template-columns: 1fr 1fr;
}

.content-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.content-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    display: block;
}

.content-text.full-width {
    max-width: 800px;
    margin: 0 auto;
}

.text-content {
    line-height: var(--line-height-relaxed);
}

.text-content ul,
.text-content ol {
    margin-left: var(--spacing-4);
}

/* Insurances Section */
.insurances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-6);
    align-items: center;
    justify-items: center;
}

.insurance-item {
    padding: var(--spacing-4);
    background-color: var(--color-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insurance-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.insurance-item img {
    max-width: 120px;
    height: auto;
}

.insurance-name {
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-700);
}

/* About Section */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-8);
    align-items: start;
}

.about-image img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    height: auto;
}

.doctor-name {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-4);
}

.education-title {
    font-size: var(--font-size-xl);
    margin-top: var(--spacing-6);
    margin-bottom: var(--spacing-4);
    color: var(--color-gray-700);
}

.education-list {
    list-style: none;
    padding: 0;
}

.education-list li {
    padding-left: var(--spacing-6);
    position: relative;
    margin-bottom: var(--spacing-3);
}

.education-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-size: var(--font-size-xl);
    line-height: 1;
}

/* ============================================
 * 404 PAGE
 * ============================================ */

.error-page {
    min-height: calc(100vh - var(--footer-height) - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-16) var(--spacing-4);
}

.error-title {
    font-size: var(--font-size-6xl);
    color: var(--color-primary);
    margin-bottom: var(--spacing-4);
}

.error-subtitle {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-4);
}

.error-text {
    font-size: var(--font-size-lg);
    color: var(--color-gray-600);
    margin-bottom: var(--spacing-8);
}

/* ============================================
 * AUTO TEXT COLOR BASED ON BACKGROUND
 * ============================================ */

/**
 * Automatické přizpůsobení barvy textu podle pozadí
 * Tyto třídy jsou dynamicky přidávány JavaScript funkcí
 */

/* Světlý text pro tmavá pozadí */
.text-light,
.text-light .section-title,
.text-light .section-subtitle,
.text-light h1,
.text-light h2,
.text-light h3,
.text-light h4,
.text-light h5,
.text-light h6,
.text-light p,
.text-light li,
.text-light .text-content,
.text-light .doctor-name,
.text-light .education-title {
    color: var(--color-white) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.text-light a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.text-light a:hover {
    color: var(--color-white);
}

/* Tmavý text pro světlá pozadí (výchozí stav) */
.text-dark,
.text-dark .section-title,
.text-dark .section-subtitle,
.text-dark h1,
.text-dark h2,
.text-dark h3,
.text-dark h4,
.text-dark h5,
.text-dark h6,
.text-dark p,
.text-dark li,
.text-dark .text-content,
.text-dark .doctor-name,
.text-dark .education-title {
    color: var(--color-gray-900) !important;
    text-shadow: none;
}

.text-dark a {
    color: var(--color-primary);
}

.text-dark a:hover {
    color: var(--color-primary-dark);
}

/* Speciální styly pro ceník - zachovat primární barvu */
.text-light .price {
    color: var(--color-white) !important;
    font-weight: var(--font-weight-bold);
}

.text-dark .price {
    color: var(--color-primary) !important;
}
