/* ==========================================================================
   TERRA NOSTRA - Pizzeria & Ristorante
   Custom Template Stylesheet
   ========================================================================== */

:root {
    /* Paleta inspirada en el restaurante real */
    --tn-terracotta: #D85324;
    --tn-terracotta-dark: #B93E14;
    --tn-terracotta-light: #F46C3B;
    --tn-red: #B91D34;
    --tn-red-dark: #8F1224;
    --tn-green: #2B7A38;
    --tn-green-light: #3A9B4B;
    --tn-gold: #E5A93C;
    --tn-gold-light: #F5C66E;
    --tn-wood: #231815;
    --tn-wood-dark: #140E0C;
    --tn-cream: #FFF9F3;
    --tn-cream-card: #FFFFFF;
    --tn-cream-subtle: #F6EFE8;
    --tn-border: #E8DCCF;
    --tn-text: #2C2725;
    --tn-text-muted: #6E6560;

    /* Tipografías */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

    /* Sombras y transiciones */
    --tn-shadow-sm: 0 4px 12px rgba(35, 24, 21, 0.05);
    --tn-shadow-md: 0 10px 25px rgba(35, 24, 21, 0.08);
    --tn-shadow-lg: 0 18px 40px rgba(35, 24, 21, 0.14);
    --tn-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base */
body {
    font-family: var(--font-body);
    color: var(--tn-text);
    background-color: var(--tn-cream);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

a {
    color: var(--tn-terracotta);
    text-decoration: none;
    transition: var(--tn-transition);
}

a:hover {
    color: var(--tn-terracotta-dark);
}

/* Tricolor Tag */
.italian-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--tn-terracotta);
    background: rgba(216, 83, 36, 0.08);
    border: 1px solid rgba(216, 83, 36, 0.2);
    padding: 6px 14px;
    border-radius: 50px;
}

.italian-flag-bar {
    display: inline-flex;
    height: 12px;
    width: 18px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.italian-flag-bar span {
    flex: 1;
    height: 100%;
}
.flag-green { background-color: #008C45; }
.flag-white { background-color: #F4F5F0; }
.flag-red   { background-color: #CD212A; }

/* Navbar Superior */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    padding: 14px 0;
    transition: var(--tn-transition);
    background: rgba(20, 14, 12, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#main-nav.scrolled {
    padding: 10px 0;
    background: rgba(20, 14, 12, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.navbar-brand-img {
    height: 52px;
    transition: var(--tn-transition);
}

.nav-link-custom {
    color: #F6EFE8 !important;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px !important;
    position: relative;
    transition: var(--tn-transition);
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--tn-gold) !important;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--tn-terracotta);
    transform: scaleX(0);
    transition: var(--tn-transition);
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
    transform: scaleX(1);
}

/* Botones con estilo propio */
.btn-tn-primary {
    background: linear-gradient(135deg, var(--tn-terracotta) 0%, var(--tn-red) 100%);
    color: #fff !important;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 50px;
    border: none;
    box-shadow: 0 6px 18px rgba(216, 83, 36, 0.35);
    transition: var(--tn-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-tn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(216, 83, 36, 0.45);
    background: linear-gradient(135deg, var(--tn-terracotta-light) 0%, var(--tn-red-dark) 100%);
}

.btn-tn-outline {
    background: transparent;
    color: #fff !important;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    transition: var(--tn-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-tn-outline:hover {
    border-color: var(--tn-gold);
    color: var(--tn-gold) !important;
    background: rgba(229, 169, 60, 0.1);
    transform: translateY(-2px);
}

/* Hero Section con Video Background */
.hero-video-section {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 70px;
    overflow: hidden;
    color: #fff;
    background: #140E0C;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    opacity: 0.45;
    filter: brightness(0.7) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(35, 24, 21, 0.4) 0%, rgba(20, 14, 12, 0.88) 85%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    font-weight: 900;
    line-height: 1.08;
    color: #FFF9F3;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-title .text-accent {
    color: var(--tn-gold);
    font-style: italic;
    font-weight: 400;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    color: rgba(255, 249, 243, 0.9);
    max-width: 680px;
    margin-bottom: 35px;
    font-weight: 300;
}

/* Selector Rápido de Canales (Barra de Acción) */
.order-modes-bar {
    position: relative;
    z-index: 10;
    margin-top: -45px;
}

.mode-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--tn-shadow-lg);
    border: 1px solid var(--tn-border);
    transition: var(--tn-transition);
    height: 100%;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(216, 83, 36, 0.15);
    border-color: var(--tn-terracotta);
}

.mode-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.icon-delivery {
    background: rgba(216, 83, 36, 0.12);
    color: var(--tn-terracotta);
}

.icon-pickup {
    background: rgba(229, 169, 60, 0.15);
    color: var(--tn-gold);
}

.icon-table {
    background: rgba(43, 122, 56, 0.12);
    color: var(--tn-green);
}

/* Sección de Menú y Carta */
.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: clamp(2.2rem, 3.8vw, 3.2rem);
    font-weight: 800;
    color: var(--tn-wood);
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--tn-text-muted);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto 40px;
}

/* Pestañas de la Carta */
.menu-nav-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.menu-pill-btn {
    background: #fff;
    border: 1px solid var(--tn-border);
    color: var(--tn-text);
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--tn-transition);
    cursor: pointer;
}

