@charset "UTF-8";



/* keyframes FORA do @scope (nomes de keyframe são globais; prefixo evita colisão) */
@keyframes aimed-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

@scope (#cfm-root) {
    :scope {
        --primary: #0066CC;
        --secondary: #00A859;
        --accent: #FF6B35;
        --dark: #1E293B;
        --light: #F8FAFC;
        --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
        --gradient-accent: linear-gradient(135deg, var(--accent), #FF8C61);
        font-family: 'Outfit', sans-serif;
        color: var(--dark);
        line-height: 1.8;
        background: var(--light);
        overflow-x: hidden;
        text-rendering: optimizeLegibility;
    }

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

    /* Navigation Buttons */
    .nav-buttons {
        position: fixed;
        bottom: 30px;
        right: 30px;
        z-index: 999;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .nav-btn {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--gradient);
        color: white;
        border: none;
        cursor: pointer;
        font-size: 1.3rem;
        box-shadow: 0 6px 24px rgba(0,102,204,0.3);
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }

    .nav-btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 32px rgba(0,102,204,0.4);
    }

    .nav-btn.secondary {
        background: linear-gradient(135deg, #64748B, #475569);
    }

    /* Language Toggle */
    .language-toggle {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1000;
        background: white;
        padding: 12px 24px;
        border-radius: 30px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        display: flex;
        gap: 15px;
        align-items: center;
    }

    .lang-btn {
        background: none;
        border: 2px solid var(--primary);
        color: var(--primary);
        padding: 8px 20px;
        border-radius: 20px;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.3s;
        font-family: 'Outfit', sans-serif;
    }

    .lang-btn.active {
        background: var(--gradient);
        color: white;
        border-color: transparent;
    }

    .lang-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,102,204,0.3);
    }

    /* Hero Section */
    .hero {
        background: var(--gradient);
        color: white;
        padding: 120px 20px 80px;
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    .hero::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 600px;
        height: 600px;
        background: rgba(255,255,255,0.1);
        border-radius: 50%;
        animation: aimed-float 20s infinite ease-in-out;
    }

    .hero h2.ino-h1 {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
        font-weight: 800;
        margin-bottom: 25px;
        line-height: 1.2;
        position: relative;
        z-index: 1;
        color: #fff;
        font-family: 'Outfit', sans-serif;
    }

    .hero .subtitle {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
        margin-bottom: 20px;
        opacity: 0.95;
        font-weight: 400;
    }

    .hero .author {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
        opacity: 0.9;
        margin-top: 30px;
        font-weight: 500;
    }

    /* Container */
    .container {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: clamp(40px, 8vw, 80px) clamp(15px, 4vw, 20px);
    }

    /* Section Styling */
    .section {
        margin-bottom: 80px;
    }

    .section-title {
        font-size: clamp(2rem, 5vw, 2.5rem);
        font-weight: 700;
        margin-bottom: 30px;
        color: var(--dark);
        position: relative;
        padding-bottom: 15px;
    }

    .section-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 80px;
        height: 4px;
        background: var(--gradient);
        border-radius: 2px;
    }

    /* Enhanced TOC */
    .toc {
        background: linear-gradient(135deg, #ffffff, #f8fafc);
        padding: clamp(30px, 5vw, 50px) clamp(25px, 4vw, 45px);
        border-radius: 24px;
        margin-bottom: 60px;
        box-shadow: 0 15px 60px rgba(0,0,0,0.12);
        border: 1px solid rgba(0,102,204,0.1);
        position: relative;
        overflow: hidden;
    }

    .toc::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 6px;
        height: 100%;
        background: var(--gradient);
    }

    .toc h2 {
        font-size: clamp(1.8rem, 4vw, 2.2rem);
        color: var(--dark);
        margin-bottom: 15px;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .toc h2::before {
        content: '📑';
        font-size: 2rem;
    }

    .toc-subtitle {
        font-size: 1.1rem;
        color: #64748B;
        margin-bottom: 35px;
        font-weight: 400;
    }

    .toc ul {
        list-style: none;
        padding-left: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .toc ul li a {
        display: flex;
        align-items: center;
        gap: 15px;
        text-decoration: none;
        color: var(--dark);
        font-weight: 600;
        font-size: clamp(1rem, 3vw, 1.15rem);
        padding: 18px 22px;
        background: white;
        border-radius: 12px;
        transition: all 0.3s;
        border: 2px solid transparent;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }

    .toc ul li a::before {
        content: '';
        width: 8px;
        height: 8px;
        background: var(--gradient);
        border-radius: 50%;
        flex-shrink: 0;
    }

    .toc ul li a:hover {
        transform: translateX(8px);
        border-color: var(--primary);
        box-shadow: 0 8px 24px rgba(0,102,204,0.15);
        background: linear-gradient(135deg, #ffffff, #f0f9ff);
    }

    .toc ul li a:hover::before {
        transform: scale(1.3);
    }

    /* Intro Box */
    .intro-box {
        background: white;
        padding: 40px;
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.08);
        margin-bottom: 60px;
        border-left: 6px solid var(--primary);
    }

    .intro-box p {
        font-size: clamp(1rem, 3vw, 1.2rem);
        line-height: 1.9;
        margin-bottom: 20px;
    }

    .intro-box strong {
        color: var(--primary);
        font-weight: 700;
    }

    /* Problem Section */
    .problem-box {
        background: linear-gradient(135deg, #FFF3E6, #FFE8D6);
        padding: 50px;
        border-radius: 20px;
        margin-bottom: 60px;
        border-left: 6px solid var(--accent);
    }

    .problem-box h3 {
        font-size: 2rem;
        color: var(--accent);
        margin-bottom: 25px;
        font-weight: 700;
    }

    /* AIMED Methodology Cards */
    .aimed-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
        margin: 50px 0;
    }

    .aimed-card {
        background: white;
        padding: 35px;
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.08);
        transition: all 0.3s;
        border-top: 4px solid var(--primary);
        position: relative;
        overflow: hidden;
    }

    .aimed-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--gradient);
        opacity: 0;
        transition: opacity 0.3s;
        z-index: 0;
    }

    .aimed-card:hover::before {
        opacity: 0.05;
    }

    .aimed-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 50px rgba(0,102,204,0.15);
    }

    .aimed-letter {
        font-size: 4rem;
        font-weight: 800;
        background: var(--gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 15px;
        position: relative;
        z-index: 1;
    }

    .aimed-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--dark);
        margin-bottom: 15px;
        position: relative;
        z-index: 1;
    }

    .aimed-description {
        font-size: 1.05rem;
        color: #64748B;
        line-height: 1.7;
        position: relative;
        z-index: 1;
    }

    /* Example Boxes */
    .example-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        margin: 40px 0;
    }

    .example-box {
        background: white;
        padding: 35px;
        border-radius: 15px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    }

    .example-bad { border-left: 5px solid #EF4444; }
    .example-good { border-left: 5px solid var(--secondary); }

    .example-label {
        font-weight: 700;
        font-size: 1.1rem;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .example-bad .example-label { color: #EF4444; }
    .example-good .example-label { color: var(--secondary); }

    .example-label::before {
        content: '✗';
        font-size: 1.5rem;
    }

    .example-good .example-label::before { content: '✓'; }

    .example-content {
        background: #F8FAFC;
        padding: 20px;
        border-radius: 10px;
        font-family: 'Courier New', monospace;
        font-size: 0.95rem;
        line-height: 1.6;
        color: var(--dark);
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Detailed Section */
    .detailed-section {
        background: white;
        padding: clamp(30px, 5vw, 50px);
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.08);
        margin: 40px 0;
    }

    .detailed-section h3 {
        font-size: clamp(1.8rem, 4vw, 2rem);
        color: var(--primary);
        margin-bottom: 25px;
        font-weight: 700;
    }

    .detailed-section h4 {
        font-size: 1.5rem;
        color: var(--dark);
        margin: 30px 0 20px;
        font-weight: 600;
    }

    /* Trava (Lock) Section */
    .trava-section {
        background: linear-gradient(135deg, #FFF9E6, #FFF3D6);
        padding: clamp(40px, 6vw, 60px);
        border-radius: 20px;
        box-shadow: 0 15px 50px rgba(255,107,53,0.15);
        margin: 60px 0;
        border: 3px solid var(--accent);
        position: relative;
    }

    .trava-section > div {
        background: white;
        padding: 40px;
        border-radius: 15px;
        margin-top: 30px;
    }

    .trava-icon {
        position: absolute;
        top: -30px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--gradient-accent);
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        box-shadow: 0 10px 30px rgba(255,107,53,0.3);
    }

    .trava-section h3 {
        font-size: clamp(2rem, 5vw, 2.5rem);
        color: var(--accent);
        margin-bottom: 0;
        font-weight: 800;
        text-align: center;
    }

    /* CORRECT WORD BREAKING FIX */
    .trava-section li, .trava-section p {
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
    }

    /* Comparison Table Wrapper */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table {
        width: 100%;
        min-width: 600px;
        border-collapse: collapse;
        background: white;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 8px 30px rgba(0,0,0,0.06);
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .comparison-table th, .comparison-table td {
        padding: 20px;
        text-align: left;
    }

    .comparison-table th {
        background: var(--gradient);
        color: white;
        font-weight: 700;
        font-size: 1.1rem;
    }

    .comparison-table td { border-bottom: 1px solid #E2E8F0; }
    .comparison-table tr:last-child td { border-bottom: none; }
    .comparison-table tr:hover { background: #F8FAFC; }

    /* Stats Box */
    .stats-box {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 25px;
        margin: 50px 0;
    }

    .stat-item {
        background: white;
        padding: 30px;
        border-radius: 15px;
        text-align: center;
        box-shadow: 0 8px 30px rgba(0,0,0,0.06);
        transition: all 0.3s;
    }

    .stat-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px rgba(0,102,204,0.15);
    }

    .stat-number {
        font-size: 3rem;
        font-weight: 800;
        background: var(--gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 10px;
    }

    .stat-label {
        font-size: 1rem;
        color: #64748B;
        font-weight: 600;
    }

    /* Highlight Box */
    .highlight-box {
        background: linear-gradient(135deg, #E6F3FF, #D6EBFF);
        padding: 40px;
        border-radius: 15px;
        margin: 40px 0;
        border-left: 6px solid var(--primary);
    }

    .highlight-box p {
        font-size: 1.15rem;
        line-height: 1.8;
        margin-bottom: 15px;
    }

    /* Code Block */
    .code-block {
        background: #1E293B;
        color: #E2E8F0;
        padding: 30px;
        border-radius: 15px;
        margin: 30px 0;
        font-family: 'Courier New', monospace;
        font-size: 0.95rem;
        line-height: 1.8;
        overflow-x: auto;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    }

    /* CTA Section */
    .cta-section {
        background: var(--gradient);
        color: white;
        padding: 80px 40px;
        border-radius: 25px;
        text-align: center;
        margin: 80px 0;
        position: relative;
        overflow: hidden;
    }

    .cta-section::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 600px;
        height: 600px;
        background: rgba(255,255,255,0.1);
        border-radius: 50%;
        animation: aimed-float 15s infinite ease-in-out;
    }

    .cta-section h2 {
        font-size: clamp(2rem, 5vw, 2.5rem);
        margin-bottom: 25px;
        position: relative;
        z-index: 1;
    }

    .cta-section p {
        font-size: clamp(1.1rem, 3vw, 1.3rem);
        margin-bottom: 35px;
        opacity: 0.95;
        position: relative;
        z-index: 1;
    }

    /* Footer */
    .footer {
        background: var(--dark);
        color: white;
        padding: 50px 20px;
        text-align: center;
    }

    .footer p {
        font-size: 1rem;
        opacity: 0.8;
        margin-bottom: 10px;
    }

    /* Responsive */
    @media (max-width: 768px) {
        .language-toggle {
            top: 10px;
            right: 10px;
            padding: 8px 16px;
            gap: 8px;
        }
        .lang-btn {
            padding: 6px 14px;
            font-size: 0.9rem;
        }
        .nav-buttons {
            bottom: 20px;
            right: 20px;
        }
        .nav-btn {
            width: 50px;
            height: 50px;
            font-size: 1.1rem;
        }
    }

    @media (max-width: 480px) {
        :scope { line-height: 1.7; }
        .container { padding: 30px 15px; }
        .intro-box, .problem-box, .detailed-section, .highlight-box { padding: 25px; }
        .hero h2.ino-h1 { margin-bottom: 20px; }
        .hero .subtitle { font-size: 1.1rem; }
        .section-title { font-size: 1.8rem; }
        .toc h2 { font-size: 1.6rem; }
        .toc ul li a { padding: 14px 16px; font-size: 1rem; }
        .example-box { padding: 25px; }
        .stat-number { font-size: 2.5rem; }
        .cta-section { padding: 60px 25px; }

        /* LAYOUT FIX FOR DIRECTIVES SECTION */
        .trava-section { padding: 40px 15px 25px 15px; }
        .trava-section > div { padding: 25px 20px; }
        .trava-section h4 { font-size: 1.5rem; }
        .trava-section .code-block { padding: 20px; }
        .trava-section ul { padding-left: 20px; margin-left: 0; }
    }

    /* Hidden class */
    .hidden { display: none; }
}
