/* Variables globales */
:root {
    --primary-color: #2e7df7;
    --primary-dark: #1e63d0;
    --primary-light: #5a9af9;
    --secondary-color: #6c48e8;
    --accent-color: #ffc107;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #343a40;
    --border-color: #e1e4e8;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --header-height: 80px;
    --font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Contenedores */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

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

h2 {
    font-size: 2rem;
    margin-bottom: 1.2rem;
}

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

h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

p {
    margin-bottom: 1rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    line-height: 1.5;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateY(-2px);
}

.tertiary-btn {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.tertiary-btn:hover {
    background-color: var(--bg-light);
    color: var(--text-color);
}

/* Header y navegación */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container img {
    height: 60px;
    width: auto;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    padding-bottom: 5px;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Welcome Languages */
.welcome-languages {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 0.7rem;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5rem 5%;
    background: linear-gradient(135deg, #f6f9fe, #e6eef9);
}

.hero-content {
    width: 50%;
    padding-right: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--bg-dark);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.hero-image {
    width: 50%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

/* Featured Posts */
.featured-posts {
    padding: 5rem 5%;
    background-color: var(--bg-color);
}

.featured-posts h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.post-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-content h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.post-content p {
    color: var(--text-light);
    margin-bottom: 1.2rem;
}

.read-more {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
}

.read-more:hover {
    color: var(--primary-dark);
}

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}

.read-more:hover::after {
    margin-left: 8px;
}

.view-all {
    text-align: center;
}

/* Newsletter */
.newsletter {
    padding: 5rem 5%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    margin-bottom: 1rem;
}

.newsletter-content p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.subscribe-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
}

.subscribe-form button {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    background-color: var(--accent-color);
    color: var(--bg-dark);
}

.subscribe-form button:hover {
    background-color: #e5ac00;
}

/* Blog Posts Page */
.blog-header {
    text-align: center;
    padding: 5rem 5% 3rem;
    background: linear-gradient(135deg, #f6f9fe, #e6eef9);
}

.blog-posts {
    padding: 3rem 5% 5rem;
}

.post-card.full {
    display: flex;
    margin-bottom: 3rem;
    align-items: center;
}

.post-card.full img {
    width: 40%;
    height: 300px;
    object-fit: cover;
}

.post-card.full .post-content {
    width: 60%;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Single Post Page */
.post-content {
    padding: 2rem 5%;
    max-width: 900px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2rem;
    text-align: center;
}

.featured-image {
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.post-body {
    margin-bottom: 3rem;
}

.post-body h2 {
    margin-top: 2rem;
    margin-bottom: 1.2rem;
}

.post-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.post-body ul, .post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-image {
    margin: 2rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.post-image .caption {
    padding: 0.8rem;
    background-color: var(--bg-light);
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.share-post {
    margin-bottom: 3rem;
    text-align: center;
}

.social-share {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--text-color);
    transition: var(--transition);
}

.social-share a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.related-posts {
    margin-bottom: 3rem;
}

.related-posts h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-card h4 {
    padding: 1rem 1rem 0.5rem;
    font-size: 1.1rem;
}

.related-card .read-more {
    padding: 0 1rem 1rem;
    display: block;
}

/* About Page */
.about-header {
    text-align: center;
    padding: 5rem 5% 3rem;
    background: linear-gradient(135deg, #f6f9fe, #e6eef9);
}

.about-mission {
    display: flex;
    align-items: center;
    padding: 5rem 5%;
    background-color: var(--bg-color);
}

.mission-content {
    width: 60%;
    padding-right: 3rem;
}

.mission-image {
    width: 40%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.team-section {
    padding: 5rem 5%;
    background-color: var(--bg-light);
    text-align: center;
}

.team-section h2 {
    margin-bottom: 3rem;
}

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

.team-member {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.team-member img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.team-member h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.3rem;
}

.team-member p {
    padding: 0 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-light);
}

.team-member p:first-of-type {
    color: var(--primary-color);
    font-weight: 600;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--text-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
}

.values-section {
    padding: 5rem 5%;
    background-color: var(--bg-color);
    text-align: center;
}

.values-section h2 {
    margin-bottom: 3rem;
}

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

.value-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.value-icon {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.value-card h3 {
    margin-bottom: 1rem;
}

.value-card p {
    color: var(--text-light);
}

.history-section {
    padding: 5rem 5%;
    background-color: var(--bg-light);
    text-align: center;
}

.history-section h2 {
    margin-bottom: 3rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--primary-light);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 15px;
    right: -10px;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.timeline-content h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Contact Page */
.contact-header {
    text-align: center;
    padding: 5rem 5% 3rem;
    background: linear-gradient(135deg, #f6f9fe, #e6eef9);
}

.contact-content {
    display: flex;
    padding: 5rem 5%;
    background-color: var(--bg-color);
}

.contact-info {
    width: 40%;
    padding-right: 3rem;
}

.contact-form-container {
    width: 60%;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.contact-card .icon {
    margin-right: 1rem;
    color: var(--primary-color);
}

.contact-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--text-light);
    margin-bottom: 0;
}

.contact-form-container h2 {
    margin-bottom: 2rem;
}

.contact-form {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 247, 0.2);
}

.form-group.checkbox {
    display: flex;
    align-items: center;
}

.form-group.checkbox input {
    width: auto;
    margin-right: 0.8rem;
}

.map-container {
    padding: 5rem 5% 3rem;
    text-align: center;
}

.map-container h2 {
    margin-bottom: 2rem;
}

.map {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    height: 400px;
}

.map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Footer */
footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 5rem 5% 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-links h3, .footer-contact h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 0.8rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 0.8rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    color: white;
    padding: 1.5rem;
    z-index: 1000;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    display: none;
}

.cookie-notice.active {
    display: block;
}

.cookie-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-content p {
    margin-bottom: 0;
    flex: 1;
    min-width: 280px;
}

.cookie-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.close-modal:hover {
    color: var(--text-color);
}

/* 3D Button */
.d3-button-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
    perspective: 1000px;
}

.d3-button {
    position: relative;
    width: 200px;
    height: 60px;
    transform-style: preserve-3d;
    transition: transform 0.5s;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
}

.d3-button:hover {
    transform: rotateX(-90deg);
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    border-radius: var(--border-radius);
}

.front {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: translateZ(30px);
}

.back {
    background: var(--accent-color);
    color: var(--bg-dark);
    transform: rotateX(90deg) translateZ(30px);
}

.top {
    height: 60px;
    background: linear-gradient(var(--primary-light), var(--primary-color));
    transform: rotateX(-90deg) translateZ(30px);
}

.bottom {
    height: 60px;
    background: var(--primary-dark);
    transform: rotateX(90deg) translateZ(90px);
}

.left {
    width: 60px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
    transform: rotateY(-90deg) translateZ(30px);
}

.right {
    width: 60px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: rotateY(90deg) translateZ(170px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
    }
    
    .hero-content, .hero-image {
        width: 100%;
        padding-right: 0;
    }
    
    .hero-content {
        margin-bottom: 3rem;
        text-align: center;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .post-card.full {
        flex-direction: column;
    }
    
    .post-card.full img, .post-card.full .post-content {
        width: 100%;
    }
    
    .about-mission {
        flex-direction: column;
    }
    
    .mission-content, .mission-image {
        width: 100%;
        padding-right: 0;
    }
    
    .mission-content {
        margin-bottom: 3rem;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .contact-info, .contact-form-container {
        width: 100%;
        padding-right: 0;
    }
    
    .contact-info {
        margin-bottom: 3rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo-container {
        margin-bottom: 1rem;
    }
    
    nav ul {
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .subscribe-form input {
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
    }
    
    .subscribe-form button {
        border-radius: var(--border-radius);
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 45px;
        padding-right: 10px;
        text-align: left;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-dot {
        left: 10px;
        right: auto;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        left: 10px;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-buttons {
        margin-top: 1rem;
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    nav ul li {
        margin: 0 0.5rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .social-share {
        flex-wrap: wrap;
    }
}
