/* CSS Custom Properties */
:root {
    --font: 'Nunito', Arial, sans-serif;
    --color-bg: #FFDAB9;
    --color-header: #FF4C4C;
    --color-footer: #343a40;
    --color-btn-green: #28a745;
    --color-btn-green-hover: #218838;
    --color-btn-donate: rgba(0, 123, 255, 0.71);
    --color-btn-donate-hover: #0056b3;
    --radius-card: 20px;
    --radius-btn: 50px;
    --shadow-card: 0 6px 20px rgba(0,0,0,0.13);
    --shadow-card-hover: 0 14px 36px rgba(0,0,0,0.22);
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-header);
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: bold;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* Base */
body, html {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background: var(--color-bg);
    font-size: 18px;
}

/* Animated bubble backgrounds (used on subpages) */
.bubbly-background {
    position: relative;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,240,240,0.9), rgba(255,218,185,0.6));
    overflow: hidden;
}

.bubbly-background::before {
    content: '';
    position: absolute;
    width: 300%; height: 300%;
    top: -100%; right: -100%; bottom: -100%; left: -100%;
    background-image:
      radial-gradient(ellipse at center, transparent 150px, rgba(255,218,185,0.6) 151px);
    background-size: 500px 650px;
    background-position: center;
    animation: bubble 200s linear infinite;
    z-index: 0;
}

@keyframes bubble {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

.bubbly-background2 {
    position: relative;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,240,240,0.9), rgba(255,218,185,0.6));
    overflow: hidden;
    z-index: 1;
}

.bubbly-background2::before, .bubbly-background2::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255,218,185,0.3);
    animation: float 120s linear infinite;
    z-index: -1;
}

.bubbly-background2::before {
    width: 1200px;
    height: 1200px;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
}

.bubbly-background2::after {
    width: 900px;
    height: 900px;
    top: 50%;
    left: 75%;
    transform: translate(-50%, -50%);
    animation-delay: -60s;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translate(0px, 0px); }
    25%       { transform: translate(-50%, -50%) translate(150px, -150px); }
    50%       { transform: translate(-50%, -50%) translate(-150px, 150px); }
    75%       { transform: translate(-50%, -50%) translate(-100px, -100px); }
}

/* Header */
header {
    background: var(--color-header);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,1);
    padding: 1rem 0;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header nav a, footer .footer-links a, footer .social-media a {
    font-size: calc(1vw + 0.5em);
}

header nav a {
    color: #ffffff;
    margin: 0 25px;
    text-decoration: none;
    font-weight: bold;
}

/* Language toggle */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 3px;
    margin-left: 16px;
    vertical-align: middle;
}

.lang-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 16px;
    cursor: pointer;
    margin-top: 0;
    min-height: auto;
    transition: background 0.2s, color 0.2s;
    line-height: 1.5;
}

.lang-btn--active {
    background: rgba(255,255,255,0.9);
    color: var(--color-header);
}

.lang-btn:hover {
    background-color: transparent;
}

.lang-btn:hover:not(.lang-btn--active) {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* Main layout */
main {
    padding-top: 80px;
}

/* Hero section (index.html) */
.hero {
    text-align: center;
    padding: 56px 20px 64px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ffecd2 100%);
    position: relative;
    overflow: hidden;
    border-radius: 0 0 50% 50% / 0 0 52px 52px;
}

.hero h1 {
    font-size: clamp(2.8rem, 6.5vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #ffe082 55%, #ffca28 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.25));
    margin: 0 0 14px;
}

.hero p {
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,0,0,0.55);
    margin: 0;
}

/* App card grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.app-card {
    background: #fff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: cardIn 0.55s ease both;
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.app-card:hover .app-thumb img {
    transform: scale(1.07);
}

/* Per-card colour accent top border */
.app-card#section1 { border-top: 5px solid #AEB0FD; }
.app-card#section2 { border-top: 5px solid #f093fb; }
.app-card#section3 { border-top: 5px solid #ff9a9e; }
.app-card#section4 { border-top: 5px solid #f6d365; }
.app-card#section5 { border-top: 5px solid #fbc2eb; }
.app-card#section6 { border-top: 5px solid #B1D389; }
.app-card#section7 { border-top: 5px solid #a1c4fd; }
.app-card#section8 { border-top: 5px solid #d4fc79; }
.app-card#section9 { border-top: 5px solid #fc7a4f; }

.app-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

.app-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.app-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.app-body h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #333;
    margin: 0;
}

.app-body > p {
    font-size: 1rem;
    color: #555;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.app-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
}

.app-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.app-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--color-btn-green);
    color: #fff;
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    min-height: 52px;
    box-sizing: border-box;
    transition: background 0.2s, transform 0.15s;
    margin-top: 4px;
}

.app-btn:hover {
    background: var(--color-btn-green-hover);
    transform: scale(1.03);
    box-shadow: 0 6px 22px rgba(40,167,69,0.40);
}

.app-btn:active {
    transform: scale(0.97);
}

/* Card entrance animation */
@keyframes cardIn {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.app-card:nth-child(1) { animation-delay: 0.04s; }
.app-card:nth-child(2) { animation-delay: 0.11s; }
.app-card:nth-child(3) { animation-delay: 0.18s; }
.app-card:nth-child(4) { animation-delay: 0.25s; }
.app-card:nth-child(5) { animation-delay: 0.32s; }
.app-card:nth-child(6) { animation-delay: 0.39s; }
.app-card:nth-child(7) { animation-delay: 0.46s; }
.app-card:nth-child(8) { animation-delay: 0.53s; }
.app-card:nth-child(9) { animation-delay: 0.60s; }

@media (prefers-reduced-motion: reduce) {
    .app-card { animation: none; }
    .app-thumb img { transition: none; }
}

/* Legacy content-section (other pages) */
.content-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,.3);
    position: relative;
    z-index: 1;
}

