/* =========================================
   ZÁKLADNÍ NASTAVENÍ A BARVY
   ========================================= */
:root {
    --accent-color: #D6AD3F; 
    --accent-light: #F4EBD0; 
    --accent-hover: #B89028;
    
    --bg-color: #FFFCF7; 
    --text-color: #3D3D3D;
    --text-light: #666666;
    --dark-bg: #222222;
    --white: #FFFFFF;
    
    --font-main: 'Raleway', sans-serif;
    --font-heading: 'Raleway', sans-serif; 
    
    --container-width: 1200px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    font-weight: 400;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: #1A1A1A;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 700; 
}

/* --- GLOBÁLNÍ VYPNUTÍ PODTRŽENÍ ODKAZŮ --- */
a, .btn, .btn-outline, .nav-links a {
    text-decoration: none !important;
    color: inherit;
    transition: var(--transition);
}

a:hover, .btn:hover, .btn-outline:hover {
    text-decoration: none !important;
}

/* =========================================
   UI PRVKY
   ========================================= */
.btn {
    display: inline-block;
    padding: 16px 45px;
    background-color: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    border-radius: 4px;
    border: 2px solid var(--accent-color);
}

.btn:hover {
    background-color: transparent;
    color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--dark-bg);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 25px;
}

.section-padding {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px auto;
}

.section-header h2 {
    font-size: 2.8rem;
}

/* =========================================
   HEADER & NAVIGACE
   ========================================= */
header {
    padding: 20px 0;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
}

nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
}

.logo {
    justify-self: start; 
    font-family: 'Bodoni Moda', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.5px;
    white-space: nowrap; 
}

.nav-links {
    justify-self: center; 
    display: flex;
    gap: 30px; 
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-header {
    justify-self: end; 
    background-color: var(--white);
    color: var(--text-color) !important;
    border-color: var(--white);
    padding: 12px 30px; 
    font-size: 0.8rem;
}

.btn-header:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white) !important;
}

/* =========================================
   HERO SEKCE (Hlavní a Podstránky)
   ========================================= */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-image: url('https://media.allure.com/photos/5d935e0dfe76f10009bfd63a/16:9/w_2864,h_1611,c_limit/therapy.jpg');
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(40, 35, 20, 0.4); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.subtitle {
    display: block;
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--accent-color);
    font-weight: 700;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 30px;
    color: var(--white);
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
}

