@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Inter:wght@300;400;500&display=swap');

:root {
    --primary: #b45d5d;
    --primary-light: #d47d7d;
    --secondary: #1f9d24;
    --accent: #fffd3b;
    --bg-dark: #120806;
    --bg-light: #fcfee2;
    --text-main: #333;
    --text-muted: #707172;
    --text-white: #ffffff;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url('../img/fon.png');
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
.tm-section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* --- Layout --- */
.main-wrapper {
    display: flex;
    flex-direction: column;
}

/* --- Navigation --- */
.navbar-custom {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 2rem;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-custom.scrolled {
    background: var(--glass-dark);
    backdrop-filter: blur(15px);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-logo img {
    height: 60px;
    transition: var(--transition);
}

.navbar-custom.scrolled .nav-logo img {
    height: 45px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../img/dream-pulse-header.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

.hero-logo {
    max-width: 300px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Sections --- */
.section-padding {
    padding: 100px 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title h2 {
    font-size: 3rem;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 0 auto;
}

/* --- Pizza Sizes (Flip Cards) --- */
.sizes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 50px auto 0;
    perspective: 1500px;
}

@media (max-width: 1200px) {
    .sizes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .sizes-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        gap: 30px;
        padding: 0 15px;
    }
}

.size-card-container {
    height: 520px;
    width: 100%;
    margin: 0 auto;
    cursor: pointer;
}

.size-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;
}

.size-card-inner.flipped {
    transform: rotateY(180deg);
}

/* Curved Flip Button Styling */
.flip-icon-wrapper {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: var(--transition);
    z-index: 20;
    border: 1px solid rgba(0,0,0,0.05);
}

.flip-icon-wrapper:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 6px 20px rgba(180, 93, 93, 0.3);
}

.flip-icon-wrapper i {
    font-size: 1.4rem;
    color: #e67e22; /* A warm orange/coral similar to the image */
}

/* Positioning on the back of the card - Matches the front button style but flows below text */
.size-card-back .flip-icon-wrapper {
    position: relative;
    margin: 25px 0 0 auto; /* Margin-top for spacing, pushed to right */
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.05);
}

.size-card-back .flip-icon-wrapper i {
    font-size: 1.4rem;
    color: #e67e22;
    transform: rotateY(180deg); /* Points left */
}

/* Size Links in Menu */
.size-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: var(--transition);
}

.size-link:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.size-name {
    font-weight: 600;
    color: var(--secondary);
}
.back-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.size-card-front,
.size-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    background: white;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.size-card-front {
    justify-content: center;
    align-items: center;
}

.size-card-back {
    transform: rotateY(180deg);
    background: var(--bg-dark);
    color: white;
    padding: 1.5rem;
    justify-content: flex-start; /* Aligns to top to avoid pushing headers out */
    overflow-y: auto; /* Adds scrollbar if content is too long */
    scroll-behavior: smooth;
}

/* Custom scrollbar for the card back */
.size-card-back::-webkit-scrollbar {
    width: 5px;
}
.size-card-back::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}
.size-card-back::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 5px;
}

.size-card-front img {
    height: 140px;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.size-card-info h3 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.back-content {
    width: 100%;
}

.back-content h4 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 1.2rem;
}

.extra-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline; /* Better alignment for wrapped text */
    gap: 10px;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.extra-row span:first-child {
    color: #ccc;
    flex: 1; /* Allows text to wrap without pushing price too far */
    line-height: 1.4;
}

.extra-row .price-small {
    color: var(--accent);
    font-weight: 600;
}

/* --- Pizza Types (Masonry-like) --- */
.pizzas-container {
    padding: 40px 0;
}

.pizza-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pizza-card:hover {
    box-shadow: var(--shadow-md);
}

.pizza-img-box {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.pizza-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.pizza-card:hover .pizza-img-box img {
    transform: scale(1.1);
}

.pizza-content {
    padding: 1.5rem;
}

.pizza-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.pizza-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Pizza Content Pricing --- */
.pizza-price-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
}

.price-row .size-name {
    color: var(--text-muted);
    font-weight: 500;
}

.price-row .size-price {
    font-weight: 700;
    color: var(--primary);
}

/* --- Modern Table UI --- */
.modern-table-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    background: var(--bg-dark);
    color: var(--accent);
    padding: 1rem;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.modern-table tr:hover td {
    background: rgba(180, 93, 93, 0.05);
}

/* --- Menu Grid (Images) --- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.menu-item-box {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.menu-item-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.menu-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition);
}

.menu-item-box:hover .menu-overlay {
    opacity: 1;
}

.menu-item-box:hover img {
    transform: scale(1.1);
}

.menu-overlay h4 {
    color: var(--accent);
    margin: 0;
}

/* --- Footer & Social --- */
.footer-modern {
    background: var(--bg-dark);
    color: white;
    padding: 60px 5% 30px;
    text-align: center;
}

.social-links-modern {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    margin-bottom: 0;
}

.social-icon {
    width: 55px;
    height: 55px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
    text-decoration: none;
    font-size: 1.6rem;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(180, 93, 93, 0.1);
}

.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1) translateX(-5px);
    box-shadow: 0 8px 25px rgba(180, 93, 93, 0.4);
}

/* Specific colors for branding if desired, or keep uniform */
.social-icon i.fab.fa-whatsapp { color: #25D366; }
.social-icon i.fab.fa-facebook-f { color: #1877F2; }
.social-icon i.fab.fa-instagram { color: #E4405F; }
.social-icon i.fas.fa-phone { color: var(--primary); }

.social-icon:hover i {
    color: white !important;
}

#combos {
    background: linear-gradient(rgba(252, 254, 226, 0.92), rgba(252, 254, 226, 0.92)), url('../img/fon.png');
    background-attachment: fixed;
}

.size-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
}

.size-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.size-card h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.size-card .price-box {
    margin-top: 1.5rem;
    background: var(--primary);
    color: white;
    padding: 0.8rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2rem;
}

/* --- Responsive Hub --- */
@media (max-width: 991px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 80%;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s;
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }
}

/* --- Floating Dessert Promo --- */
.floating-dessert {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary), #8e3e3e);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    animation: floatingPulse 3s ease-in-out infinite;
}

.floating-dessert:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 40px rgba(180, 93, 93, 0.5);
    color: white;
}

.floating-dessert i {
    font-size: 1.4rem;
    color: var(--accent);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.dessert-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.dessert-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    font-weight: 700;
}

.dessert-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

@keyframes floatingPulse {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

@media (max-width: 576px) {
    .floating-dessert {
        bottom: 20px;
        left: 20px;
        padding: 10px 18px;
    }
    
    .dessert-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        max-width: 200px;
    }

    .section-padding {
        padding: 60px 15px;
    }

    .size-card {
        padding: 1.5rem;
    }
}