/* API AFIP Documentation Styles */

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 70px;
    opacity: 0;
    animation: fadeInBody 0.6s ease forwards;
}

@keyframes fadeInBody {
    to { opacity: 1; }
}

.navbar.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.section-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h5 {
    margin: 0;
    font-weight: 600;
}

.section-body {
    padding: 20px;
    background: white;
}

.section-body.p-0 {
    padding: 0;
}

.badge-required {
    background: #dc3545;
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    font-weight: 500;
}

.badge-optional {
    background: #6c757d;
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    font-weight: 500;
}

.field-name {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2a5298;
    font-size: 0.9rem;
}

.field-desc {
    color: #6c757d;
    font-size: 0.9rem;
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 8px;
    padding: 20px;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 0;
    transition: box-shadow 0.3s ease;
}

.code-block:hover {
    box-shadow: 0 0 0 2px rgba(102,126,234,0.3), 0 8px 24px rgba(0,0,0,0.2);
}

.card-body {
    animation: cardBodyFadeIn 0.5s ease both;
}

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

.code-block pre {
    margin: 0;
    white-space: pre;
}

.code-block .key {
    color: #9cdcfe;
}

.code-block .string {
    color: #ce9178;
}

.code-block .number {
    color: #b5cea8;
}

.code-block .comment {
    color: #6a9955;
}

.endpoint-badge {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.method-badge {
    background: #007bff;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.table-field th {
    background: #f8f9fa;
    font-weight: 600;
    border-top: none;
}

.table-field td {
    vertical-align: middle;
    padding: 12px 16px;
}

.table-field tbody tr {
    transition: all 0.25s ease;
}

.table-field tbody tr:hover {
    background-color: #f0f4ff;
    transform: translateX(4px);
}

.nav-pills .nav-link {
    color: #495057;
    border-radius: 0;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-pills .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-pills .nav-link:hover {
    background-color: #f8f9fa;
    padding-left: 24px;
}

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

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    margin: 4px 8px;
    box-shadow: 0 4px 12px rgba(102,126,234,0.35);
}

.nav-pills .nav-link.active::after {
    display: none;
}

.tab-pane {
    animation: tabFadeIn 0.4s ease;
}

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

.list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.list-group-item:hover {
    padding-left: 28px;
    background: #f8f9fa;
}

.list-group-item:hover::before {
    transform: scaleY(1);
}

.list-group-item:last-child {
    border-bottom: none;
}

.card.section-card {
    transition: all 0.4s ease;
    animation: cardFadeIn 0.6s ease both;
}

.card.section-card:nth-child(1) { animation-delay: 0.1s; }
.card.section-card:nth-child(2) { animation-delay: 0.2s; }
.card.section-card:nth-child(3) { animation-delay: 0.3s; }
.card.section-card:nth-child(4) { animation-delay: 0.4s; }
.card.section-card:nth-child(5) { animation-delay: 0.5s; }

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

.card.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.title-section {
    text-align: center;
    margin-bottom: 40px;
    animation: titleFadeIn 0.8s ease both;
}

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

.title-section h1 {
    color: #1e3c72;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.title-section h1::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 8px auto 0;
    border-radius: 2px;
    animation: lineExpand 0.8s ease 0.4s forwards;
}

@keyframes lineExpand {
    to { width: 80px; }
}

.title-section .lead {
    color: #6c757d;
    font-size: 1.1rem;
}

.title-section .d-flex {
    margin-top: 24px;
}

.card-body.p-0 .table {
    margin-bottom: 0;
}

.card-body.p-0 .table td {
    border-bottom: 1px solid #f0f0f0;
}

.card-body.p-0 .table tr:last-child td {
    border-bottom: none;
}

code.bg-light {
    background: #e9ecef !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #495057;
}

@media (max-width: 992px) {
    .navbar .container {
        flex-wrap: wrap;
    }

    .navbar .d-flex.align-items-center {
        flex-wrap: wrap;
        gap: 8px;
    }

    .navbar .btn-outline-light {
        font-size: 0.8rem;
        padding: 4px 12px;
    }

    .nav-pills {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 4px;
    }

    .nav-pills .nav-link {
        padding: 8px 14px;
        font-size: 0.8rem;
        border-radius: 8px !important;
        margin: 0 !important;
    }

    .nav-pills .nav-link.active {
        margin: 0 !important;
    }

    .nav-pills .nav-link::after {
        display: none;
    }

    .title-section .d-flex {
        flex-direction: column;
        gap: 12px !important;
    }

    .title-section .d-flex .method-badge {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .title-section .d-flex code {
        font-size: 0.8rem;
        word-break: break-all;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .title-section {
        margin-bottom: 24px;
    }

    .title-section h1 {
        font-size: 1.5rem;
    }

    .title-section .lead {
        font-size: 0.95rem;
    }

    .endpoint-badge, .method-badge {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .section-header {
        padding: 12px 16px;
    }

    .section-header h5 {
        font-size: 0.95rem;
    }

    .code-block {
        padding: 14px;
        font-size: 0.75rem;
    }

    .code-block pre {
        white-space: pre-wrap;
        word-break: break-word;
    }

    .table-field th,
    .table-field td {
        padding: 8px 10px !important;
        font-size: 0.8rem;
    }

    .field-name {
        font-size: 0.8rem;
        word-break: break-all;
    }

    .field-desc {
        font-size: 0.8rem;
    }

    .card-body .d-flex.justify-content-between {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start !important;
    }

    .list-group-item h6 {
        font-size: 0.9rem;
    }

    .list-group-item p {
        font-size: 0.8rem;
    }

    .list-group-item .badge {
        font-size: 0.7rem;
    }

    .list-group-item .d-flex {
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .list-group-item:hover {
        padding-left: 16px;
    }

    .list-group-item::before {
        display: none;
    }

    .table-field tbody tr:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .title-section h1 {
        font-size: 1.3rem;
    }

    .navbar-brand {
        font-size: 0.9rem !important;
    }

    .section-card {
        margin-bottom: 16px;
    }

    .card.section-card:hover {
        transform: none;
    }

    .table-field {
        font-size: 0.75rem;
    }

    .table-field th,
    .table-field td {
        padding: 6px 8px !important;
    }

    .code-block {
        padding: 10px;
        font-size: 0.7rem;
    }

    .badge-required,
    .badge-optional {
        font-size: 0.6rem;
        padding: 3px 6px;
    }
}
