/*
 * Carol Supermercados - Custom Stylesheet
 * Modern Design System & Micro-Interactions
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --brand-primary: #a71c20;
    --brand-primary-rgb: 167, 28, 32;
    --brand-secondary: #f1c40f;
    --brand-secondary-rgb: 241, 196, 15;
    
    /* Neutral Colors */
    --bg-dark: #121214;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    
    --text-primary: #1e2022;
    --text-secondary: #495057;
    --text-light: #f8f9fa;
    --text-muted: #868e96;
    
    /* Layout Details */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Glassmorphism Defaults */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: rgba(167, 28, 32, 0.08);
}

/* Global resets & styling */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-white);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8b1317;
}

/* Modern Sticky Glassmorphism Navbar */
.navbar-custom {
    background-color: transparent;
    transition: var(--transition-smooth);
    padding: 20px 0;
    border-bottom: 1px solid transparent;
}

.navbar-custom.navbar-scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    box-shadow: 0 4px 30px var(--glass-shadow);
    border-bottom: 1px solid var(--glass-border);
}

.navbar-custom .navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    transition: var(--transition-smooth);
}

.navbar-custom .navbar-logo {
    height: 50px;
    width: auto;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.05));
}

.navbar-custom.navbar-scrolled .navbar-logo {
    height: 40px;
}

.navbar-custom .nav-link {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 8px 16px !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-smooth);
    position: relative;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--brand-secondary) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Color transition when scrolled */
.navbar-custom.navbar-scrolled .nav-link {
    color: var(--text-primary) !important;
}

.navbar-custom.navbar-scrolled .nav-link:hover,
.navbar-custom.navbar-scrolled .nav-link.active {
    color: var(--brand-primary) !important;
    background-color: rgba(167, 28, 32, 0.05);
}

/* Custom Mobile Toggler styling */
.navbar-custom .navbar-toggler {
    border: none;
    padding: 8px;
    background: rgba(167, 28, 32, 0.1);
    color: var(--brand-primary);
    border-radius: var(--border-radius-sm);
}

.navbar-custom .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(167, 28, 32, 0.2);
}

/* Masthead / Hero section */
.masthead-modern {
    min-height: 100vh;
    padding: 120px 0 80px 0;
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.15) 0%, rgba(167, 28, 32, 0.85) 100%), 
                url('../img/20220507_132654_03.jpg') center/cover no-repeat fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    max-width: 520px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Section Common Styling */
.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--brand-primary);
    margin: 10px auto 0 auto;
    border-radius: 2px;
}

.section-subtitle {
    display: block;
    color: var(--brand-primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Ofertas Section */
.ofertas-container {
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.03);
    padding: 24px;
    transition: var(--transition-smooth);
}

.ofertas-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(167, 28, 32, 0.08);
}

.flyer-wrapper {
    position: relative;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.flyer-img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.flyer-wrapper:hover .flyer-img {
    transform: scale(1.03);
}

.flyer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(167, 28, 32, 0.4);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.flyer-wrapper:hover .flyer-overlay {
    opacity: 1;
}

/* Modern Department Cards */
.dept-card {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    height: 350px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: var(--transition-smooth);
    border: none;
}

.dept-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dept-card:hover .dept-card-bg {
    transform: scale(1.1);
}

.dept-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0,0,0,0.1) 100%);
    transition: var(--transition-smooth);
}

.dept-card:hover .dept-card-overlay {
    background: linear-gradient(to top, rgba(167, 28, 32, 0.9) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0,0,0,0.2) 100%);
}

.dept-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    color: var(--text-light);
    z-index: 2;
    transform: translateY(15px);
    transition: var(--transition-smooth);
}

.dept-card:hover .dept-card-content {
    transform: translateY(0);
}

.dept-card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Outfit', sans-serif;
}

.dept-card-content p {
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition-smooth);
    margin-bottom: 0;
}

.dept-card:hover .dept-card-content p {
    opacity: 0.95;
}

