/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Top Bar Styles */
.top-bar {
    background: var(--cor-fundo, #fff);
    padding: 3rem 2rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow: hidden;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.top-bar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    width: 100%;
}

.top-bar-col {
    display: flex !important;
    align-items: center !important;
}

.top-bar-col.center {
    justify-content: center !important;
    flex: 1 !important;
}

.top-bar-col.right {
    justify-content: flex-end !important;
    flex-direction: column !important;
    align-items: flex-end !important;
}

.selo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.selo-img {
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
}

.top-bar-social {
    font-size: 1.2rem !important;
    margin-bottom: 0.3rem !important;
}

.top-bar-social:last-child {
    margin-bottom: 0 !important;
}

.top-bar-social a {
    text-decoration: none;
    white-space: nowrap;
}

.top-bar-social i {
    margin-right: 5px;
}

/* Garantir que as cores dos links do topo sejam aplicadas corretamente */
.top-bar-social[id^="top-link-"] i {
    /* Cor será definida inline pelo PHP */
}

.top-bar-social[id^="top-link-"] a {
    /* Cor será definida inline pelo PHP */
}

/* Sobrescrever regras conflitantes do dynamic-colors.php */
.top-bar-social a {
    text-decoration: none;
    white-space: nowrap;
}

/* Centralização do logo em relação à página inteira */
.top-bar {
    position: relative;
}

.top-bar .container {
    position: relative;
    width: 100%;
}

.top-bar-col.center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
}

.top-bar-col.right {
    position: relative;
    z-index: 2;
    flex-direction: column !important;
    align-items: flex-end !important;
    margin-left: auto;
}

