:root {
    --background: 0 0% 100%;
    --foreground: 199 100% 24%;
    --primary: 199 100% 24%;
    --primary-foreground: 0 0% 100%;
    --secondary: 186 100% 38%;
    --secondary-foreground: 0 0% 100%;
    --muted: 210 17% 96%;
    --muted-foreground: 199 10% 45%;
    --accent: 30 80% 55%;
    --accent-foreground: 0 0% 100%;
    --border: 210 17% 90%;
    --radius: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    padding-top: 80px; /* Espaço para navegação fixa */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

main {
    min-height: calc(100vh - 80px);
}

/* Accessibility - Screen reader only */
.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;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive typography */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 1025px) {
    html {
        font-size: 16px;
    }
}

/* Transições para o layout da calculadora */
.calculator-container {
    position: relative;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculator-container.expanded {
    max-width: 90rem; /* max-w-7xl */
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .calculator-container.expanded {
        grid-template-columns: 33.333333% 66.666667%; /* 4 colunas / 8 colunas de 12 */
    }
}

.form-container {
    width: 100%;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-container {
    width: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(20px);
}

.result-container.show {
    display: block !important;
    opacity: 1 !important;
    transform: translateX(0);
}

/* Cards de calculadoras - estilo similar aos cards de resultado */
.calculator-card {
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.calculator-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.15), 0 12px 15px -5px rgba(0, 0, 0, 0.08);
    border-color: hsl(199, 100%, 24%); /* Cor primary - azul */
}

/* Ajuste para cards de resultado - melhorado para evitar quebra */
.result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.75rem;
    min-height: 120px;
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
    cursor: default;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: hsl(199, 100%, 24%); /* Cor primary - azul */
}

.result-card-value-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 0.5rem 0.75rem;
    overflow: hidden;
    position: relative;
}

.result-card-value {
    line-height: 1.1;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    margin: 0;
    display: block;
    /* Tamanho base será ajustado dinamicamente via JavaScript (mínimo 20px) */
}

/* Ajuste responsivo para valores - sem quebra de linha */
@media (max-width: 640px) {
    .result-card-value {
        line-height: 1.2;
    }
    
    .result-card-value-wrapper {
        min-height: 50px;
        padding: 0.5rem 0.5rem;
    }
    
    .result-card {
        padding: 0.875rem 0.625rem;
        min-height: 110px;
    }
    
    .result-card:hover {
        transform: translateY(-2px);
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .result-card-value {
        line-height: 1.15;
    }
    
    .result-card-value-wrapper {
        min-height: 55px;
        padding: 0.5rem 0.625rem;
    }
    
    .result-card {
        min-height: 115px;
    }
}

@media (min-width: 1025px) {
    .result-card-value {
        line-height: 1.1;
    }
    
    .result-card-value-wrapper {
        min-height: 60px;
        padding: 0.5rem 0.75rem;
    }
    
    .result-card {
        min-height: 120px;
    }
}

/* Garantir que valores pequenos ocupem espaço adequado */
.result-card-value:empty::before {
    content: '';
    display: inline-block;
}

/* Ajuste fino para diferentes tamanhos de texto */
.result-card-value[class*="text-4xl"],
.result-card-value[class*="text-5xl"],
.result-card-value[class*="text-6xl"] {
    letter-spacing: 0.02em;
}

/* Garantir que números longos sejam exibidos completamente */
.result-card-value-wrapper {
    max-width: 100%;
    word-wrap: break-word;
}

/* Melhorar legibilidade em diferentes tamanhos */
.result-card-value {
    font-weight: 700;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

/* Smooth transitions */
.transition-smooth {
    transition: all 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: hsl(var(--muted));
}

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

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

/* Utility classes */
.gradient-subtle {
    background: linear-gradient(180deg, hsl(0 0% 100%) 0%, hsl(210 17% 98%) 100%);
}

.shadow-elegant {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-card {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* About Cards - Enhanced effects */
.about-card {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.about-card:hover::before {
    left: 100%;
}

.about-card:hover {
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.15), 0 12px 15px -5px rgba(0, 0, 0, 0.08);
    border-color: hsl(var(--primary));
}

/* Tabela de Pontos - Responsiva */
#tabela-completa-container {
    width: 100%;
}

#tabela-completa table {
    min-width: 800px;
    margin: 0 auto;
}

#tabela-completa-container .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: hsl(199, 100%, 24%) hsl(210, 17%, 96%);
}

#tabela-completa-container .overflow-x-auto::-webkit-scrollbar {
    height: 8px;
}

