/* ============================================
   BRODER.ONE - Custom Styles
   Design inspirado na Apple com identidade Broder
   ============================================ */

/* === BASE & RESETS === */
* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

html {
    overflow-x: hidden;
    width: 100%;
}

#hero {
    overflow-x: hidden;
    width: 100%;
}

/* Fix mobile text overflow and centering */
@media (max-width: 640px) {
    * {
        max-width: 100%;
    }
    
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100vw !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    #hero {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    #hero .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        width: 100%;
    }
    
    #hero .grid {
        padding-left: 0;
        padding-right: 0;
    }
    
    #hero h1 {
        font-size: 1.875rem !important;
        line-height: 1.2 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        text-align: center !important;
        padding: 0 0.5rem;
    }
    
    #hero p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        text-align: center !important;
        padding: 0 0.5rem;
    }
    
    /* Buttons */
    #hero .btn-primary,
    #hero .btn-secondary {
        width: 100%;
        max-width: calc(100vw - 2rem);
        text-align: center;
        justify-content: center;
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 0.9rem;
    }
    
    #hero .flex.flex-col {
        width: 100%;
        padding: 0;
    }
    
    /* Ensure stats don't overflow */
    #hero .grid-cols-3 {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    #hero .grid-cols-3 > div {
        padding: 0.5rem 0.25rem;
    }
    
    #hero .grid-cols-3 .text-3xl,
    #hero .grid-cols-3 .text-4xl {
        font-size: 1.75rem !important;
    }
    
    /* Benefit cards - perfect centering with 3px margins */
    .bg-broder-dark\/50 {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: calc(100vw - 6px) !important;
        width: 100%;
    }
    
    /* Grid container for benefit cards - minimal padding 3px */
    .grid.md\:grid-cols-2 {
        padding-left: 3px !important;
        padding-right: 3px !important;
        width: calc(100vw - 6px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100% !important;
    }
    
    /* Section container with benefit cards */
    .max-w-5xl.mx-auto {
        padding-left: 3px !important;
        padding-right: 3px !important;
        width: calc(100vw - 6px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Ensure cards stay within viewport */
    .rounded-2xl {
        box-sizing: border-box;
        max-width: 100%;
    }
    
    /* CTA buttons - ensure single line on mobile */
    .inline-flex.items-center.gap-2 {
        white-space: nowrap;
        max-width: 100%;
        font-size: 0.9rem !important;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

/* === GRADIENTES === */
.gradient-text {
    background: linear-gradient(135deg, #00D9D9 0%, #0099FF 50%, #6633FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-bg {
    background: linear-gradient(135deg, #00D9D9 0%, #0099FF 50%, #6633FF 100%);
}

.gradient-border {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #00D9D9 0%, #0099FF 50%, #6633FF 100%);
    border-radius: inherit;
    z-index: -1;
}

/* === NAVEGAÇÃO === */
#navbar {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#navbar.scrolled {
    background: rgba(15, 15, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    color: #e5e5e5;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00D9D9, #0099FF);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #00D9D9;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Segmentos */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-toggle i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 217, 217, 0.2);
    border-radius: 12px;
    min-width: 280px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #e5e5e5;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: #00D9D9;
}

.dropdown-item:hover {
    background: rgba(0, 217, 217, 0.1);
    color: #00D9D9;
    transform: translateX(5px);
}

.mobile-nav-link {
    color: #e5e5e5;
    font-weight: 500;
    padding: 0.75rem 0;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav-link:hover {
    color: #00D9D9;
    padding-left: 0.5rem;
}

/* === BOTÕES === */
.btn-primary {
    background: linear-gradient(135deg, #00D9D9 0%, #0099FF 100%);
    color: #ffffff;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 217, 217, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 217, 217, 0.5);
}

.btn-secondary {
    background: transparent;
    color: #00D9D9;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #00D9D9;
}

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

/* Mobile-first: botões full-width e melhor alinhamento */
@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem; /* 14px - reduzido para evitar 3 linhas */
        line-height: 1.3;
        white-space: normal;
        max-height: 3.5rem; /* Limita a 2 linhas aprox. */
    }
    
    /* Botões com textos longos */
    .btn-primary[href*="Diagn"],
    .btn-primary[href*="diagn"],
    .btn-primary[href*="Automatizar"],
    .btn-secondary[href*="Diagn"],
    .btn-secondary[href*="diagn"],
    .btn-secondary[href*="Automatizar"] {
        font-size: 0.8125rem; /* 13px para botões de diagnóstico/automação */
        padding: 0.75rem 1rem;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .btn-primary,
    .btn-secondary {
        font-size: 0.875rem; /* 14px */
        padding: 0.75rem 1rem;
    }
}

/* === SECTIONS === */
.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #00D9D9 0%, #0099FF 50%, #6633FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* === CARDS === */
.card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    background: rgba(26, 26, 26, 0.8);
    border-color: rgba(0, 217, 217, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 217, 217, 0.1);
}

/* === SEGMENTOS === */
.segment-card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.segment-card:hover {
    background: rgba(26, 26, 26, 0.9);
    border-color: rgba(0, 217, 217, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 217, 0.2);
}

.segment-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(0, 217, 217, 0.1), rgba(102, 51, 255, 0.1));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #00D9D9;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.segment-card:hover .segment-icon {
    background: linear-gradient(135deg, rgba(0, 217, 217, 0.2), rgba(102, 51, 255, 0.2));
    transform: scale(1.1);
}

/* === PLANOS === */
.pricing-card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    border-color: rgba(0, 217, 217, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(0, 217, 217, 0.15);
}

.pricing-card-featured {
    background: linear-gradient(135deg, rgba(0, 217, 217, 0.05), rgba(102, 51, 255, 0.05));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid;
    border-image: linear-gradient(135deg, #00D9D9, #6633FF) 1;
    border-radius: 1.5rem;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    transform: scale(1.05);
}

.pricing-card-featured:hover {
    transform: scale(1.08) translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 217, 217, 0.3);
}

/* === BENEFÍCIOS === */
.benefit-card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    background: rgba(26, 26, 26, 0.9);
    border-color: rgba(0, 217, 217, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 217, 0.15);
}

/* === FAQ === */
.faq-item {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(0, 217, 217, 0.2);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: #00D9D9;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: #00D9D9;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-answer p {
    color: #d1d5db;
    line-height: 1.7;
}

/* === FORMULÁRIO === */
.form-input {
    width: 100%;
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #00D9D9;
    background: rgba(15, 15, 15, 0.8);
    box-shadow: 0 0 0 3px rgba(0, 217, 217, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* === WHATSAPP FLOATING BUTTON === */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* === ANIMAÇÕES === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* === RESPONSIVIDADE === */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2.5rem;
    }
    
    .pricing-card-featured {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
    
    .card, .segment-card, .pricing-card, .pricing-card-featured, .benefit-card {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* === SMOOTH SCROLLING OFFSET === */
section {
    scroll-margin-top: 80px;
}

/* === GLASSMORPHISM EFFECTS === */
.glass {
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* === HOVER EFFECTS === */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* === SELECTION === */
::selection {
    background: rgba(0, 217, 217, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(0, 217, 217, 0.3);
    color: #ffffff;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00D9D9, #6633FF);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00E5E5, #7744FF);
}

/* === LOADING STATES === */
.loading {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* === ACCESSIBILITY === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #00D9D9;
    outline-offset: 2px;
}