.subpage-hero {
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-image: url('https://media.allure.com/photos/5d935e0dfe76f10009bfd63a/16:9/w_2864,h_1611,c_limit/therapy.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    color: var(--white);
    margin-bottom: 50px;
}

.subpage-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.subpage-hero p {
    font-size: 1.2rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
    color: var(--accent-color); 
}

/* =========================================
   SEKCE O MNĚ
   ========================================= */
.about-section {
    background-color: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-img-wrapper { position: relative; }

.about-img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 4px;
    position: relative;
    z-index: 1;
}

.about-img-wrapper::before {
    content: '';
    position: absolute;
    top: -20px; left: -20px;
    width: 100%; height: 100%;
    border: 2px solid var(--accent-color);
    z-index: 0;
    border-radius: 4px;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 30px;
}
/* Zarovnání textu do bloku v sekci O mně */
.about-text p {
    text-align: justify;
    
    /* Povolení automatického dělení slov pro hezčí vzhled bloku */
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* =========================================
   SLUŽBY - PŘETÁČECÍ KARTY (KOMPLETNÍ OPRAVA)
   ========================================= */

.services-flip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    justify-items: center;
}

/* 1. Hlavní obal karty - určuje velikost */
.flip-card-wrapper {
    background-color: transparent;
    width: 100%;
    max-width: 400px;
    height: 420px; /* Pevná výška je NUTNÁ pro funkční 3D efekt */
    perspective: 1000px;
}

/* 2. Vnitřní mechanika přetáčení */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Spouštěč otočení */
.flip-card-wrapper.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* 3. Společné vlastnosti pro obě strany (Zabrání obřím kartám!) */
.flip-card-front, 
.flip-card-back {
    position: absolute !important; /* Toto zajistí, že strany leží PŘES SEBE */
    top: 0; left: 0;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden; /* Aby tmavý filtr nepřetékal */
}

/* --- PŘEDNÍ STRANA SLUŽEB (Bílé pozadí pro ilustrace) --- */
.flip-card-front {
    background-color: var(--white) !important; /* Čistě bílé pozadí */
    
    /* Nastavení pro vaše obrázky - 'contain' zaručí, že nebudou oříznuté */
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    
    border: 2px solid var(--accent-light);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* ÚPLNÉ ODSTRANĚNÍ TMAVÉHO FILTRU */
.flip-card-front::after {
    display: none !important;
}

/* Zajištění, že text a šipka budou na bílém pozadí vidět */
.flip-card-front h3, 
.flip-card-front .flip-btn-toggle {
    position: relative;
    z-index: 2;
}

.flip-card-front h3 {
    font-size: 1.6rem;
    color: var(--text-color) !important; /* Tmavý text místo bílého */
    margin-bottom: 20px;
    text-shadow: none !important; /* Zrušení stínu, na bílé není potřeba */
    text-align: center;
    
    /* Pojistka: poloprůhledný bílý podklad pod textem, 
       kdyby ilustrace zasahovala až za písmena */
    background-color: rgba(255, 255, 255, 0.85);
    padding: 5px 15px;
    border-radius: 8px;
}

.flip-card-front .flip-btn-toggle {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 45px; height: 45px;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    cursor: pointer;
    transition: var(--transition);
}

.flip-card-front .flip-btn-toggle:hover {
    background: var(--dark-bg);
    color: var(--white);
    transform: scale(1.1);
}
/* --- ZADNÍ STRANA (Texty bez zrcadlení!) --- */
.flip-card-back {
    background-color: var(--accent-color);
    color: var(--white);
    /* TOTO ZABRÁNÍ ZRCADLENÍ TEXTU: */
    transform: rotateY(180deg); 
    text-align: left;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    /* Povolí scrollování, pokud je text moc dlouhý */
    overflow-y: auto; 
}

/* Vzhled posuvníku na zadní straně karet */
.flip-card-back::-webkit-scrollbar { width: 6px; }
.flip-card-back::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 4px; }
.flip-card-back::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.4); border-radius: 4px; }

/* Formátování textu na zadní straně */
.flip-card-back h4 {
    color: var(--white);
    font-size: 1.05rem;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 700;
}
.flip-card-back h4:first-child { margin-top: 0; }

.flip-card-back p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.95);
    margin-bottom: 5px;
}

.service-list {
    list-style: none;
    padding: 0; margin: 0;
}
.service-list li {
    font-size: 0.85rem;
    margin-bottom: 5px;
    position: relative;
    padding-left: 15px;
    line-height: 1.4;
}
.service-list li::before {
    content: '•';
    position: absolute; left: 0; color: var(--white);
}

