/**
 * Custom CSS for Restaurant Theme - Sabores
 * Integração com banco de dados e melhorias
 */

/* Sticky Header Improvements */
#header.header-sticky-active {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#header.header-sticky-active .header-logo img {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

/* Navigation Improvements */
.nav-pills .nav-link {
    color: #333;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 0;
    position: relative;
    transition: all 0.3s ease;
}

/* Reduz o tamanho da fonte dos itens do menu para evitar quebra de linha */
.dropdown-item {
    font-size: 0.85rem !important;
    padding: 8px 16px !important;
}

/* Ajustes específicos para o menu principal */
#mainNav .dropdown-item {
    font-size: 0.85rem !important;
    font-weight: 500;
    white-space: nowrap;
}

.nav-pills .nav-link:hover,
.nav-pills .nav-link.active {
    background-color: transparent;
    color: var(--primary, #c19655);
}

.nav-pills .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary, #c19655);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-pills .nav-link:hover::after,
.nav-pills .nav-link.active::after {
    width: 100%;
}

/* Header Top Bar */
.header-top {
    background-color: #2c2c2c !important;
}

.header-top .text-color-light {
    color: #e0e0e0 !important;
}

/* Hero Section Improvements */
.hero-bg {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed;
}

/* Force background image display */
.hero-bg,
.testimonials-bg,
.contact-bg {
    background-image: url('../img/demos/restaurant/backgrounds/background-1.jpg') !important;
}

.testimonials-bg {
    background-image: url('../img/demos/restaurant/backgrounds/background-2.jpg') !important;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-bg .container {
    position: relative;
    z-index: 2;
}

.custom-big-font-size-1 {
    font-size: 4.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .custom-big-font-size-1 {
        font-size: 2.5rem;
    }
    
    .hero-bg {
        background-attachment: scroll !important;
        min-height: 70vh;
    }
}

/* Parallax Background Fix */
.parallax-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 120% !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    z-index: 0 !important;
    transition: opacity 0.5s ease-in-out, transform 0.1s linear !important;
    will-change: transform !important;
}

.section[data-plugin-parallax] {
    position: relative;
    overflow: hidden;
}

/* Animation Classes */
.appear-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.appear-animation-visible {
    opacity: 1;
    transform: translateY(0);
}

.letter {
    display: inline-block;
    animation: letterFadeIn 0.5s ease forwards;
    opacity: 0;
}

@keyframes letterFadeIn {
    to {
        opacity: 1;
    }
}

/* Custom Lines */
.custom-line {
    width: 60px;
    height: 2px;
    background: var(--primary, #c19655);
}

/* Button Improvements */
.btn.custom-btn-style-1 {
    border-radius: 30px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn.custom-btn-style-1:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Search Dropdown */
.header-nav-features-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.header-nav-features-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Desktop Menu - Evita quebra de linha */
@media (min-width: 992px) {
    .nav-pills {
        flex-wrap: nowrap !important;
    }
    
    .nav-pills .nav-item {
        flex-shrink: 0;
    }
    
    .header-nav-main .nav {
        white-space: nowrap;
    }
    
    .header-nav-main .dropdown-item {
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
    }
}

/* Mobile Menu Improvements */
@media (max-width: 991px) {
    .header-nav-main nav {
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        margin-top: 20px;
        padding: 20px;
        position: absolute;
        top: 100%;
        left: 15px;
        right: 15px;
        z-index: 1000;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .header-nav-main nav.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-pills {
        flex-direction: column;
    }
    
    .nav-pills .nav-link {
        display: block;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 5px;
        padding: 15px 0;
        border-radius: 0;
    }
    
    .nav-pills .nav-link::after {
        display: none;
    }
    
    .nav-pills .nav-link:hover {
        background-color: #f8f9fa;
        padding-left: 10px;
    }
    
    .header-container {
        position: relative;
    }
}

/* Footer Improvements */
footer .svg-fill-color-light {
    fill: #e0e0e0;
    transition: fill 0.3s ease;
}

footer .svg-fill-color-light:hover,
footer .svg-fill-color-hover-primary:hover {
    fill: var(--primary, #c19655);
}

/* Testimonials Section */
.custom-testimonial-style-1 blockquote {
    position: relative;
    font-style: italic;
}

/* Menu Items Styling */
.custom-menu-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.custom-menu-item:hover {
    background-color: #f8f8f8;
    padding-left: 10px;
}

.custom-menu-item-line {
    border-bottom: 1px dotted #ccc;
    flex: 1;
    margin: 0 15px;
}

/* Parallax Section Overlay */
.section.overlay::before {
    background: rgba(0, 0, 0, 0.4);
}

/* Google Maps Styling */
.google-map {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Scroll Indicators */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary, #c19655), var(--secondary, #e36159));
    z-index: 9999;
    transition: width 0.3s ease;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary, #c19655);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary, #e36159);
    transform: translateY(-5px);
    color: white;
    text-decoration: none;
}

/* Section Dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary, #c19655), transparent);
    margin: 50px 0;
}

/* Blog Section Styling */
.custom-link-hover-effects {
    transition: all 0.3s ease;
}

.custom-link-hover-effects:hover .card {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.custom-date-style-1 {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.custom-font-size-1 {
    font-size: 0.8rem;
    line-height: 1;
}

.card-img-top {
    height: 250px;
    overflow: hidden;
}

.card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.custom-link-hover-effects:hover .card-img-top img {
    transform: scale(1.1);
}

.card-body {
    transition: all 0.3s ease;
}

.text-color-hover-primary:hover {
    color: var(--primary, #c19655) !important;
}

/* Blog Card Improvements */
.card.box-shadow-4 {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card.box-shadow-4:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.card-img-top.overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(193, 150, 85, 0.1), rgba(227, 97, 89, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-link-hover-effects:hover .card-img-top.overlay::after {
    opacity: 1;
}

/* Custom Buttons Hover Effects */
.btn-primary.custom-btn-style-1:hover {
    background: linear-gradient(45deg, var(--primary, #c19655), var(--secondary, #e36159));
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(193, 150, 85, 0.4);
}

/* Smooth Scroll Offset */
html {
    scroll-padding-top: 100px;
}

/* Highlight Effect */
.highlight.highlight-animated {
    position: relative;
    z-index: 1;
}

.highlight.highlight-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary, #c19655);
    opacity: 0.2;
    z-index: -1;
    animation: highlightGrow 1s ease forwards;
    transform: scaleX(0);
    transform-origin: left center;
}

@keyframes highlightGrow {
    to {
        transform: scaleX(1);
    }
}

/* Database-driven Content Styling */
.db-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.db-content h1,
.db-content h2,
.db-content h3,
.db-content h4,
.db-content h5,
.db-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.db-content p {
    margin-bottom: 1em;
    line-height: 1.6;
}

/* Social Media Icons Hover Effects */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
}

/* Portfolio/Gallery Styling */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.portfolio-item img {
    transition: transform 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(193, 150, 85, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.portfolio-item-overlay i {
    color: white;
    font-size: 2rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-item-overlay i {
    transform: scale(1);
}

/* Team Styling */
.team-item {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.team-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.team-item-image img {
    border: 5px solid #f8f9fa;
    transition: all 0.3s ease;
}

.team-item:hover .team-item-image img {
    border-color: var(--primary, #c19655);
}

/* Contact Form Styling */
.contact-form .form-control {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    padding: 15px 20px;
}

.contact-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form .form-control:focus {
    border-color: var(--primary, #c19655);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 0.2rem rgba(193, 150, 85, 0.25);
}

/* Testimonials Section */
.testimonials-bg {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.testimonials-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.testimonials-bg .container {
    position: relative;
    z-index: 2;
}

/* Contact Section */
.contact-bg {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.contact-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.contact-bg .container {
    position: relative;
    z-index: 2;
}

/* Section Improvements */
.section-height-3 {
    padding: 100px 0;
}

.section-height-2 {
    padding: 80px 0;
}

.section-with-shape-divider {
    position: relative;
}

.section-with-shape-divider::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M985.66,92.83C906.67,72,823.78,31,743.84,14.19c-82.26-17.34-168.06-16.33-250.45.39-57.84,11.73-114,31.07-172,41.86A600.21,600.21,0,0,1,0,27.35V120H1200V95.8C1132.19,118.92,1055.71,111.31,985.66,92.83Z" fill="%23ffffff"></path></svg>') no-repeat center bottom;
    background-size: cover;
    z-index: 1;
}

/* Gallery Section Specific */
.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Animation Enhancements */
.appear-animation {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.appear-animation.fadeInUpShorter {
    animation-fill-mode: forwards;
}

@keyframes fadeInUpShorter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Collapse Fix */
.header-nav-main nav.collapse:not(.show) {
    display: none;
}

.header-nav-main nav.collapse.show {
    display: block;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .team-item {
        margin-bottom: 30px;
    }
    
    .portfolio-item {
        margin-bottom: 20px;
    }
    
    .section-height-3 {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .header-container {
        height: auto !important;
        padding: 15px 0;
    }
    
    .custom-big-font-size-1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .contact-form .form-control {
        margin-bottom: 15px;
    }
}