/* Estilos espec�ficos para la p�gina de Flutter SafeArea */

.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;
}

/* Overview de SafeArea */
.safearea-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
    align-items: start;
}

.phone-comparison {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.phone-with-notch {
    text-align: center;
}

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

.phone-mockup-notch::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: #2c3e50;
    border-radius: 0 0 10px 10px;
}

.phone-screen-notch {
    border-radius: 15px;
    height: 350px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-content.unsafe {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.app-content.safe {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.status-bar {
    height: 30px;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

.safe-area-indicator {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 20px;
    background: rgba(46, 204, 113, 0.3);
    border-bottom: 2px dashed #2ecc71;
}

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

.phone-label {
    margin-top: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Escenarios de uso */
.usage-scenarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.scenario {
    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;
}

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

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

/* 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);
}

.comparison-container {
    display: flex;
    justify-content: center;
}

.phone-comparison-inline {
    display: flex;
    gap: 2rem;
}

.phone-example {
    text-align: center;
}

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

.phone-screen-example {
    border-radius: 10px;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.unsafe-example {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.safe-example {
    background: linear-gradient(135deg, #1dd1a1 0%, #10ac84 100%);
}

.status-bar-example {
    height: 25px;
    background: rgba(0,0,0,0.2);
}

.safe-area-visual {
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 15px;
    background: rgba(255,255,255,0.3);
    border-bottom: 2px dashed white;
}

.content-example {
    height: calc(100% - 25px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 1rem;
    color: white;
    font-weight: 600;
}

.content-example.overlapping {
    padding-top: 0;
    align-items: center;
}

.example-label {
    margin-top: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

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

.phone-screen-single {
    border-radius: 10px;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.safe-area-custom {
    height: 100%;
    position: relative;
}

.safe-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: rgba(52, 152, 219, 0.3);
}

.safe-left, .safe-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    background: rgba(52, 152, 219, 0.3);
}

.safe-left {
    left: 0;
}

.safe-right {
    right: 0;
}

.content-center {
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

.safe-area-minimum {
    height: 100%;
    background: #e8f6f3;
    position: relative;
}

.minimum-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px dashed #27ae60;
    border-radius: 8px;
}

.content-minimum {
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Casos de Uso */
.use-cases {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.use-case-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
}

.use-case-visual {
    display: flex;
    justify-content: center;
}

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

.phone-screen-small {
    border-radius: 8px;
    height: 280px;
    overflow: hidden;
}

.appbar-example {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.appbar-safe {
    height: 0;
}

.appbar-content {
    height: 56px;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

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

.no-appbar-example {
    height: 100%;
    position: relative;
}

.status-bar-visible {
    height: 30px;
    background: rgba(0,0,0,0.1);
}

.fullscreen-content {
    height: calc(100% - 30px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.custom-sides-example {
    height: 100%;
    display: flex;
}

.custom-left, .custom-right {
    width: 20px;
    background: rgba(52, 152, 219, 0.3);
}

.custom-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

/* 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);
}

#minimumValue {
    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;
}

.device-preview {
    display: flex;
    justify-content: center;
}

.device-mockup {
    width: 280px;
    background: #2c3e50;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.device-mockup.notch::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #2c3e50;
    border-radius: 0 0 12px 12px;
}

.device-mockup.tablet {
    width: 350px;
    padding: 25px;
}

.device-screen {
    border-radius: 12px;
    height: 450px;
    overflow: hidden;
    position: relative;
}

.safe-area-preview {
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
}

.preview-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.preview-boxes {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.preview-box {
    width: 60px;
    height: 60px;
    background: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
}

.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, Ejercicios, etc. (estilos similares a los anteriores) */
.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;
}

.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;
}

.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;
}

.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: white;
    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: #462f9f;
    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;
}