.flip-card-back .back-btn {
    background: var(--white);
    color: var(--accent-color) !important;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    align-self: center;
    flex-shrink: 0;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.flip-card-back .back-btn:hover {
    background: var(--dark-bg);
    color: var(--white) !important;
}

/* =========================================
   FAQ - NOVÝ DESIGN (MŘÍŽKA S VYSKAKOVACÍM OKNEM)
   ========================================= */

.faq-grid {
    display: grid;
    /* Krásná mřížka, která se na mobilu automaticky přeskládá pod sebe */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.faq-card {
    background: var(--white);
    border: 2px solid var(--accent-light);
    border-radius: 12px;
    padding: 35px 30px;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.faq-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transform: translateY(-5px);
}

.faq-card .count {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    color: var(--accent-color);
    opacity: 0.3;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1;
}

.faq-card h3 {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.btn-read-more {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: auto; /* Zaručí, že tlačítko bude vždy dole */
    transition: var(--transition);
    padding: 0;
}

.btn-read-more:hover {
    color: var(--text-color);
}

/* =========================================
   VYSKAKOVACÍ OKNO (MODAL) PRO FAQ
   ========================================= */

.faq-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Ztmavení pozadí */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

/* Třída, kterou přidává JavaScript pro zobrazení okna */
.faq-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.faq-modal-box {
    background-color: var(--white);
    width: 90%;
    max-width: 800px;
    max-height: 85vh; /* Zaručí, že okno nepřeteče obrazovku */
    border-radius: 12px;
    padding: 50px;
    position: relative;
    transform: translateY(30px);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.faq-modal-overlay.active .faq-modal-box {
    transform: translateY(0);
}

.faq-modal-close {
    position: absolute;
    top: 20px; right: 25px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.faq-modal-close:hover {
    color: var(--accent-color);
}

.faq-modal-box h3 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 30px;
    padding-right: 40px; /* Aby nadpis nelezl do křížku */
    border-bottom: 2px solid var(--accent-light);
    padding-bottom: 15px;
}

/* Scrollovací oblast pro text */
.faq-modal-body {
    overflow-y: auto;
    padding-right: 15px; /* Místo pro posuvník */
}

.faq-modal-body p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Vzhled posuvníku v okně */
.faq-modal-body::-webkit-scrollbar {
    width: 8px;
}
.faq-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.faq-modal-body::-webkit-scrollbar-thumb {
    background: var(--accent-light);
    border-radius: 4px;
}
.faq-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

@media (max-width: 768px) {
    .faq-modal-box { padding: 30px 20px; }
    .faq-modal-box h3 { font-size: 1.5rem; }
    .faq-modal-body p { font-size: 0.95rem; }
}

/* =========================================
   VZDĚLÁNÍ SEKCE
   ========================================= */
.education-section {
    background-color: var(--accent-light);
}

.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 40px;
}

.edu-column h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    border-bottom: 2px solid rgba(214, 173, 63, 0.3);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.edu-list {
    list-style: none;
}

.edu-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
    font-size: 0.95rem;
    color: var(--text-color);
}

.edu-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* =========================================
   CITÁT & BLOG
   ========================================= */
.quote-section {
    background-image: url('https://i.pinimg.com/1200x/ca/c4/e1/cac4e1bb1d7fdf8904779e06ca86d87a.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    padding: 150px 0;
    position: relative;
    text-align: center;
}

.quote-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
}

.quote-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.quote-content h3 {
    font-size: 2.2rem;
    font-style: italic;
    color: var(--white);
    line-height: 1.5;
}

.blog-section {
    background-color: var(--white);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.blog-card {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.blog-img {
    height: 240px;
    background-size: cover;
    background-position: center;
}

.blog-text {
    padding: 30px;
}

.blog-meta {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    font-weight: 700;
    color: var(--accent-color) !important;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.read-more:hover { color: var(--text-color) !important; }

/* =========================================
   SOS BANNER & KONTAKT
   ========================================= */
.sos-banner {
    background-image: url('sos-bg.jpg'); 
    background-size: cover; 
    background-position: center;
    background-color: #A63D40; 
    color: white; 
    padding: 60px 20px; 
    text-align: center;
}

.sos-banner h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 2rem;
}

.sos-banner a {
    color: white !important;
    font-weight: bold;
    text-decoration: underline !important;
}

.sos-banner a:hover {
    color: var(--accent-color) !important;
    text-decoration: none !important;
}

.contact-section {
    background-color: var(--dark-bg);
    color: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info h2 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 40px;
}

.contact-detail {
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-icon {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.form-group { margin-bottom: 20px; }

input, textarea {
    width: 100%;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-family: var(--font-main);
    font-size: 1rem;
    border-radius: 4px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

button[type="submit"] {
    cursor: pointer;
    width: 100%;
}

footer {
    background-color: #1a1a1a;
    color: #888;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Oprava barvy textu u kontaktních údajů */
.contact-detail h4 {
    color: var(--white) !important; /* Bílý nadpis */
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-detail p {
    color: rgba(255, 255, 255, 0.7) !important; /* Světle šedý text adresy a telefonu */
    line-height: 1.5;
    margin-bottom: 0;
}

/* Ladění mapy na mobilu */
@media (max-width: 950px) {
    .map-wrapper iframe {
        height: 300px; /* Na mobilu dáme mapě trochu víc místa do výšky */
    }
}
/* =========================================
   ANIMACE A TWEETY
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.floating-note {
    position: fixed;
    z-index: 1000; 
    background-color: var(--accent-color); 
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(214, 173, 63, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 300px; 
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none; 
}

.floating-note.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.tweet-header {
    display: flex;
    align-items: center; 
    margin-bottom: 10px;
}

.tweet-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    background-image: url('https://images.squarespace-cdn.com/content/v1/611317c4b0070247030f7fc3/1726872908361-C31OKTIV6BTPE10MFP2L/unsplash-image-jkZs3Oi9pq0.jpg');
    background-size: cover;
    border: 2px solid rgba(255,255,255,0.3); 
}

.tweet-user-info {
    display: flex;
    flex-direction: column;
}

.tweet-name {
    font-weight: 700;
    color: #FFFFFF; 
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.tweet-verified {
    display: inline-block;
    width: 14px; height: 14px;
    background-color: #FFFFFF;
    color: var(--accent-color); 
    border-radius: 50%;
    margin-left: 5px;
    text-align: center;
    line-height: 14px;
    font-size: 9px;
    font-weight: bold;
}

.tweet-text {
    font-size: 1rem;
    color: #FFFFFF; 
    line-height: 1.4;
    font-weight: 500;
}

#global-scroll-lines {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 50; 
    pointer-events: none; 
    overflow: hidden; 
    mix-blend-mode: multiply;
}

/* =========================================
   RESPONSIVITA
   ========================================= */
@media (max-width: 950px) {
    nav { display: flex; justify-content: space-between; }
    .nav-links { display: none; }
    .logo { font-size: 1.5rem; }
    
    .hero h1 { font-size: 2.8rem; }
    .about-grid, .contact-wrapper, .edu-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-img { height: 400px; order: -1; }
    
    .container { padding: 0 20px; }
    .section-padding { padding: 80px 0; }
    
    #faq { padding: 60px 0; }
    .faq-batch { gap: 20px; }
    .stack-cards__item .inner { padding: 30px 20px; }
    .stack-cards__item .count { font-size: 2rem; top: 15px; right: 15px; }
}

/* =========================================
   FINÁLNÍ OPRAVY PRO MOBILNÍ ZOBRAZENÍ
   ========================================= */

/* 1. Oprava zamrznutého scrollování na zadní straně karet (Apple/iOS bug) */
.flip-card-back {
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    padding-bottom: 40px !important; /* Více místa dole, aby se dalo dojet až na konec textu */
}

/* 2. Oprava čitelnosti SOS banneru (ztlumení obrázku v pozadí) */
.sos-banner {
    /* Přidá přes váš obrázek 85% červenou vrstvu, takže nápisy na pozadí nebudou rušit */
    background-image: linear-gradient(rgba(166, 61, 64, 0.85), rgba(166, 61, 64, 0.85)), url('sos-bg.jpg') !important;
    background-size: cover;
    background-position: center;
    position: relative;
}
.sos-banner h3, .sos-banner span, .sos-banner a {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Lehké stínování pro maximální čitelnost */
}

/* 3. Specifické ladění pro mobily (do 950px) */
@media (max-width: 950px) {
    /* Úvodní sekce - posunutí textu dolů pod tlačítko */
    .hero {
        padding-top: 120px !important; 
    }
    .hero h1 {
        font-size: 2.2rem !important; 
        line-height: 1.2 !important;
        margin-top: 20px !important;
    }
    .hero p {
        font-size: 1.05rem !important;
    }

    /* Služby - oprava šířky a oříznutých krajů */
    .services-flip-grid {
        padding: 0 10px !important;
        gap: 20px !important;
    }
    .flip-card-wrapper {
        max-width: 100% !important; /* Karta se přizpůsobí šířce mobilu */
        width: 100% !important;
        height: 480px !important; /* Na mobilu dáme kartě trochu víc místa do výšky */
    }
    
    /* Větší tlačítko pro snazší klikání prstem */
    .flip-btn-toggle {
        width: 55px !important;
        height: 55px !important;
        font-size: 1.5rem !important;
    }
}

/* =========================================
   AGRESIVNÍ OPRAVA PRO MOBIL (ÚVOD + SOS BANNER)
   ========================================= */

/* --- 1. OPRAVA SOS BANNERU --- */
.sos-banner {
    /* Překryjeme váš obrázek 95% neprůhlednou červenou barvou. 
       Obrázek bude jen velmi jemně prosvítat a text bude perfektně čitelný. */
    background-image: linear-gradient(rgba(166, 61, 64, 0.95), rgba(166, 61, 64, 0.95)), url('sos-bg.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    padding: 60px 20px !important;
}

.sos-banner h3, .sos-banner span, .sos-banner a {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6) !important; /* Přidá textu silnější stín, aby vystoupil */
    position: relative;
    z-index: 2;
}

.sos-banner h3 {
    font-size: 1.8rem !important;
    margin-bottom: 15px !important;
    display: block !important;
}


/* --- 2. OPRAVA ÚVODU A HLAVIČKY (Zabránění překrývání na mobilu) --- */
@media (max-width: 950px) {
    /* Zmenšíme hlavičku, aby nezabírala tolik místa na malém displeji */
    header {
        padding: 10px 15px !important;
        background: rgba(0,0,0,0.8) !important; /* Ztmavíme hlavičku pro lepší čitelnost loga */
    }
    
    nav {
        align-items: center !important;
    }

    .logo {
        font-size: 1.2rem !important;
    }

    .btn-header {
        padding: 8px 15px !important;
        font-size: 0.75rem !important;
    }

    /* Natvrdo odsadíme hlavní text odshora, aby do něj hlavička nenarážela */
    .hero {
        align-items: flex-start !important; /* Zrušíme centrování, aby šel text posouvat */
        padding-top: 150px !important; /* Obrovská mezera od shora zaručí, že se text s ničím nesrazí */
    }

    .hero-content {
        margin-top: 0 !important;
    }

    .hero h1 {
        font-size: 2.3rem !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }

    .hero p {
        font-size: 1.1rem !important;
        margin-bottom: 30px !important;
    }
}

/* =========================================
   FINÁLNÍ ČIŠTĚNÍ A OPRAVY PRO MOBIL (950px)
   ========================================= */
@media (max-width: 950px) {

    /* --- 1. OPRAVA ROZBITÉHO POZADÍ ÚVODU (Parallax bug) --- */
    /* Vypneme 'fixed' pozadí, které na mobilech zlobí. 
       Fotka se bude normálně rolovat se stránkou. */
    .hero {
        background-attachment: scroll !important;
        background-position: center center !important;
    }


    /* --- 2. OSEKÁNÍ WEBU - ODSTRANĚNÍ PRVKŮ NA TELEFONU --- */

    /* Odstranění plovoucích poznámek / "žluté fotky" (Fotka 1) */
    /* Skryjeme obal pro motivační tweety i pro případné čáry na pozadí */
    .floating-note,
    #global-scroll-lines,
    #faq-bg-canvas {
        display: none !important;
    }

    /* Odstranění celé sekce s citátem (Fotka 3) */
    .quote-section {
        display: none !important;
    }

}

/* =========================================
   LADĚNÍ MOBILU: O MNĚ, ÚVODNÍ FOTKA A ČÁRY
   ========================================= */

@media (max-width: 950px) {

    /* 1. Skrytí žluté fotky v sekci "O mně" na mobilu */
    .about-img-wrapper {
        display: none !important;
    }

    /* 2. Lepší oříznutí úvodní fotky na mobilu */
    .hero {
        /* Posune ohnisko fotky lehce nahoru (20 %), aby nebyly uříznuté hlavy/postavy */
        background-position: center 5% !important; 
        
        /* Zmenšíme fixní výšku, aby se fotka tak extrémně neořezávala z boků */
        min-height: 85vh !important;
        height: auto !important;
        padding-bottom: 60px !important;
    }

    /* 3. Návrat čar na pozadí (přepíše ten zákaz z minula) */
    #global-scroll-lines {
        display: block !important;
    }
}

/* =========================================
   ULTIMÁTNÍ OPRAVA SCROLLOVÁNÍ KARET NA MOBILU
   ========================================= */

/* 1. Základní podpora pro rolování prstem */
.flip-card-back {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important; /* Explicítně prohlížeči povolí tahání prstem nahoru a dolů */
}

/* 2. Když je karta otočená, přední strana nesmí blokovat dotyky */
.flip-card-wrapper.is-flipped .flip-card-front {
    pointer-events: none !important; 
    z-index: -1 !important;
}

/* 3. Zadní stranu naopak protlačíme do popředí */
.flip-card-wrapper.is-flipped .flip-card-back {
    pointer-events: auto !important;
    z-index: 5 !important;
    /* Drobný 3D posun dopředu donutí mobilní prohlížeč správně vyhodnotit dotyk prstem */
    transform: rotateY(180deg) translateZ(1px) !important; 
}

/* --- OPRAVA TLAČÍTKA ZAVŘÍT NA MOBILU --- */
@media (max-width: 950px) {
    .flip-card-back .back-btn {
        width: auto !important;
        height: auto !important;
        padding: 8px 25px !important;
        font-size: 0.9rem !important;
        border-radius: 20px !important;
        line-height: normal !important;
    }
}