/* ==========================================
   GLOBÁLNE ŠTÝLY & RESET
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #000;
    color: #fff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ==========================================
   NAVIGAČNÉ TLAČIDLÁ
   ========================================== */
.back-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    margin: 30px 0 0 30px;
    font-size: 14px;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 10;
}

.back-btn:hover {
    color: #fff;
}

.back-btn.back-home {
    position: absolute;
    top: 20px;
    left: 20px;
    margin: 0;
    z-index: 100;
}

/* ==========================================
   POHĽADY (VIEWS) & HERO BANNER
   ========================================== */
.view {
    display: none;
    width: 100%;
    min-height: 100vh;
}

.view.active {
    display: block;
}

#view-home {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

.hero-banner {
    width: 100%;
    margin-bottom: 30px;
}

.hero-banner img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

/* ==========================================
   AKORDEÓN (ABOUT) A GALÉRIA
   ========================================== */
.info-accordions {
    margin-bottom: 30px;
}

details.accordion {
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

summary {
    padding: 20px 0;
    font-size: 1.6rem;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 3px;
    list-style: none;
    transition: color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary:hover {
    color: #aaa;
}

summary::-webkit-details-marker {
    display: none;
}

/* Štýl tlačidla Instagramu v riadku ABOUT */
.instagram-icon {
    position: relative;
    background: #fff;
    color: #000;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.instagram-icon svg {
    width: 20px;
    height: 20px;
}

.instagram-icon .tooltip {
    position: absolute;
    top: 0;
    font-size: 12px;
    background: #e4405f;
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    white-space: nowrap;
}

.instagram-icon .tooltip::before {
    position: absolute;
    content: "";
    height: 6px;
    width: 6px;
    background: #e4405f;
    bottom: -3px;
    left: 50%;
    transform: translate(-50%) rotate(45deg);
}

.instagram-icon:hover {
    background: #e4405f;
    color: #fff;
}

.instagram-icon:hover .tooltip {
    top: -38px;
    opacity: 1;
    visibility: visible;
}

.accordion-content {
    padding: 0 0 25px 0;
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.7;
}

.gallery-trigger-wrap {
    text-align: center;
    margin: 50px 0;
    padding: 20px 0;
    border-bottom: 1px solid #222;
}

.gallery-title {
    font-size: clamp(3rem, 10vw, 6.5rem);
    letter-spacing: 12px;
    font-weight: 800;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}

.gallery-title:hover {
    transform: scale(1.03);
    color: #888;
}

/* ==========================================
   KONTAKTNÉ ÚDAJE
   ========================================== */
.contact-section {
    padding-top: 20px;
}

.section-tag {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 20px;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: #555;
    background: #141414;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #181818;
    border-radius: 50%;
    color: #fff;
    border: 1px solid #333;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover .card-icon {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-info strong {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.card-info span {
    font-size: 0.85rem;
    color: #aaa;
}

@media (max-width: 600px) {
    .contact-links {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   KVADRANTOVÁ MRIEŽKA (KATEGÓRIE)
   ========================================== */
.category-grid {
    position: relative;
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    overflow: hidden;
}

.category-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: background-image 0.4s ease-in-out;
}

.quadrant {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quadrant:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.quadrant h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 6px;
    color: #fff;
    text-transform: uppercase;
    transition: transform 0.3s ease;
}

.quadrant:hover h2 {
    transform: scale(1.05);
}

/* ==========================================
   SEKCIE KATEGÓRIÍ A PODKATEGÓRIÍ
   ========================================== */
.section-heading {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.8rem);
    letter-spacing: 4px;
    margin: 60px 0 30px 0;
}

.category-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

.group-section {
    margin-bottom: 50px;
}

.group-heading {
    font-size: 1.4rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #222;
    color: #888;
    text-transform: uppercase;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.sub-card {
    background: #111;
    border: 1px solid #222;
    padding: 18px;
    cursor: pointer;
    border-radius: 6px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.sub-card:hover {
    border-color: #666;
    transform: translateY(-4px);
}

.sub-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}

.sub-card h4 {
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* ==========================================
   DETAIL PROJEKTU
   ========================================== */
.project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px 20px;
}

#project-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: 2px;
    margin: 20px 0 15px 0;
}

#project-description {
    color: #aaa;
    line-height: 1.8;
    margin-bottom: 40px;
}

#project-description p {
    margin-bottom: 1rem;
}

.subgalleries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    margin-top: 25px;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.project-gallery-grid img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-gallery-grid img:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* ==========================================
   KOPKY FOTIEK (PHOTO STACKS)
   ========================================== */
.photo-stack-card {
    cursor: pointer;
    text-align: left;
    transition: transform 0.3s ease;
}

.photo-stack-card:hover {
    transform: translateY(-6px);
}

.photo-stack {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 14px;
}

.photo-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 3;
    display: block;
}

.photo-stack::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    z-index: 2;
    transform: rotate(3.5deg) scale(0.97);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.photo-stack::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    z-index: 1;
    transform: rotate(-4deg) scale(0.94);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.photo-stack-card:hover .photo-stack::before {
    transform: rotate(6deg) scale(0.98);
}

.photo-stack-card:hover .photo-stack::after {
    transform: rotate(-7deg) scale(0.95);
}

.stack-info h4 {
    margin: 6px 0 2px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.stack-count {
    font-size: 0.85rem;
    color: #888888;
}

/* ==========================================
   LIGHTBOX MODAL
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 85%;
    max-height: 85vh;
    border-radius: 6px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.25s ease;
    object-fit: contain;
}

@keyframes zoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
    z-index: 10001;
}

.modal-close:hover {
    color: #80c1ff;
}

.modal-prev, .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 45px;
    font-weight: bold;
    padding: 16px;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s, transform 0.2s;
    z-index: 10001;
}

.modal-prev { left: 25px; }
.modal-next { right: 25px; }

.modal-prev:hover, .modal-next:hover {
    color: #80c1ff;
    transform: translateY(-50%) scale(1.2);
}

/* ==========================================
   RESPONZIVITA
   ========================================== */
@media (max-width: 900px) {
    .subgalleries-grid,
    .subcategory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }

    .subgalleries-grid,
    .subcategory-grid,
    .project-gallery-grid,
    .contact-links {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 95%;
        max-height: 75vh;
    }

    .modal-prev { left: 5px; font-size: 35px; }
    .modal-next { right: 5px; font-size: 35px; }
    .modal-close { top: 10px; right: 20px; font-size: 35px; }
}