.content-section#section1 { background: linear-gradient(135deg, #AEB0FD 0%, #9CA0FC 100%); }
.content-section#section2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.content-section#section3 { background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); }
.content-section#section4 { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.content-section#section5 { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%); }
.content-section#section6 { background: linear-gradient(135deg, #B1D389 0%, #9DBF75 100%); }
.content-section#section7 { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.content-section#section8 { background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%); }
.content-section#section9 { background: linear-gradient(135deg, #fc7a4f 0%, #fda085 100%); }

.text-content, .video-content {
    flex: 1;
}

.text-content {
    padding-right: 20px;
    font-size: 1.5em;
    text-indent: 25px;
    color: #fff;
    text-shadow: 2px 2px 4px #000000;
}

.text-content1 {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex: 1;
    padding: 10px;
    font-size: 2em;
    color: #333;
    text-shadow: 1px 1px 2px #000000ce;
    text-indent: 0;
    white-space: pre-wrap;
}

.text-content2 {
    background: #fc7a4f;
    font-size: 1.5em;
    color: #fff;
    text-shadow: 2px 2px 4px #000000;
    text-align: center;
    white-space: pre-wrap;
    width: 500px;
    border-radius: 15px;
    margin: 10px auto;
    padding: 10px;
    box-sizing: border-box;
    display: block;
}

.video-content iframe {
    width: 100%;
    height: 350px;
    border-radius: 15px;
}

.button-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

button {
    padding: 10px 20px;
    margin-top: 15px;
    background-color: var(--color-btn-green);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 23px;
    font-family: var(--font);
}

button:hover {
    background-color: var(--color-btn-green-hover);
}

footer {
    box-shadow: 0 -2px 4px rgba(0,0,0,0.5);
    background: var(--color-footer);
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    position: relative;
    align-items: center;
    width: 100%;
    bottom: 0;
}

.footer-links a, .social-media a {
    color: #ffffff;
    margin: 0 20px;
    text-decoration: none;
    font-weight: bold;
}

.social-media {
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-media a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--color-footer);
    margin: 5px;
    width: 36px;
    height: 36px;
}

.social-media a:hover {
    background-color: #666;
    color: #ffffff;
}

.social-media a svg {
    display: block;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--color-footer);
    margin: 5px;
    width: 36px;
    height: 36px;
}

.share-btn:hover {
    background: #666;
    color: #ffffff;
}

.foto {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px;
}

.nazov {
    text-align: center;
    font-size: 2em;
    color: #333;
    text-shadow: 1.5px 1.5px 3px #000000;
}

.nazov h2, .text p {
    text-align: center;
    margin-bottom: 10px;
}

.stlpec {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.stlpec_stred {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stlpec_vpravo {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
}

.stlpec_vlavo {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
}

/* Floating QR button */
#floatingQRButton {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-btn-donate);
    color: white;
    border: none;
    padding: 12px 18px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#floatingQRButton:hover {
    background-color: var(--color-btn-donate-hover);
}

/* QR Modal */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.qr-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    max-width: 800px;
}

.qr-modal img {
    max-width: 100%;
    height: auto;
}

.qr-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
    padding: 0;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 28px 20px;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .content-section {
        flex-direction: column;
        text-align: center;
    }

    .text-content {
        padding-right: 0;
    }

    .video-content {
        padding-top: 20px;
    }

    .video-content iframe {
        height: auto;
    }

    header nav a, footer .footer-links a, footer .social-media a {
        font-size: 3vw;
    }
}

@media (max-width: 600px) {
    .apps-grid {
        grid-template-columns: 1fr;
        padding: 16px 12px;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    header nav a, footer .footer-links a, footer .social-media a {
        font-size: 4vw;
    }
}

@media (min-width: 768px) {
    header nav a, footer .footer-links a, footer .social-media a {
        font-size: calc(0.8vw + 0.8em);
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #1a0e05;
        --color-header: #c03030;
        --color-footer: #0d0f11;
    }

    body, html {
        background: var(--color-bg);
    }

    .bubbly-background {
        background: linear-gradient(135deg, rgba(40,20,10,0.9), rgba(30,15,5,0.6));
    }

    .bubbly-background2 {
        background: linear-gradient(135deg, rgba(40,20,10,0.9), rgba(30,15,5,0.6));
    }

    .text-content1 {
        color: #eee;
        text-shadow: 1px 1px 2px #000;
    }

    .text-content2 {
        background: #7a3a1f;
    }

    .nazov {
        color: #eee;
    }

    .app-card {
        background: #1e1a17;
    }

    .app-body h2 {
        color: #eee;
    }

    .app-body > p {
        color: #bbb;
    }

    .hero {
        background: linear-gradient(135deg, #7a2020 0%, #4a2a1a 50%, #2a1a0a 100%);
    }

    .hero h1 {
        background: linear-gradient(135deg, #ffe0b2 20%, #ffb74d 85%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .qr-modal-content {
        background-color: #222;
        color: #eee;
    }
}

/* Klávesnicová navigácia – viditeľný focus len pri tabovaní */
:focus-visible {
    outline: 3px solid #FF4C4C;
    outline-offset: 2px;
    border-radius: 4px;
}
:focus:not(:focus-visible) {
    outline: none;
}

/* Vysoký kontrast – pre slabozrakých */
@media (prefers-contrast: high) {
    .app-card { border: 2px solid #333; }
    .hero h1 { -webkit-text-fill-color: #ffe082; }
}
@media (prefers-contrast: more) {
    :root { --color-bg: #FFE4C4; }
}
