/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 2rem;
    color: #fbbf24;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fbbf24;
}

/* Main content */
.main {
    margin-top: 80px;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.version {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Table of Contents */
.toc {
    padding: 4rem 0;
    background: white;
}

.toc h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e40af;
    font-weight: 600;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.toc-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toc-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.toc-item i {
    font-size: 1.5rem;
    color: #3b82f6;
    min-width: 24px;
}

.toc-item a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
}

.toc-item a:hover {
    color: #3b82f6;
}

/* Sections */
.section {
    padding: 4rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.section:nth-child(even) {
    background: white;
}

.section:nth-child(odd) {
    background: #f8fafc;
}

.section h2 {
    font-size: 2.5rem;
    color: #1e40af;
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section h2 i {
    color: #3b82f6;
}

.section h3 {
    font-size: 1.8rem;
    color: #374151;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.section h4 {
    font-size: 1.3rem;
    color: #4b5563;
    margin: 1.5rem 0 0.5rem 0;
    font-weight: 600;
}

.content-block {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.intro {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 2rem;
}

/* Highlight box */
.highlight-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.highlight-box h3 {
    color: #1e40af;
    margin-top: 0;
}

/* Benefits grid */
.benefits {
    margin-top: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.benefit-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    text-align: center;
}

.benefit-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.benefit-item i {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.benefit-item h4 {
    color: #1e40af;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.2rem;
}

.benefit-item p {
    color: #6b7280;
    line-height: 1.6;
}

/* Architecture diagram */
.architecture-diagram {
    background: #1f2937;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.diagram {
    color: #e5e7eb;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre;
    margin: 0;
}

/* Tech stack */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stack-section {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.stack-section h4 {
    color: #1e40af;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stack-section ul {
    list-style: none;
    padding: 0;
}

.stack-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    color: #4b5563;
}

.stack-section li:last-child {
    border-bottom: none;
}

.stack-section strong {
    color: #1e40af;
    font-weight: 600;
}

/* Responsibilities */
.responsibilities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.responsibility-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.responsibility-item h4 {
    color: #1e40af;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.responsibility-item p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* API Endpoints */
.api-endpoint {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.endpoint-method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.875rem;
    margin-right: 1rem;
    min-width: 60px;
    text-align: center;
}

.endpoint-method.get {
    background: #28a745;
    color: white;
}

.endpoint-method.post {
    background: #007bff;
    color: white;
}

.endpoint-method.put {
    background: #ffc107;
    color: #212529;
}

.endpoint-method.delete {
    background: #dc3545;
    color: white;
}

.endpoint-path {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-right: 1rem;
    flex: 1;
}

.endpoint-desc {
    color: #6c757d;
    flex: 2;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-item i {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.feature-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.feature-item p {
    color: #6c757d;
    line-height: 1.6;
}

/* Tech Features */
.tech-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tech-feature {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.tech-feature h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.tech-feature h4 i {
    color: #28a745;
    margin-right: 0.5rem;
}

.tech-feature p {
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* User Profiles */
.user-profiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.profile-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
}

.profile-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.profile-header i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.profile-header h4 {
    margin: 0;
    font-size: 1.25rem;
}

.profile-content {
    padding: 1.5rem;
}

.profile-content h5 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.profile-content ul {
    margin-bottom: 1.5rem;
}

.profile-content li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Workflow Diagram */
.workflow-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
}

.workflow-step {
    display: flex;
    align-items: center;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
    width: 100%;
    max-width: 600px;
}

.step-number {
    background: #007bff;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.workflow-arrow {
    font-size: 2rem;
    color: #007bff;
    margin: 0.5rem 0;
}

/* Authorization Flow */
.authorization-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.auth-step {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.auth-step i {
    font-size: 2.5rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.auth-step h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.auth-step p {
    color: #6c757d;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.auth-arrow {
    font-size: 1.5rem;
    color: #28a745;
    font-weight: bold;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.benefit-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.benefit-item i {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.benefit-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.benefit-item p {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* Metrics Container */
.metrics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.metric-card {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.metric-value {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Conclusion */
.conclusion-content .lead {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 300;
}

.conclusion-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.highlight-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.highlight-item h4 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.highlight-item h4 i {
    color: #007bff;
    margin-right: 0.5rem;
}

.highlight-item p {
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.next-steps {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.next-steps h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.next-steps ul {
    margin: 0;
}

.next-steps li {
    margin-bottom: 0.75rem;
    color: #6c757d;
    line-height: 1.5;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    opacity: 0.6;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-stack {
        grid-template-columns: 1fr;
    }
    
    .responsibilities {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .content-block {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section h2 {
        font-size: 1.8rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

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

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out;
}

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}