/* ==========================================================================
   Teu Lanche - CSS Principal
   ========================================================================== */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #25d366;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 700;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* Logout forms */
.logout-form {
    display: inline;
}

.logout-form .dropdown-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-form .dropdown-item:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545 !important;
}

.sidebar .logout-form .nav-link {
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar .logout-form .nav-link:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545 !important;
}

/* Cards */
.card {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    z-index: 1050;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 1.1rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.navbar.fixed-top {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-brand {
    font-size: 1.3rem;
}

/* Tamanhos dos logos */
.navbar-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-logo {
    width: 32px;
    height: 32px;
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.25rem;
    padding: 0.75rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color) !important;
}

/* Compensação para conteúdo quando navbar é fixo */
body {
    padding-top: 76px; /* Altura aproximada da navbar */
}

@media (max-width: 991.98px) {
    /* Bootstrap's lg breakpoint */
    body {
        padding-top: 60px; /* Reduzir padding para mobile */
    }
    
    .navbar {
        padding: 0.5rem 0; /* Navbar mais compacta em mobile */
    }
    
    .navbar.scrolled {
        padding: 0.375rem 0;
    }
    
    /* Garantir que o menu colapsável não sobreponha o conteúdo */
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        margin: 0 -1rem;
        padding: 0.5rem 1rem;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
    }
    
    /* Ajustar altura mínima para hero section em mobile */
    .hero-section .min-vh-75 {
        min-height: calc(100vh - 60px);
        padding-top: 1rem;
    }
    
    /* Melhorar espaçamento dos itens de navegação em mobile */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        text-align: center;
        border-radius: 8px;
        margin: 0.25rem 0;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(102, 126, 234, 0.08);
    }
    
    /* Ajustar botão de cadastro em mobile */
    .navbar-nav .btn {
        margin: 0.5rem 0 0 0 !important;
        display: block;
        text-align: center;
    }
}

/* Footer */
footer {
    margin-top: auto;
}

.footer-link:hover {
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
}

.footer-social:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

footer h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.shadow-custom {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

/* Imagens responsivas e proporcionais */
img, svg, canvas, video {
    max-width: 100%;
    height: auto;
}

/**************************************
 A. Imagens em conteúdo rico (textos longos)
**************************************/
.content img,
article img,
.prose img,
.static-page img {
    display: block;
    margin: 1rem auto;
    height: auto;
}

/* Evitar distorção em logos e miniaturas */
.navbar-logo,
.footer-logo,
.logo {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Imagens de cards e galerias */
.card img,
.figure img,
.gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Ajustes específicos existentes para logos */
.navbar-logo {
    width: 40px;
    height: 40px;
}
.navbar.scrolled .navbar-logo {
    width: 32px;
    height: 32px;
}
.footer-logo {
    width: 32px;
    height: 32px;
}
.logo {
    width: 80px;
    height: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Garantir que imagens grandes não estourem o container no mobile */
    .container img,
    .container .img-fluid {
        max-width: 100%;
        height: auto;
    }
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid #fff;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
