/* Estilos gerais para o website da Ribeiro Tecnologias & Serviços */

/* Variáveis de cores */
:root {
    --primary-color: #b40000;
    /* Vermelho do logotipo */
    --primary-hover: #8b0000;
    /* Vermelho mais escuro */
    --secondary-color: #000000;
    /* Preto */
    --accent-color: #ffc107;
    /* Amarelo */
    --dark-color: #1a1a1a;
    /* Preto mais escuro */
    --light-color: #f8f9fa;
    /* Cinza claro */
    --text-color: #2b2b2b;
    /* Texto principal */
    --text-muted: #6c757d;
    /* Texto secundário */
    --white: #ffffff;
    /* Branco */
    --success: #28a745;
    /* Verde */
    --danger: #dc3545;
    /* Vermelho alerta */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

::-webkit-scrollbar-track {
    background: var(--light-color);
}

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

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

/* Estilos gerais */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Espaçamento para o header fixo */
.header-spacer {
    height: 80px;
}

/* Estilos para links */
a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Botões personalizados */
.btn {
    padding: 10px 24px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(180, 0, 0, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(180, 0, 0, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Seções */
section {
    padding: 80px 0;
}

.section-title {
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin-bottom: 30px;
    overflow: hidden;
    background: var(--white);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

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

.card-title {
    font-weight: 600;
    margin-bottom: 15px;
}

/* Formulários */
.form-control {
    border-radius: 5px;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

/* Alertas */
.alert {
    border-radius: 5px;
    padding: 15px 20px;
}

/* Ícones */
.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Hero section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 150px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Serviços */
.service-card {
    text-align: center;
    padding: 30px;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Equipe */
.team-member {
    text-align: center;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid var(--light-color);
}

/* Testemunhos */
.testimonial {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
}

/* Contador de estatísticas */
.counter-box {
    text-align: center;
    padding: 30px;
    background-color: var(--light-color);
    border-radius: 10px;
    margin-bottom: 30px;
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding-top: 70px;
    padding-bottom: 20px;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 20px;
}

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

footer .social-icons a:hover {
    background-color: var(--primary-color);
}

/* Responsividade */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 100px 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 80px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .counter-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

}

/* outras regras que já tens no style.css... */

/* === Forçar botões com as cores do logotipo === */
.btn-primary {
    background-color: #b40000 !important;
    /* Vermelho principal */
    border-color: #b40000 !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #8b0000 !important;
    /* Vermelho mais escuro */
    border-color: #8b0000 !important;
    color: #fff !important;
}

.btn-secondary {
    background-color: #000000 !important;
    /* Preto */
    border-color: #000000 !important;
    color: #fff !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #333333 !important;
    /* Preto claro */
    border-color: #333333 !important;
    color: #fff !important;
}

/* Corrigir fundo e textos primários para a cor do logotipo */
.bg-primary {
    background-color: #b40000 !important;
    /* vermelho */
}

.text-primary {
    color: #b40000 !important;
}

/* ============================
   HERO SECTION
   ============================ */
.hero-section {
    background: url('../img/hero.jpg') center center/cover no-repeat;
    height: 100vh;
    /* ocupa a altura total da tela */
    color: #fff;
    /* texto branco */
    display: flex;
    align-items: center;
    /* centraliza verticalmente */
    text-align: center;
    /* centraliza o texto */
    position: relative;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* overlay escuro para dar contraste */
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    /* garante que o texto fique acima do overlay */
}

/* === Header com efeito scroll === */
header {
    transition: box-shadow 0.3s ease;
}
header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}
header.scrolled .navbar {
    background-color: #fff !important;
}

/* === Hero subpáginas (altura menor) === */
.subpage-hero {
    min-height: 50vh;
    padding: 120px 0 60px;
}

/* === WhatsApp flutuante === */
.whatsapp-float {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
    z-index: 1050;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37,211,102,0.5);
    color: #fff;
}

/* === Scroll to top === */
#scrollTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(180,0,0,0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1050;
}
#scrollTop.visible {
    opacity: 1;
    visibility: visible;
}
#scrollTop:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}

/* === Contact info box === */
.contact-info .social-icons a {
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
    text-decoration: none;
}
.contact-info .social-icons a:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}

/* === Processo steps (quote page) === */
.process-number {
    display: inline-flex;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* === Testimonial cards === */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}
.testimonial-author img {
    object-fit: cover;
    background: #eee;
}

/* === Quote/Talent form cards === */
.quote-form .card-header.bg-primary {
    background-color: var(--primary-color) !important;
}

/* === Form loading state === */
.btn .btn-loading { display: none; }

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
    --bs-body-bg: #0f0f0f;
    --bs-body-color: #e0e0e0;
    --bs-card-bg: #1e1e2e;
    --text-color: #e0e0e0;
    --text-muted: #aaa;
    --bs-border-color: #333;
}
[data-theme="dark"] body { background: #0f0f0f; color: #e0e0e0; }
[data-theme="dark"] .navbar, [data-theme="dark"] header { background: #141414 !important; }
[data-theme="dark"] .navbar .nav-link { color: #ccc !important; }
[data-theme="dark"] .navbar .nav-link:hover, [data-theme="dark"] .navbar .nav-link.active { color: #fff !important; }
[data-theme="dark"] .card { background: #1e1e2e; border-color: #333; color: #e0e0e0; }
[data-theme="dark"] .card-header { background: #252535 !important; border-color: #333; }
[data-theme="dark"] .bg-light { background: #181828 !important; }
[data-theme="dark"] .bg-white { background: #1e1e2e !important; }
[data-theme="dark"] .text-muted { color: #aaa !important; }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select {
    background: #252535; color: #e0e0e0; border-color: #444;
}
[data-theme="dark"] .form-control:focus, [data-theme="dark"] .form-select:focus {
    background: #2a2a3e; color: #fff; border-color: #b40000;
}
[data-theme="dark"] .accordion-button { background: #1e1e2e; color: #e0e0e0; }
[data-theme="dark"] .accordion-item { background: #1e1e2e; border-color: #333; }
[data-theme="dark"] .accordion-collapse { background: #1e1e2e; }
[data-theme="dark"] .modal-content { background: #1e1e2e; color: #e0e0e0; border-color: #333; }
[data-theme="dark"] .modal-header, [data-theme="dark"] .modal-footer { border-color: #333; }
[data-theme="dark"] .table { color: #e0e0e0; }
[data-theme="dark"] .table-hover tbody tr:hover { background: rgba(255,255,255,.04); }
[data-theme="dark"] .alert-light { background: #252535; border-color: #444; color: #e0e0e0; }
[data-theme="dark"] footer { background: #090909 !important; }
[data-theme="dark"] hr { border-color: #333; }
[data-theme="dark"] .contact-info { background: #1e1e2e !important; }
[data-theme="dark"] .shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,.5) !important; }
[data-theme="dark"] .section-title h2 { color: #fff; }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #b40000, #ff4444);
    z-index: 9999;
    transition: width .1s linear;
}

/* ============================================================
   TESTIMONIAL AVATARS
   ============================================================ */
.testimonial-avatar {
    width: 46px; height: 46px; min-width: 46px;
    border-radius: 50%;
    background: var(--primary-color, #b40000);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem;
}

/* ============================================================
   HERO TYPED TEXT
   ============================================================ */
.hero-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 0; }
@media(min-width:768px){ .hero-title { font-size: 2.8rem; } }
.typed-cursor { color: #ffc107; }

/* ============================================================
   DARK MODE THEME TOGGLE
   ============================================================ */
#theme-toggle { color: inherit; border: none; background: none; }
[data-theme="dark"] #theme-toggle { color: #ffd700; }

/* ============================================================
   PORTFOLIO LIGHTBOX / CARD HOVER
   ============================================================ */
.portfolio-card { transition: transform .25s ease, box-shadow .25s ease; }
.portfolio-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,.18) !important; }
[data-theme="dark"] .portfolio-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,.5) !important; }

/* ============================================================
   STATS ANIMATED COUNTERS
   ============================================================ */
.stat-counter { font-size: 3rem; font-weight: 800; line-height: 1; }

/* ════════════════════════════════════════════════════════════════
   Optimizações Mobile (Jul 2026)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    /* Touch targets: mínimo recomendado 44px */
    .btn:not(.btn-sm) {
        min-height: 44px;
        padding-top: .6rem;
        padding-bottom: .6rem;
    }
    .navbar .nav-link {
        padding-top: .75rem;
        padding-bottom: .75rem;
    }

    /* Inputs a 16px evitam o zoom automático do iOS ao focar */
    .form-control,
    .form-select,
    textarea.form-control {
        font-size: 1rem !important;
        min-height: 44px;
    }
    textarea.form-control { min-height: auto; }

    /* CTAs empilham em vez de transbordar */
    .hero-section .btn + .btn {
        margin-top: .5rem;
    }
    .hero-section .d-flex.gap-3,
    .hero-section .d-flex.gap-2 {
        flex-wrap: wrap;
    }

    /* Secções mais compactas — menos scroll */
    section, .section-padding {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Tabelas nunca rebentam o layout */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Cards com respiro lateral consistente */
    .card-body { padding: 1rem; }

    /* Imagens e iframes fluidos */
    img, iframe, video { max-width: 100%; height: auto; }

    /* Menu aberto: fundo sólido legível sobre qualquer secção */
    .navbar-collapse {
        background: #fff;
        border-radius: 10px;
        padding: .75rem 1rem;
        margin-top: .5rem;
        box-shadow: 0 8px 24px rgba(0,0,0,.12);
    }
}

@media (max-width: 575.98px) {
    /* Botões de formulário a toda a largura */
    form .btn[type="submit"] {
        width: 100%;
    }
    .counter-number { font-size: 2rem; }
    h1, .h1 { font-size: 1.7rem; }
    h2, .h2 { font-size: 1.4rem; }
    .container { padding-left: 1.25rem; padding-right: 1.25rem; }
}