.menu-pill-btn:hover,
.menu-pill-btn.active {
    background: var(--tn-terracotta);
    color: #fff;
    border-color: var(--tn-terracotta);
    box-shadow: 0 4px 15px rgba(216, 83, 36, 0.3);
}

/* Tarjeta de Plato / Pizza */
.dish-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--tn-border);
    box-shadow: var(--tn-shadow-sm);
    transition: var(--tn-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dish-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--tn-shadow-lg);
    border-color: rgba(216, 83, 36, 0.4);
}

.dish-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--tn-wood);
}

.dish-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dish-card:hover .dish-img-wrap img {
    transform: scale(1.08);
}

.dish-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(20, 14, 12, 0.85);
    backdrop-filter: blur(8px);
    color: var(--tn-gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid rgba(229, 169, 60, 0.3);
}

.dish-price {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--tn-red);
}

.dish-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dish-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tn-wood);
    margin-bottom: 8px;
}

.dish-desc {
    color: var(--tn-text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 18px;
    flex-grow: 1;
}

/* Banner Destacado: Mitad y Mitad */
.half-half-banner {
    background: linear-gradient(135deg, var(--tn-wood) 0%, #351C15 100%);
    color: #fff;
    border-radius: 24px;
    padding: 45px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--tn-shadow-lg);
    border: 1px solid rgba(229, 169, 60, 0.3);
}

.half-half-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(216, 83, 36, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

/* Historia y Atmósfera de Ladrillo Rústico */
.story-section {
    background: var(--tn-cream-subtle);
    position: relative;
}

.story-arch-box {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--tn-shadow-lg);
    border: 4px solid #fff;
}

.story-arch-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.story-arch-box:hover img {
    transform: scale(1.04);
}

/* Mosaico de Galería */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    height: 280px;
    box-shadow: var(--tn-shadow-md);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 14, 12, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: #fff;
    opacity: 0;
    transition: var(--tn-transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Footer Tradicional Italiano */
.site-footer {
    background: var(--tn-wood-dark);
    color: rgba(255, 249, 243, 0.8);
    padding: 80px 0 30px;
    border-top: 4px solid var(--tn-terracotta);
}

.footer-logo {
    max-height: 70px;
    margin-bottom: 20px;
}

.footer-heading {
    font-family: var(--font-heading);
    color: var(--tn-cream);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--tn-terracotta);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 249, 243, 0.7);
    transition: var(--tn-transition);
}

.footer-links a:hover {
    color: var(--tn-gold);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 30px;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.88rem;
    color: rgba(255, 249, 243, 0.5);
}

/* Responsividad */
@media (max-width: 991px) {
    .hero-video-section {
        min-height: 85vh;
        text-align: center;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .order-modes-bar {
        margin-top: 20px;
    }
    .half-half-banner {
        padding: 30px 20px;
        text-align: center;
    }
}
