
/* Variables de color y tipografía */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    
    --font-main: 'Roboto', sans-serif;
    --font-code: 'Source Code Pro', monospace;
    
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}
/* Reset adicional */
.sem-header, .sem-footer {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos del encabezado */
.sem-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: rgb(255, 255, 255);
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.sem-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    opacity: 0.5;
}

.sem-header .container {
    position: relative;
    z-index: 1;
}

.sem-header h1 {
    font-size: 2.5rem;
    margin: 1rem 0 0.5rem;
}

.sem-header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    opacity: 0.7;
}

/* Contenedor principal */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Estilos de secciones */
.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.8rem;
}

.content-section h2 i {
    color: var(--secondary-color);
}


/* Footer */
.sem-footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--secondary-color);
}

.footer-copy {
    text-align: center;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Estilos específicos para Semana 13 - APIs RESTful */

.rest-content {
    margin: 2rem 0;
}

.rest-overview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.rest-overview::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="40" fill="rgba(255,255,255,0.1)">🔄</text></svg>') repeat;
    animation: float 20s linear infinite;
}

.rest-overview h3 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.rest-overview p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.principle-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.principle-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.principle-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.principle-card h5 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.principle-card p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.http-methods {
    margin-top: 3rem;
}

.http-methods h3 {
    color: #2d3748;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: center;
}

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

.method-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border-left: 4px solid;
}

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

.method-card.get {
    border-left-color: #48bb78;
}

.method-card.post {
    border-left-color: #4299e1;
}

.method-card.put {
    border-left-color: #ed8936;
}

.method-card.patch {
    border-left-color: #9f7aea;
}

.method-card.delete {
    border-left-color: #f56565;
}

.method-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.method-card.get h4 {
    color: #48bb78;
}

.method-card.post h4 {
    color: #4299e1;
}

.method-card.put h4 {
    color: #ed8936;
}

.method-card.patch h4 {
    color: #9f7aea;
}

.method-card.delete h4 {
    color: #f56565;
}

.method-card p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.method-example {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid;
}

.method-card.get .method-example {
    border-left-color: #48bb78;
}

.method-card.post .method-example {
    border-left-color: #4299e1;
}

.method-card.put .method-example {
    border-left-color: #ed8936;
}

.method-card.patch .method-example {
    border-left-color: #9f7aea;
}

.method-card.delete .method-example {
    border-left-color: #f56565;
}

.method-example code {
    font-family: 'Source Code Pro', monospace;
    font-weight: bold;
    color: #2d3748;
    display: block;
    margin-bottom: 0.5rem;
}

.method-example span {
    color: #6b7280;
    font-size: 0.9rem;
}

.hateoas-content {
    margin: 2rem 0;
}

.hateoas-explanation {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.hateoas-explanation h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.benefit-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.benefit-item i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.benefit-item h4 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

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

.hateoas-example {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
}

.hateoas-example h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.serialization-content {
    margin: 2rem 0;
}

.serialization-tabs {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 2rem 0;
}

.tab-header {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 1rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    position: relative;
}

.tab-btn:hover {
    background: #e2e8f0;
}

.tab-btn.active {
    background: #667eea;
    color: #fff;
    border-bottom-color: #ffd700;
}

.tab-btn.active::after {
    content: "🔄";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.tab-content {
    display: none;
    padding: 2rem;
}

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

.tab-content h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.serialization-examples, .filtering-examples, .pagination-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.example-block {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
}

.example-block h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.ajax-content {
    margin: 2rem 0;
}

.ajax-overview {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: #fff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(66, 153, 225, 0.3);
    margin-bottom: 2rem;
}

.ajax-overview h3 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ajax-overview p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

.method-option {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.method-option:hover {
    transform: translateY(-5px);
}

.method-option h4 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: #ffd700;
}

.method-option p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.pros-cons {
    font-size: 0.9rem;
}

.pros {
    color: #68d391;
    margin-bottom: 0.5rem;
}

.cons {
    color: #fc8181;
}

.ajax-examples {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.ajax-examples .example-block {
    border-left-color: #4299e1;
}

.security-content {
    margin: 2rem 0;
}

.security-concepts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.concept-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-top: 4px solid;
}

.concept-card.csrf {
    border-top-color: #f56565;
}

.concept-card.cors {
    border-top-color: #48bb78;
}

.concept-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.concept-card.csrf h3 {
    color: #f56565;
}

.concept-card.cors h3 {
    color: #48bb78;
}

.concept-card p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.csrf-implementation, .cors-implementation {
    margin-top: 1.5rem;
}

.csrf-implementation h4, .cors-implementation h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.github-content {
    margin: 2rem 0;
}

.project-showcase {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #fff;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(45, 55, 72, 0.3);
    text-align: center;
}

.project-showcase h3 {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: #fff;
}

.project-showcase p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.api-features {
    margin: 2rem 0;
}

.api-features .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.api-features .feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.api-features .feature-item:hover {
    transform: translateY(-5px);
}

.api-features .feature-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #4299e1;
}

.api-features .feature-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.api-features .feature-item p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.api-endpoints {
    margin: 2rem 0;
    text-align: left;
}

.api-endpoints h4 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.endpoints-list {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
}

.endpoint-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.method {
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.8rem;
    min-width: 60px;
    text-align: center;
}

.method.get {
    background: #48bb78;
    color: white;
}

.method.post {
    background: #4299e1;
    color: white;
}

.method.put {
    background: #ed8936;
    color: white;
}

.endpoint-item code {
    font-family: 'Source Code Pro', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    flex: 1;
}

.endpoint-item span:last-child {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.github-link {
    margin-top: 2rem;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #4299e1;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.3);
}

.github-btn:hover {
    background: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4);
}

.github-btn i {
    font-size: 1.2rem;
}

.github-description {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.code-example {
    background: #1e293b;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-example code {
    color: #e2e8f0;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.summary-card {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
}

.summary-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-card h3::before {
    content: "🔄";
    font-size: 1.2rem;
}

.summary-card p {
    color: #6b7280;
    line-height: 1.6;
}

@keyframes float {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-100px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .rest-overview, .ajax-overview, .project-showcase {
        padding: 2rem;
    }
    
    .principles-grid, .methods-grid, .method-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tab-header {
        flex-direction: column;
    }
    
    .serialization-examples, .filtering-examples, .pagination-examples, .ajax-examples {
        grid-template-columns: 1fr;
    }
    
    .security-concepts {
        grid-template-columns: 1fr;
    }
    
    .api-features .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .endpoint-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .rest-overview h3, .ajax-overview h3 {
        font-size: 1.5rem;
    }
    
    .principle-card, .method-option {
        padding: 1rem;
    }
    
    .principle-card i, .api-features .feature-item i {
        font-size: 2rem;
    }
    
    .method-card {
        padding: 1.5rem;
    }
    
    .tab-btn {
        padding: 0.8rem 1rem;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    .code-example pre {
        padding: 1rem;
    }
    
    .code-example code {
        font-size: 0.8rem;
    }
    
    .github-btn {
        padding: 0.8rem 1.5rem;
    }
}