#tabela-completa-container .overflow-x-auto::-webkit-scrollbar-track {
    background: hsl(210, 17%, 96%);
    border-radius: 4px;
}

#tabela-completa-container .overflow-x-auto::-webkit-scrollbar-thumb {
    background: hsl(199, 100%, 24%);
    border-radius: 4px;
}

#tabela-completa-container .overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: hsl(199, 100%, 20%);
}

/* Responsividade da tabela */
@media (max-width: 768px) {
    #tabela-completa table {
        font-size: 0.75rem;
    }
    
    #tabela-completa th,
    #tabela-completa td {
        padding: 0.5rem 0.25rem;
    }
}

/* Loader Icons Container */
.loader-icons-container {
    position: relative;
    width: 96px;
    height: 96px;
}

.loader-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

/* Scale classes - aplicadas quando não há animação ativa */
.loader-icon.scale-in {
    transform: scale(1);
}

.loader-icon.scale-out {
    transform: scale(0.7);
}

/* Animação de rotação para o globo - apenas quando ativo */
.loader-icon.fa-globe-americas.active {
    animation: rotateGlobe 3s linear infinite;
    transform: scale(1);
}

@keyframes rotateGlobe {
    0% { 
        transform: rotate(0deg) scale(1);
    }
    100% { 
        transform: rotate(360deg) scale(1);
    }
}

/* Animação de movimento para o avião - apenas quando ativo */
.loader-icon.fa-plane.active {
    animation: flyPlane 2s ease-in-out infinite;
    transform: scale(1);
}

@keyframes flyPlane {
    0%, 100% { 
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    }
    25% { 
        transform: translateX(8px) translateY(-8px) rotate(12deg) scale(1);
    }
    50% { 
        transform: translateX(0) translateY(-12px) rotate(0deg) scale(1);
    }
    75% { 
        transform: translateX(-8px) translateY(-8px) rotate(-12deg) scale(1);
    }
}

/* Animação de pulsação para a mala - apenas quando ativo */
.loader-icon.fa-suitcase-rolling.active {
    animation: pulseSuitcase 1.5s ease-in-out infinite;
    transform: scale(1);
}

@keyframes pulseSuitcase {
    0%, 100% { 
        transform: translateY(0) scale(1);
    }
    50% { 
        transform: translateY(-8px) scale(1);
    }
}

/* Loader fade transition */
#loader {
    transition: opacity 0.3s ease-out;
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loader.fade-out .loader-icon {
    animation: none !important;
}

/* Ebook Landing Page Styles */
.module-toggle {
    cursor: pointer;
    user-select: none;
}

.module-toggle i {
    transition: transform 0.3s ease;
}

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

.module-content {
    animation: slideDown 0.3s ease-out;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Waitlist Form Styles */
#waitlistForm input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#waitlistForm input:focus {
    background-color: rgba(255, 255, 255, 0.25);
}

#waitlistForm input {
    transition: background-color 0.3s ease;
}

/* Blog Styles */
.blog-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.category-filter-btn,
.tag-filter-btn {
    transition: all 0.3s ease;
}

.category-filter-btn:hover,
.tag-filter-btn:hover {
    transform: scale(1.05);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Blog Post Styles */
#postContentBody {
    line-height: 1.8;
    color: #374151;
}

#postContentBody h1,
#postContentBody h2,
#postContentBody h3,
#postContentBody h4 {
    color: hsl(var(--primary));
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#postContentBody h2 {
    font-size: 2rem;
    border-bottom: 2px solid hsl(var(--primary));
    padding-bottom: 0.5rem;
}

#postContentBody h3 {
    font-size: 1.5rem;
}

#postContentBody p {
    margin-bottom: 1.5rem;
}

#postContentBody ul,
#postContentBody ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

#postContentBody li {
    margin-bottom: 0.5rem;
}

#postContentBody a {
    color: hsl(var(--primary));
    text-decoration: underline;
    transition: color 0.3s ease;
}

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

#postContentBody img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#postContentBody blockquote {
    border-left: 4px solid hsl(var(--primary));
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}

#postContentBody code {
    background-color: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

#postContentBody pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

#postContentBody pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* Admin Tabs */
.tab-btn {
    transition: all 0.3s ease;
}

.tab-btn.active {
    border-bottom-color: hsl(var(--primary)) !important;
    color: hsl(var(--primary)) !important;
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

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