@media (max-width: 768px) {
    .top-bar-col.center {
        position: static !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* Força layout em coluna para celular */
@media (max-width: 768px) {
    .top-bar .d-flex.flex-column.flex-md-row {
        flex-direction: column !important;
    }

    .top-bar .d-flex.flex-column.flex-md-row>* {
        width: 100% !important;
        text-align: center !important;
    }

    /* Ajusta o logo para centralização normal em mobile */
    .top-bar-col.center {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Força centralização dos links */
    .top-bar .top-bar-col.right {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .top-bar .top-bar-social {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 5px 10px !important;
    }

    /* Sobrescreve estilos inline dos links do banco */
    .top-bar .top-bar-social a {
        text-align: center !important;
        display: inline-block !important;
        margin: 0 auto !important;
    }

    /* Força layout em coluna */
    .top-bar .d-flex {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Remove margens e paddings conflitantes */
    .top-bar .top-bar-col.center {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        text-align: center !important;
    }

    .top-bar .top-bar-col.right {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        text-align: center !important;
    }
}

/* Responsive adjustments for top bar */
@media (max-width: 768px) {
    .top-bar .d-flex {
        flex-direction: column !important;
        gap: 15px;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
    }

    .top-bar-col.center {
        margin-bottom: 0;
        justify-content: center !important;
        order: 1;
        width: 100% !important;
        text-align: center;
    }

    .top-bar-col.right {
        margin-left: 0 !important;
        justify-content: center !important;
        flex-wrap: wrap;
        max-width: 100%;
        order: 2;
        width: 100% !important;
        text-align: center;
        display: flex !important;
        justify-content: center !important;
        align-items: center;
    }

    .top-bar-social {
        margin: 8px 12px;
        font-size: 0.9rem;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .selo-img {
        max-height: 120px;
        max-width: 90%;
        min-height: 80px;
        min-width: 150px;
    }

    .top-bar .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 1.5rem 0;
    }

    .top-bar .container {
        padding: 0 10px;
    }

    .top-bar .d-flex {
        gap: 12px;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
        flex-direction: column !important;
    }

    .top-bar-col.center {
        width: 100% !important;
        text-align: center;
        justify-content: center !important;
        order: 1;
        margin: 0 !important;
        padding: 0 !important;
    }

    .top-bar-col.right {
        width: 100% !important;
        text-align: center;
        justify-content: center !important;
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center !important;
        order: 2;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    .top-bar-social {
        font-size: 0.85rem;
        margin: 6px 10px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .selo-img {
        max-height: 100px;
        max-width: 85%;
        min-height: 60px;
        min-width: 120px;
    }

    .top-bar-social a {
        word-break: break-word;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-align: center !important;
        display: inline-block !important;
        margin: 0 auto !important;
    }

    /* Força centralização dos links do banco */
    .top-bar .top-bar-social {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 6px 10px !important;
    }

    .top-bar .top-bar-social a {
        text-align: center !important;
        display: inline-block !important;
        margin: 0 auto !important;
    }
}

@media (max-width: 360px) {
    .top-bar-social {
        font-size: 0.8rem;
        margin: 5px 8px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .selo-img {
        max-height: 80px;
        max-width: 80%;
        min-height: 50px;
        min-width: 100px;
    }

    .top-bar-col.right {
        width: 100% !important;
        text-align: center;
        justify-content: center !important;
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Header */
header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #007bff !important;
}

/* Hero Section */
.hero {
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Services */
.service-card {
    text-align: center;
    padding: 2rem;
}

.service-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

/* Products */
.product-card {
    margin-bottom: 2rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #28a745;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-control {
    border-radius: 0;
    border: 1px solid #ddd;
    padding: 0.75rem;
}

.form-control:focus {
    box-shadow: none;
    border-color: #007bff;
}

/* Buttons */
.btn {
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Footer */
footer {
    margin-top: auto;
    background: var(--cor-footer) !important;
}

footer a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #007bff;
}

/* Social Icons */
.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background-color: #007bff;
}

/* Banners */
.banner {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.banner img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 1;
}

/* Testimonials */
.testimonial {
    text-align: center;
    padding: 2rem;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-author {
    font-weight: 600;
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
    }

    .banner img {
        height: 300px;
    }

    .card-img-top {
        height: 150px;
    }
}

/* Utilities */
.text-primary {
    color: #007bff !important;
}

.bg-primary {
    background-color: #007bff !important;
}

.border-primary {
    border-color: #007bff !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: none !important;
        color: #000 !important;
    }

    .container {
        width: 100%;
        max-width: none;
    }
}

.card.h-100 {
    border-radius: 15px;
    background-color: #f5f9fc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.h-100:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 180px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2b3e50;
    text-align: center;
}

.card-text {
    font-size: 0.95rem;
    color: #555;
    text-align: justify;
}

.slogan-bar {
    background: rgba(30, 30, 30, 0.7);
    /* preto translúcido */
    color: #fff;
    font-size: 1.3rem;
    letter-spacing: 1px;
    padding: 1.2rem 0;
    text-align: center;
    margin-bottom: 0;
    width: 100%;
}

.slogan-bar-custom {
    background: var(--cor-footer) !important;
    color: #fff;
    font-size: 1.3rem;
    letter-spacing: 1px;
    padding: 1.2rem 0;
    text-align: center;
    margin-bottom: 0;
    width: 100%;
}

@media (max-width: 600px) {
    .slogan-bar-custom {
        font-size: 1.1rem !important;
        padding: 10px 0 !important;
    }
}

.whatsapp-float i,
.back-to-top-float i {
    color: #fff !important;
}

/* WhatsApp flutuante sempre verde */
.whatsapp-float i {
    color: #25d366 !important;
}

/* Melhorias de responsividade geral */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Melhorar cards em mobile */
    .card {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 15px;
    }

    /* Melhorar formulários em mobile */
    .form-control {
        font-size: 16px;
        /* Evita zoom no iOS */
    }

    /* Melhorar botões em mobile */
    .btn {
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Melhorar navegação em mobile */
    .navbar-nav {
        text-align: center;
    }

    .nav-link {
        padding: 12px 15px !important;
        border-bottom: 1px solid #eee;
    }

    /* Melhorar seções em mobile */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    /* Melhorar footer em mobile */
    footer {
        text-align: center;
    }

    footer .col-md-4 {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {

    /* Melhorar espaçamentos em mobile pequeno */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Melhorar títulos em mobile */
    h1,
    h2,
    h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Melhorar cards em mobile pequeno */
    .card-body {
        padding: 12px;
    }

    /* Melhorar botões flutuantes em mobile */
    .whatsapp-float {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
        left: 10px;
        bottom: 10px;
    }

    .back-to-top-float {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        right: 10px;
        bottom: 10px;
    }
}

/* Melhorar acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Melhorar contraste para acessibilidade */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Correção para garantir que slogan e mapa sempre aparecem na tela */
@media screen {

    .slogan-bar,
    .slogan-bar-custom,
    .ratio,
    .ratio iframe {
        display: block !important;
    }
}

/* Mantém .no-print apenas para impressão */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Galeria Styles */
.galeria-section {
    background: var(--cor-fundo-site, #f8f9fa);
    padding: 60px 0;
}

.galeria-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.galeria-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.galeria-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.galeria-card:hover .card-img-top {
    transform: scale(1.05);
}

.galeria-card .card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.galeria-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    flex-shrink: 0;
}

.galeria-card .card-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex-grow: 1;
    min-height: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Botão discreto que não interfere nas cores personalizáveis */
.ver-galeria {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: transparent !important;
    border: 1px solid #6c757d !important;
    color: #6c757d !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.ver-galeria:hover {
    background: #6c757d !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none !important;
}

.ver-galeria:focus {
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25) !important;
}

/* Container para garantir posição proporcional dos botões */
.galeria-card .card-body .d-flex {
    margin-top: auto;
    align-items: center;
    flex-shrink: 0;
}

/* Modal da Galeria */
#modalGaleria .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

#modalGaleria .modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

#modalGaleria .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

#modalGaleria .modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.galeria-fotos h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.galeria-fotos .card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeria-fotos .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.galeria-fotos .card-img-top {
    height: 200px;
    object-fit: cover;
}

.galeria-fotos .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.galeria-fotos .card-text {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Responsive para galeria */
@media (max-width: 768px) {
    .galeria-section {
        padding: 40px 0;
    }

    .galeria-card .card-img-top {
        height: 180px;
    }

    .galeria-fotos .card-img-top {
        height: 160px;
    }

    #modalGaleria .modal-body {
        padding: 1rem;
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .galeria-card .card-img-top {
        height: 150px;
    }

    .galeria-fotos .card-img-top {
        height: 140px;
    }

    .ver-galeria {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Lightbox para galeria de fotos */
.galeria-lightbox-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.galeria-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    background: #fff;
    padding: 8px;
    animation: galeriaLightboxIn 0.2s;
}

@keyframes galeriaLightboxIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.galeria-lightbox-close {
    position: fixed;
    top: 32px;
    right: 32px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    background: none;
    border: none;
    z-index: 100000;
    cursor: pointer;
    text-shadow: 0 2px 8px #000;
    transition: color 0.2s;
}

.galeria-lightbox-close:hover {
    color: #ff5252;
}

.card.sem-sombra,
.card.sem-sombra *,
.sem-sombra,
.sem-sombra *,
.card.sem-sombra.card,
.card.sem-sombra.card *,
.card.sem-sombra.card.h-100,
.card.sem-sombra.card.h-100 *,
.card.h-100.sem-sombra,
.card.h-100.sem-sombra *,
.card.depoimento-card.sem-sombra,
.card.depoimento-card.sem-sombra *,
.card.galeria-card.sem-sombra,
.card.galeria-card.sem-sombra *,
.card.newsletter-card.sem-sombra,
.card.newsletter-card.sem-sombra *,
.card.download-card.sem-sombra,
.card.download-card.sem-sombra *,
.card.shadow-sm.sem-sombra,
.card.shadow-sm.sem-sombra *,
.card.border-0.sem-sombra,
.card.border-0.sem-sombra *,
.card.text-center.sem-sombra,
.card.text-center.sem-sombra *,
.newsletter-form.sem-sombra,
.newsletter-form.sem-sombra *,
.depoimento-card.sem-sombra,
.depoimento-card.sem-sombra *,
.galeria-card.sem-sombra,
.galeria-card.sem-sombra *,
.download-card.sem-sombra,
.download-card.sem-sombra *,
.shadow-sm.sem-sombra,
.shadow-sm.sem-sombra *,
.border-0.sem-sombra,
.border-0.sem-sombra *,
.text-center.sem-sombra,
.text-center.sem-sombra * {
    box-shadow: none !important;
}

/* Centralização do topo usando grid, sem afetar outros elementos */
.top-bar-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: relative;
}

.top-bar-col.center {
    grid-column: 2;
    justify-self: center;
}

.top-bar-col.right {
    grid-column: 3;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

@media (max-width: 768px) {
    .top-bar-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .top-bar-col.center,
    .top-bar-col.right {
        width: 100%;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }

    .top-bar-col.right {
        flex-direction: row;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Melhorar contraste dos botões flutuantes WhatsApp e Voltar ao Topo */
.whatsapp-float,
.back-to-top-float {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
    border: 2px solid #fff !important;
}

.whatsapp-float i,
.back-to-top-float i {
    text-shadow: 0 2px 6px #000, 0 0 2px #fff;
}