/* Konzistentní s designem delan.cz */
:root {
    --bg: #151225;
    --surface: linear-gradient(145deg, #111111, #1e1e1e);
    --glass: rgba(30, 30, 30, 0.45);
    --text: #ffffff;
    --text-secondary: #aaaaaa;
    --text-tertiary: #666666;
    --radius: 28px;
    --radius-small: 20px;
    --transition: all 0.5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    --transition-fast: all 0.3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    position: relative;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='https://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23noise)' opacity='0.12'/%3E%3C/svg%3E");
    z-index: 1;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

/* Header */
.ext-header {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.back-link svg {
    width: 20px;
    height: 20px;
}

.back-link:hover {
    color: var(--text);
}

/* Hero – ikona vlevo nahoře + název */
.ext-main {
    padding: 3rem 0 5rem;
}

.ext-hero {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.ext-icon-wrap {
    flex-shrink: 0;
}

.ext-icon {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-small);
    background: var(--surface);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ext-icon svg {
    width: 44px;
    height: 44px;
    color: var(--text);
}

.ext-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 0;
    display: block;
}

.ext-heading h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.35rem;
}

.ext-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Obsah */
.ext-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.ext-description h2,
.ext-previews h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.ext-features-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem;
    color: var(--text);
}

.ext-description p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.ext-features {
    list-style: none;
    color: var(--text-secondary);
    line-height: 1.8;
}

.ext-features li {
    padding-left: 1.5rem;
    position: relative;
}

.ext-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

/* Náhledy */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.preview-card {
    border-radius: var(--radius-small);
    overflow: hidden;
    background: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-card.preview-clickable {
    cursor: pointer;
}

.preview-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Lightbox pro zvětšení náhledů */
.preview-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.preview-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.preview-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 1001;
}

.preview-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.preview-lightbox-content {
    max-width: 95%;
    max-height: 90vh;
}

.preview-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-small);
}

/* Download tlačítko */
.ext-cta {
    padding-top: 1rem;
}

.download-btn {
    width: auto;
    min-width: 140px;
    height: 52px;
    padding: 0 1.5rem;
    background-color: #ffffff;
    border: none;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition-duration: 0.5s;
    text-decoration: none;
}

.download-btn .text {
    color: #151225;
    font-weight: 800;
    letter-spacing: 1.1px;
    z-index: 2;
    font-size: 1.05rem;
}

.download-btn .svgIcon {
    z-index: 2;
    width: 22px;
    height: 22px;
}

.download-btn .svgIcon path,
.download-btn .svgIcon polyline,
.download-btn .svgIcon line {
    stroke: #151225;
}

.download-btn .effect {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    margin-top: -5px;
    background-color: #7c32fd;
    border-radius: 50%;
    z-index: 1;
    opacity: 0;
    transition-duration: 0.5s;
}

.download-btn:hover .effect {
    transform: scale(40);
    transform-origin: center;
    opacity: 1;
    transition-duration: 0.5s;
}

.download-btn:hover {
    box-shadow: 0 0 5px #7c32fd, 0 0 10px #7c32fd, 0 0 30px #7c32fd;
    transition-duration: 0.7s;
}

.download-btn:hover .text {
    color: #ffffff;
}

.download-btn:hover .svgIcon path,
.download-btn:hover .svgIcon polyline,
.download-btn:hover .svgIcon line {
    stroke: #ffffff;
}

/* Privacy Policy collapse */
.privacy-policy {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
}

.privacy-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}

.privacy-toggle:hover {
    color: var(--text);
    opacity: 0.85;
}

.privacy-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.privacy-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.privacy-toggle.active .privacy-icon {
    transform: rotate(180deg);
}

.privacy-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0;
}

.privacy-content.active {
    max-height: 2000px;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}

.privacy-text {
    color: var(--text-secondary);
    line-height: 1.75;
}

.privacy-text h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.privacy-text h3:first-child {
    margin-top: 0;
}

.privacy-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.privacy-text a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    transition: text-decoration-color 0.2s ease;
}

.privacy-text a:hover {
    text-decoration-color: rgba(255, 255, 255, 0.6);
}

.privacy-agreement {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.privacy-agreement strong {
    font-weight: 600;
    color: var(--text);
}

/* Footer */
.ext-footer {
    padding: 2.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.footer-logo {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.85;
}

.footer-logo-img {
    height: 28px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* Responzivita */
@media (max-width: 640px) {
    .ext-hero {
        flex-direction: column;
        gap: 1.5rem;
    }

    .ext-heading h1 {
        font-size: 1.85rem;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .privacy-toggle {
        font-size: 1rem;
    }

    .privacy-text h3 {
        font-size: 0.95rem;
    }
}
