﻿/* Estilos específicos para la página de Flutter TabBar */

.tutorial-article {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ecf0f1;
}

.article-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 300;
}

.article-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-section h3 {
    color: #34495e;
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
}

.content-section h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 1.5rem 0 1rem 0;
}

.content-section p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #555;
}

/* Overview de TabBar */
.tab-bar-overview {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    margin: 2rem 0;
    align-items: start;
}

.phone-mockup {
    width: 300px;
    background: #2c3e50;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.phone-screen {
    border-radius: 10px;
    height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-header {
    border-bottom: 1px solid #ecf0f1;
}

.tab-bar-example {
    display: flex;
}

.tab-item {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    color: #7f8c8d;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab-item.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.app-body {
    flex: 1;
    padding: 2rem;
}

.tab-content {
    display: none;
}

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

.overview-text h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.overview-text ul {
    margin: 0;
    padding-left: 1.5rem;
}

.overview-text li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Tipos de TabBars */
.tab-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tab-type {
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 4px solid #3498db;
    text-align: center;
}

.type-icon {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.tab-type h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.type-preview {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
}

.preview-tab-bar {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.preview-tab-bar.custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.preview-tab-bar.scrollable {
    overflow-x: auto;
    justify-content: flex-start;
}

.preview-tab-bar.scrollable .preview-tab {
    flex: 0 0 auto;
    min-width: 80px;
}

.preview-tab {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    color: #7f8c8d;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.preview-tab-bar.custom .preview-tab {
    color: rgba(255,255,255,0.7);
}

.preview-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.preview-tab-bar.custom .preview-tab.active {
    color: white;
    border-bottom-color: #fdcb6e;
}

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

.property-item {
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.property-item h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-family: monospace;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.property-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.property-details p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

/* Ejemplos Visuales */
.visual-examples {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.example-item {
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.example-visual {
    margin: 1.5rem 0;
}

.phone-mockup-small {
    width: 250px;
    background: #2c3e50;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.phone-screen-small {
    border-radius: 8px;
    height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tab-bar-example.classic .tab-item.active {
    color: #27ae60;
    border-bottom-color: #27ae60;
}

.tab-bar-example.icons {
    display: flex;
}

.tab-bar-example.icons .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}

.tab-bar-example.icons .tab-item i {
    font-size: 1.2rem;
}

.tab-bar-example.custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tab-bar-example.custom .tab-item {
    color: rgba(255,255,255,0.7);
}

.tab-bar-example.custom .tab-item.active {
    color: white;
    border-bottom-color: #fdcb6e;
}

.example-code {
    margin-top: 1.5rem;
}

/* Demo Interactivo */
.interactive-demo {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.demo-controls {
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#tabCountValue {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.demo-preview {
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.phone-mockup-preview {
    width: 280px;
    background: #2c3e50;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.phone-screen-preview {
    border-radius: 9px;
    height: 450px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-content-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-header-preview {
    border-bottom: 1px solid #ecf0f1;
}

.tab-preview {
    display: flex;
}

.app-body-preview {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.screen-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.preview-code {
    width: 100%;
    max-width: 600px;
}

.code-output {
    background: #2c3e50;
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* Mejores Prácticas */
.best-practices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.practice {
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.practice h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ecf0f1;
}

.practice ul {
    margin: 0;
    padding-left: 1.5rem;
}

.practice li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.pro-tip {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid #e17055;
}

.pro-tip h4 {
    color: #2d3436;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Ejercicios */
.exercises {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.exercise {
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.exercise-hint {
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

/* Solución de Problemas */
.troubleshooting-grid {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.problem {
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.problem h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-solution {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

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

.resource {
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 4px solid #3498db;
}

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

.resource-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.resource-link:hover {
    background: #2980b9;
}

/* Código */
.code-example {
    margin: 2rem 0;
}

.code-example h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

pre {
    background: #2c3e50;
    color: rgb(60, 79, 189);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

code {
    color: #e74c3c;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

pre code {
    background: none;
    color: rgb(60, 79, 189);
    padding: 0;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Estados de hover */
.tab-type:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.property-item:hover {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

.exercise:hover {
    transform: translateY(-3px);
    transition: transform 0.3s ease;
}