/* Base Styles */
:root {
    --primary-color: #1a5276;
    --secondary-color: #2980b9;
    --accent-color: #3498db;
    --text-color: #333;
    --light-text: #f8f9fa;
    --background-color: #f8f9fa;
    --section-bg: #fff;
    --border-color: #e0e0e0;
    --header-font: 'Playfair Display', serif;
    --body-font: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--header-font);
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    margin-top: 1.2rem;
}

p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 3rem 0;
    text-align: center;
}

header h1 {
    color: var(--light-text);
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

header h2 {
    color: var(--light-text);
    font-size: 1.5rem;
    font-weight: 300;
    border-bottom: none;
    padding-bottom: 0;
}

/* Navigation */
nav {
    background-color: var(--secondary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav li {
    margin: 0 0.5rem;
    margin-bottom: 0;
}

nav a {
    color: var(--light-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* Main Content */
main {
    padding: 2rem 0;
}

section {
    background-color: var(--section-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

section:last-child {
    margin-bottom: 0;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin-bottom: 0;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .container {
        width: 95%;
    }
    
    nav ul {
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }
    
    header h2 {
        font-size: 1.2rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.3rem 0;
        width: 100%;
        text-align: center;
    }
    
    nav a {
        display: block;
        padding: 0.7rem 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.7rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    section {
        padding: 1.5rem;
    }
    
    ul, ol {
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 2rem 0;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    header h2 {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.7rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    section {
        padding: 1rem;
    }
    
    p, li {
        font-size: 0.95rem;
    }
    
    .container {
        width: 100%;
        padding: 0 10px;
    }
}

/* Additional Styling */
strong {
    color: var(--primary-color);
}

#referencias a {
    word-break: break-word;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--light-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
}
