/* ===================================
   IG7 Sistemas e Tecnologia
   Custom Styles
   =================================== */

:root {
    --primary-color: #0f0a6e;
    --secondary-color: #f58634;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;

    /* Modern UI tokens */
    --page-bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: rgba(255, 255, 255, 0.72);
    --border-subtle: rgba(15, 10, 110, 0.10);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --shadow-1: 0 10px 30px rgba(17, 24, 39, 0.08);
    --shadow-2: 0 18px 50px rgba(17, 24, 39, 0.14);
    --ring: 0 0 0 0.25rem rgba(15, 10, 110, 0.16);
}

/* General Styles */
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    line-height: 1.65;
    background: var(--page-bg);
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(245, 134, 52, 0.25);
}

/* Bootstrap Color Override */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0a0552;
    border-color: #0a0552;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #d96f28;
    border-color: #d96f28;
}

.btn-warning {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #d96f28;
    border-color: #d96f28;
    color: #fff;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: var(--surface-2) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.88) !important;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}

.navbar-brand {
    font-size: 1.5rem;
}

.navbar-logo {
    height: 50px;
    width: auto;
    transition: height 0.3s ease;
}

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

.nav-link {
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    color: var(--dark-color) !important;
    position: relative;
}

.nav-link:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: 10px;
}

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

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

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a1460 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(245, 134, 52, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 134, 52, 0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.hero-section p {
    position: relative;
    z-index: 1;
}

.hero-section .btn {
    position: relative;
    z-index: 1;
}

/* Divider */
.divider {
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 0 auto;
}

.divider-light {
    width: 80px;
    height: 4px;
    background-color: #fff;
    margin: 0 auto;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2) !important;
}

/* Feature Icons */
.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Custom column for 5 items in row */
@media (min-width: 768px) {
    .col-md-2-4 {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* Tech Cards */
.tech-card {
    background-color: var(--surface);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(17, 24, 39, 0.08);
    height: 100%;
    cursor: pointer;
    user-select: none;
}

.tech-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(15, 10, 110, 0.1);
    transform: translateY(-5px);
}

.tech-card:active {
    transform: translateY(-2px);
}

.tech-card p.small {
    font-size: 0.85rem;
}

.tech-card .fa-chevron-down {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.tech-card[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* Tech Details */
.tech-detail {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tech-detail .card {
    border-left: 4px solid var(--primary-color);
}

.tech-detail .card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Security Cards */
.security-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.security-card:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

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

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

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

/* Sections */
section {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Offset for fixed navbar */
section {
    scroll-margin-top: 80px;
}

/* List Styling */
.list-unstyled li {
    padding: 0.3rem 0;
}

/* Footer */
footer {
    border-top: 4px solid var(--secondary-color);
}

/* Footer (novo) */
.site-footer {
    background: radial-gradient(circle at 20% 20%, rgba(245, 134, 52, 0.14), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(15, 10, 110, 0.28), transparent 55%),
        #0b1220;
    padding: 4rem 0 1.25rem 0;
}

.footer-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 8px;
}

.footer-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.20);
    transform: translateY(-1px);
}

.footer-links a,
.footer-meta a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}

.footer-links a:hover,
.footer-meta a:hover {
    color: #fff;
}

.footer-links li,
.footer-meta li {
    padding: 0.35rem 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Back to top */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 88px; /* não colidir com botões flutuantes */
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1030;
}

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

/* Floating actions (WhatsApp + Ajuda) */
.floating-actions {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: flex;
    gap: 10px;
    z-index: 1031;
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-1);
    border: 1px solid rgba(17, 24, 39, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.floating-whatsapp {
    background: #25D366;
    color: #fff;
}

.floating-help {
    background: #ffffff;
    color: var(--primary-color);
}

.floating-btn i {
    font-size: 1.25rem;
    line-height: 1;
}

/* Credenciais (INPI + ABES) */
.credenciais-section {
    background: linear-gradient(180deg, rgba(15, 10, 110, 0.06), rgba(245, 134, 52, 0.05));
}

.cred-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(17, 24, 39, 0.08) !important;
    border-radius: var(--radius-lg);
}

.cred-logo {
    max-height: 90px;
    width: auto;
    object-fit: contain;
}

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

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

/* Responsive adjustments */
@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .display-3 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Link Colors */
a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* Navbar Toggle Icon Color */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Spacing utilities */
.py-6 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

/* Shadow utilities */
.shadow-sm {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.075) !important;
}

/* Contact Section Enhancements */
#contato .card {
    border-radius: 15px;
}

#contato .btn {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
}

/* Central de Ajuda Button in Navbar */
.navbar .btn-warning {
    border-radius: 20px;
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
}

