/* ========================================
   PLATAFORMA OIKOS - Landing Page Styles
   ======================================== */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Dashboard Tabs */
.dashboard-tab {
    background-color: #f9fafb;
    color: #6b7280;
    border: 2px solid transparent;
}

.dashboard-tab:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.dashboard-tab.active {
    background-color: #27785b;
    color: white;
    border-color: #27785b;
}

/* Tab Panels */
.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.tab-panel.active {
    display: block;
}

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

/* Pricing Toggle - Modernizado */
.pricing-toggle-container {
    position: relative;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 4px;
    display: inline-flex;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pricing-toggle {
    position: relative;
    z-index: 10;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.pricing-toggle:hover {
    color: #374151;
}

.pricing-toggle.active {
    color: white;
}

.pricing-toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    background: linear-gradient(135deg, #27785b 0%, #429970 100%);
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(39, 120, 91, 0.3);
    z-index: 5;
}

.pricing-toggle-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    animation: pulse-badge 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

/* Scroll to Top Button */
#scroll-to-top {
    transition: opacity 0.3s, transform 0.3s;
}

#scroll-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#scroll-to-top:hover {
    transform: translateY(-2px);
}

/* Form Styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

input[type="checkbox"]:focus {
    outline: 2px solid #27785b;
    outline-offset: 2px;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #27785b;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Placeholder Images */
img[src*="dashboard-"] {
    background: linear-gradient(135deg, #f3faf7 0%, #d1e7db 100%);
    min-height: 300px;
    object-fit: cover;
}

/* Mobile Menu Animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #27785b 0%, #429970 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1f5f46;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .dashboard-tab {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

/* Print Styles */
@media print {
    #navbar,
    #scroll-to-top,
    #cadastro,
    #redes-sociais,
    footer {
        display: none;
    }
}

/* 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 */
*:focus-visible {
    outline: 2px solid #27785b;
    outline-offset: 2px;
}

/* Smooth Transitions */
a, button {
    transition: all 0.2s ease;
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top-color: #27785b;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Error State */
.error-field {
    border-color: #ef4444 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success State */
.success-field {
    border-color: #10b981 !important;
}

/* ========================================
   FASE 1 - MELHORIAS MODERNAS
   ======================================== */

/* Scroll Progress Indicator */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #27785b 0%, #429970 50%, #ea580c 100%);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 2px 4px rgba(39, 120, 91, 0.3);
}

/* Price Animation */
.price-value {
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-value.updating {
    opacity: 0;
    transform: translateY(-10px);
}

/* Lazy Loading Images */
img.lazy {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

img.lazy.loaded {
    opacity: 1;
}

img[loading="lazy"] {
    background: linear-gradient(135deg, #f3faf7 0%, #d1e7db 100%);
}

/* Badge "Mais Popular" - Melhorado */
.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 6px -1px rgba(234, 88, 12, 0.4);
    white-space: nowrap;
    animation: float-badge 3s ease-in-out infinite;
    z-index: 10;
}

@keyframes float-badge {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-4px);
    }
}

.popular-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    border-radius: 9999px;
    opacity: 0.3;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    z-index: -1;
}

@keyframes pulse-ring {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.1;
    }
}

/* Pricing Card Hover Effect - Enhanced */
.pricing-card {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

.pricing-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pricing-card:hover::before {
    opacity: 0;
}

.pricing-card.popular {
    background: linear-gradient(135deg, #fff5f0 0%, #ffffff 100%);
    border-color: #ea580c !important;
    box-shadow: 0 0 0 1px #ea580c, 0 10px 15px -3px rgba(234, 88, 12, 0.2), 0 0 40px -10px rgba(234, 88, 12, 0.15);
}

.pricing-card.popular::before {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.pricing-card.popular:hover {
    box-shadow: 0 0 0 1px #ea580c, 0 20px 25px -5px rgba(234, 88, 12, 0.3), 0 0 60px -15px rgba(234, 88, 12, 0.25);
    transform: translateY(-10px) scale(1.02);
}

/* Pricing Button Enhanced */
.pricing-card .pricing-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pricing-card .pricing-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.pricing-card .pricing-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   FASE 3 - UX AVANÇADO
   ======================================== */

/* Ripple Animation */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Parallax Smooth Transition */
#hero .container {
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

/* Enhanced Input Focus */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #27785b;
    box-shadow: 0 0 0 3px rgba(39, 120, 91, 0.1);
    transition: all 0.2s ease;
}

input.success-field {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

input.error-field {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Stats Animation */
[data-count] {
    display: inline-block;
    transition: all 0.3s ease;
}

[data-count].animated {
    animation: countUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Hover Lift */
a[href^="#"]:hover,
button:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

a[href^="#"]:active,
button:active {
    transform: translateY(0);
}

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

/* Loading State for Forms */
form.loading {
    pointer-events: none;
    opacity: 0.6;
}

form.loading button[type="submit"] {
    position: relative;
}

form.loading button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Smooth Number Transition */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-count {
    animation: countUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