/* Contact and Map Section */
.info-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-md);
    padding: 30px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    height: 100%;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(167, 28, 32, 0.1);
    color: var(--brand-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.info-item:hover .info-icon {
    background-color: var(--brand-primary);
    color: var(--bg-white);
    transform: rotate(15deg) scale(1.1);
}

.info-details h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.info-details p, .info-details a {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    text-decoration: none;
}

.info-details a:hover {
    color: var(--brand-primary);
}

/* Map Interactive Card */
.map-card {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    height: 100%;
    min-height: 380px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
}

.map-card-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.map-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.map-card:hover .map-bg-image {
    transform: scale(1.05);
}

.map-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%);
    color: var(--bg-light);
    z-index: 2;
}

/* Custom modern buttons */
.btn-modern-primary {
    background-color: var(--brand-primary);
    color: var(--bg-white);
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(167, 28, 32, 0.2);
    transition: var(--transition-smooth);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modern-primary:hover {
    background-color: #8b1317;
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(167, 28, 32, 0.35);
}

.btn-modern-secondary {
    background-color: var(--brand-secondary);
    color: var(--text-primary);
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.2);
    transition: var(--transition-smooth);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modern-secondary:hover {
    background-color: #d4ac0d;
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.35);
}

.btn-modern-teal {
    background-color: #1abc9c;
    color: var(--bg-white);
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(26, 188, 156, 0.2);
    transition: var(--transition-smooth);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modern-teal:hover {
    background-color: #16a085;
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 188, 156, 0.35);
}

.btn-modern-light {
    background-color: var(--bg-white);
    color: var(--brand-primary);
    border: 1px solid rgba(167, 28, 32, 0.15);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modern-light:hover {
    background-color: var(--bg-light);
    color: #8b1317;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Trabalhe Conosco CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #8b1317 100%);
    border-radius: var(--border-radius-md);
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(167, 28, 32, 0.2);
}

.cta-banner::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.cta-banner::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

.cta-content {
    position: relative;
    z-index: 2;
}

/* Modern Footer */
.footer-modern {
    background-color: var(--bg-dark);
    color: var(--bg-light);
    padding: 60px 0 30px 0;
    border-top: 4px solid var(--brand-primary);
}

.footer-modern .developer-link {
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.footer-modern .developer-link:hover {
    color: var(--brand-secondary) !important;
}

.footer-social-link {
    width: 48px;
    height: 48px;
    background-color: rgba(255,255,255,0.05);
    color: var(--brand-secondary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 8px;
    transition: var(--transition-smooth);
    font-size: 1.25rem;
    text-decoration: none;
}

.footer-social-link:hover {
    background-color: var(--brand-secondary);
    color: var(--bg-dark);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(241, 196, 15, 0.4);
}

.scroll-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: none;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 45px;
    background: var(--brand-primary);
    color: var(--bg-white);
    border-radius: 50%;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(167, 28, 32, 0.3);
    transition: var(--transition-smooth);
    border: 2px solid var(--bg-white);
}

.scroll-to-top:hover {
    background: #8b1317;
    color: var(--bg-white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(167, 28, 32, 0.55);
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--bg-white);
        border-radius: var(--border-radius-md);
        padding: 15px;
        margin-top: 10px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    /* Ensure links in mobile dropdown are always readable (dark text on white bg) */
    .navbar-custom .navbar-collapse .nav-link {
        color: var(--text-primary) !important;
    }
    
    .navbar-custom .navbar-collapse .nav-link:hover,
    .navbar-custom .navbar-collapse .nav-link.active {
        color: var(--brand-primary) !important;
        background-color: rgba(167, 28, 32, 0.05);
    }

    .masthead-modern {
        min-height: auto;
        padding: 140px 0 80px 0;
    }
    .section-padding {
        padding: 60px 0;
    }
    .dept-card {
        height: 280px;
        margin-bottom: 24px;
    }
    .dept-card-content p {
        opacity: 0.95;
    }
    .dept-card-content {
        transform: translateY(0);
    }
    .map-card {
        min-height: 300px;
    }
}