/* Google Maps Container */
.map-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0 0 15px 15px;
}

.map-container iframe {
    display: block;
    border: 0;
}

/* Image Gallery */
/* (Sobre) Fotos "Nossa Estrutura" - sem corte */
.estrutura-card img {
    width: 100%;
    height: auto; /* remove o crop */
    object-fit: initial;
    display: block;
}

/* Deixa o card mais "premium" e consistente */
.estrutura-card {
    background: #fff;
}

.estrutura-card .card-body {
    border-top: 1px solid rgba(17, 24, 39, 0.08);
}

/* Alternativa: carrossel "Nossa Estrutura" (sem corte) */
.estrutura-carousel {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: #fff;
}

.estrutura-carousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.estrutura-frame {
    width: 100%; 
    background: linear-gradient(180deg, rgba(15, 10, 110, 0.05), rgba(15, 10, 110, 0.02));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.estrutura-img {
    width: 100%; 
    object-fit: contain; /* mostra a foto inteira */
    border-radius: 14px;
    background: #fff;
}

.estrutura-carousel .carousel-caption {
    position: static;
    background: #fff;
    color: #111827;
    text-align: center;
    padding: 0.9rem 1rem 1.1rem 1rem;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.estrutura-carousel .carousel-control-prev,
.estrutura-carousel .carousel-control-next {
    width: 12%;
}

.estrutura-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: #fff;
}

.estrutura-caption {
    padding: 0.9rem 1rem 1.1rem 1rem;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    text-align: center;
}

@media (max-width: 768px) {
    .estrutura-frame {
        height: 320px;
        padding: 14px;
    }
}

/* ==============================
   Sobre (layout novo)
   ============================== */
.sobre-section {
    position: relative;
}

.sobre-intro {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: var(--shadow-1);
}

.sobre-badge {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.sobre-title {
    line-height: 1.15;
}

.sobre-kpi {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 14px;
    padding: 0.9rem 1rem;
}

.sobre-kpi-value {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.15rem;
    line-height: 1.1;
}

.sobre-kpi-label {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.15rem;
}

.sobre-highlight {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65));
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: var(--shadow-1);
}

.sobre-missao {
    background: rgba(245, 134, 52, 0.08);
    border: 1px solid rgba(245, 134, 52, 0.18);
    border-radius: 14px;
    padding: 0.9rem 1rem;
}

.sobre-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(17, 24, 39, 0.08);
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
}

.sobre-tag i {
    color: var(--primary-color);
}

.sobre-card {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.sobre-card-header {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding: 1.25rem 1.25rem 0.75rem 1.25rem;
}

.sobre-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.14);
    flex: 0 0 auto;
}

.sobre-card-body {
    padding: 0 1.25rem 1.25rem 1.25rem;
}

.sobre-pill {
    background: rgba(15, 10, 110, 0.04);
    border: 1px solid rgba(15, 10, 110, 0.10);
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    color: #374151;
}

.sobre-values {
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: var(--shadow-1);
}

.sobre-value-card {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 16px;
    padding: 1rem 0.9rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sobre-value-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
    border-color: rgba(15, 10, 110, 0.18);
}

@media (max-width: 768px) {
    .map-container iframe {
        height: 350px;
    }
}

/* Carrossel de Clientes */
.clientes-carousel {
    overflow: hidden;
    padding: 2rem 0;
    background: white;
    position: relative;
}

.clientes-track {
    display: flex;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.cliente-item {
    flex: 0 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cliente-logo {
    height: 80px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: none;
    opacity: 1;
    transition: all 0.3s ease;
}

.cliente-logo:hover {
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.clientes-carousel:hover .clientes-track {
    animation-play-state: paused;
}

/* Logos dos Sistemas */
.sistema-logo {
    height: 80px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
}

/* Seção Nossos Números */
.numero-card {
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

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

.counter {
    display: inline-block;
    transition: color 0.3s ease;
}

.numero-icon i {
    transition: transform 0.3s ease;
}

.numero-card:hover .numero-icon i {
    transform: scale(1.2);
}

/* Formulários */
.form-control, .form-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: var(--ring);
}

.form-label {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Navbar Toggler for Light Theme */
.navbar-light .navbar-toggler {
    border-color: rgba(15, 10, 110, 0.2);
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815, 10, 110, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsividade adicional */
@media (max-width: 992px) {
    .cliente-logo {
        height: 50px;
    }

    .sistema-logo {
        height: 60px;
    }

    .numero-card {
        padding: 1.5rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .clientes-track {
        animation-duration: 20s;
    }

    .cliente-item {
        padding: 0 1rem;
    }

    .cliente-logo {
        height: 40px;
        max-width: 120px;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
