@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: #ffffff;
    --capoletos-gradient: linear-gradient(135deg, #8B4513 0%, #D2691E 30%, #CD853F 70%, #F4A460 100%);
    --capoletos-shadow: rgba(139, 69, 19, 0.2);
    --kori-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 30%, #0f3460 70%, #533483 100%);
    --kori-accent: linear-gradient(135deg, #DC143C 0%, #B22222 50%, #8B0000 100%);
    --kori-shadow: rgba(220, 20, 60, 0.2);
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-gradient);
    height: 100vh;
    padding: 0.5rem 0.5rem 2rem 0.5rem;
    overflow: hidden;
    position: relative;
}



.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.header {
    text-align: center;
    height: 20vh;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #333;
}

.header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #8B4513 0%, #DC143C 50%, #1a1a2e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.header p {
    font-size: 1.5rem;
    opacity: 0.7;
    font-weight: 700;
    color: #050404;
}

.cards-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    max-width: 100vw;
    margin: 0 auto;
    height: 70vh;
    /* 35% + 35% = 70% */
}

.menu-card {
    flex: 1 1 35vh;
    width: 80vw;
    max-width: 800px;
    min-width: 260px;
    height: 35vh;
    min-height: 180px;
    border-radius: 32px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
    margin: 0 auto 0 auto;
}

.menu-card:last-child {
    margin-bottom: 0;
}

.menu-card:first-child {
    margin-bottom: 1rem;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg);
    z-index: 1;
    transition: all 0.6s ease;
}

.menu-card:hover {
    transform: translateY(-20px) rotateX(5deg);
    box-shadow: var(--shadow-heavy);
}

.menu-card:hover::before {
    background: rgba(255, 255, 255, 0.15);
}

.capoletos {
    background: var(--capoletos-gradient);
}

.capoletos:hover {
    box-shadow: 0 25px 50px var(--capoletos-shadow);
}

.kori {
    background: var(--kori-gradient);
    position: relative;
}

.kori:hover {
    box-shadow: 0 25px 50px var(--kori-shadow);
}

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.card-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

.capoletos .card-icon {
    color: #F4A460;
}

.kori .card-icon {
    color: #FFE4E1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.card-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.card-subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
    font-weight: 300;
    margin-bottom: 2rem;
}

.view-menu-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.capoletos .view-menu-btn {
    background: linear-gradient(135deg, #F4A460 0%, #DEB887 100%);
    color: #8B4513;
}

.kori .view-menu-btn {
    background: linear-gradient(135deg, #FFE4E1 0%, #FFF8DC 100%);
    color: #1a1a2e;
}

.view-menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.capoletos .view-menu-btn:hover {
    background: linear-gradient(135deg, #DEB887 0%, #F4A460 100%);
}

.kori .view-menu-btn:hover {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE4E1 100%);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    }
}

.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.pdf-modal.active {
    display: flex;
    opacity: 1;
}

.pdf-container {
    width: 95%;
    height: 95%;
    max-width: 1200px;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes modalSlide {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.pdf-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.pdf-header.capoletos {
    background: var(--capoletos-gradient);
}

.pdf-header.kori {
    background: var(--kori-gradient);
}

.pdf-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    font-weight: bold;
}

.close-btn.capoletos {
    background: rgba(244, 164, 96, 0.3);
    border: 2px solid rgba(244, 164, 96, 0.5);
}

.close-btn.capoletos:hover {
    background: rgba(244, 164, 96, 0.5);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(244, 164, 96, 0.6);
}

.close-btn.kori {
    background: rgba(220, 20, 60, 0.3);
    border: 2px solid rgba(220, 20, 60, 0.5);
    animation: pulseRed 2s infinite;
}

.close-btn.kori:hover {
    background: rgba(220, 20, 60, 0.5);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.6);
    animation: none;
}

@keyframes pulseRed {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(220, 20, 60, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(220, 20, 60, 0.6);
    }
}

.pdf-viewer {
    width: 100%;
    height: calc(100% - 80px);
    border: none;
}

.image-gallery {
    width: 100%;
    height: calc(100% - 80px);
    position: relative;
    background: #f8f9fa;
    display: none;
}

.gallery-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-image.active {
    opacity: 1;
}

.gallery-image.page-flip {
    animation: pageFlip 0.5s;
}

@keyframes pageFlip {
    0% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
    40% {
        transform: rotateY(-60deg) scale(0.98);
        opacity: 0.7;
    }
    60% {
        transform: rotateY(60deg) scale(0.98);
        opacity: 0.7;
    }
    100% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
}

.gallery-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.gallery-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.gallery-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gallery-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.image-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.image-navigation:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.nav-prev {
    left: 20px;
}

.nav-next {
    right: 20px;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
    font-size: 1.1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem 1rem 3rem 1rem;
        height: 100vh;
        overflow: hidden;
    }

    .header {
        height: 20vh;
        min-height: 80px;
    }

    .header h1 {
        font-size: 2.5rem;
        color: #333;
    }

    .header p {
        font-size: 1.2rem;
        color: #666;
    }

    .cards-container {
        height: 70vh;
    }

    .menu-card {
        height: 35vh;
        min-height: 120px;
        border-radius: 24px;
        width: 95%;
    }

    .menu-card:first-child {
        margin-bottom: 1rem;
    }

    .card-title {
        font-size: 2.8rem;
    }

    .card-icon {
        font-size: 3.5rem;
    }

    .card-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .view-menu-btn {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }

    .pdf-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .image-navigation {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .nav-prev {
        left: 10px;
    }

    .nav-next {
        right: 10px;
    }

    .gallery-counter {
        top: 10px;
        right: 10px;
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .menu-card {
        width: 95vw;
        max-width: 95vw;
    }
}

@media (max-width: 800px) {
    .header {
        height: 15vh;
        min-height: 60px;
    }
    .cards-container {
        height: 85vh;
        gap: 0.3rem;
    }
    .menu-card {
        width: 100vw;
        max-width: 100vw;
        min-height: 120px;
        border-radius: 18px;
        margin-bottom: 0.3rem;
    }
    .card-title {
        font-size: 2.2rem;
    }
}