:root {
    --primary-color: #e34c26;
    --secondary-color: #1c2566;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --shadow-color:  #9b9b9b8f;
    --success-color: #28a745;
    --card-bg: #ffffff;


    /* tamaño texto parrafo */
    --textParrafo:  1.3rem;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7ff;
    padding-top: 20px;
}

.container {
    width: 90%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 15px;
 /* organizar el contenido 
     display: flex;
    flex-direction: column;*/
    align-items: center; /* Centra el contenido horizontalmente */
}

.main-content {
    display: flex;
    gap: 30px;
    margin: 30px auto;
}

/* Header Styles */
.main-header {
    /* background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); */
    background: linear-gradient(135deg, #f5efed 0%, #e34c26 50%, #e34c26 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 10px;
    
}

.main-header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.main-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Navigation */
.main-nav {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #000000;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    margin-bottom: 30px;
    border-radius: 8px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.main-nav li {
    margin: 0 1rem;
}

.main-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a:hover {
    background-color: var(--primary-color);
    color: rgb(249, 250, 255);
    transform: translateY(-2px);
}

/* Botón hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    margin-right: 10px;
}
.hamburger .bar {
    width: 28px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Sidebar */
.sidebar {
    flex: 0 0 280px;
    position: sticky;
    top: 120px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resource-card, .newsletter-card, .tip-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 5px var(--shadow-color);
}

.resource-card h3, .newsletter-card h3, .tip-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-list {
    list-style: none;
}

.resource-list li {
    margin-bottom: 0.8rem;
}

.resource-list a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    padding: 0.3rem 0;
}

.resource-list a:hover {
    color: var(--secondary-color);
}

.newsletter-card input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-family: inherit;
}

.newsletter-card button {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.newsletter-card button:hover {
    background-color: var(--secondary-color);
}

.tip-card p {
    line-height: 1.5;
}

.tip-card code {
    background: #f0f4ff;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Main Content */
main {
    flex: 1;
}

.section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-color);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(28, 37, 102, 0.25);
}

.section h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section p {
    size: 13px;
    font-size: medium;
    margin-bottom: 1.2rem;
    line-height: 1.6; 
}
.section img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-color);
}
.section img:hover {
    transform: scale(1.01);
    transition: transform 0.3s ease;
}
.article {
    margin-bottom: 2.5rem;
}

.article h3 {
    color: var(--primary-color);
    margin: 1.8rem 0 1.2rem;
    font-size: 1.5rem;
}
.article p {
    font-size: var(--textParrafo);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

/* Modelo de Caja Interactivo */
.interactive-box-model {
    background-color: #f0f4ff;
    border: 2px dashed var(--primary-color);
    padding: 30px;
    margin: 40px auto;
    max-width: 500px;
    position: relative;
    transition: all 0.3s ease;
}

.box-content-example {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.box-model-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.box-model-controls button {
    padding: 0.6rem 1.2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.box-model-controls button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.box-model-explanation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.box-model-part {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.box-model-part h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Flexbox vs Grid */
.layout-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.layout-example {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.flex-container-example {
    display: flex;
    justify-content: space-around;
    padding: 15px;
    background: #f0f4ff;
    margin-bottom: 15px;
}

.flex-item {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.grid-container-example {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px;
    background: #f0f4ff;
    margin-bottom: 15px;
}

.grid-item {
    background: var(--secondary-color);
    color: white;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

.use-cases {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.use-cases h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.use-cases ul {
    padding-left: 1.5rem;
}

.use-cases li {
    margin-bottom: 0.8rem;
}

/* Animaciones */
.transition-example {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.transition-box {
    width: 150px;
    height: 100px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.hover-me:hover {
    transform: translateY(-10px);
    background: var(--secondary-color);
}

.click-me:active {
    transform: scale(0.95);
    background: #ff6b6b;
}

.animation-examples {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.animated-box {
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.bounce {
    animation: bounce 1s infinite alternate;
}

.rotate {
    animation: rotate 3s infinite linear;
}

.pulse {
    animation: pulse 1.5s infinite ease-in-out;
}

.keyframe-explanation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.animation-properties {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.animation-properties ul {
    padding-left: 1.2rem;
}

.animation-properties li {
    margin-bottom: 0.7rem;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-20px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Footer */
.main-footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 3rem;
    border-radius: 10px 10px 0 0;
}

.main-footer p {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Back to Top Button */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}
/* Colores */
.color-table .copyable {
                        cursor: pointer;
                        background: #f4f4f4;
                        border-radius: 3px;
                        padding: 2px 6px;
                        transition: background 0.2s;
                    }
                    .color-table .copyable:hover,
                    .color-customizer .copyable:hover {
                        background: #d1eaff;
                    }
                    .color-preview {
                        display: inline-block;
                        width: 32px;
                        height: 32px;
                        border: 1px solid #ccc;
                        margin-left: 10px;
                        vertical-align: middle;
                        border-radius: 4px;
                    }

/* Responsive Design */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        flex: 0 0 auto;
        order: -1;
        margin-bottom: 30px;
    }
    
    .layout-comparison, .keyframe-explanation {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav li {
        margin: 0.3rem 0;
    }
    
    .main-header h1 {
        font-size: 2.2rem;
    }
    
    .box-model-explanation {
        grid-template-columns: 1fr;
    }
}