/* Variables CSS */
:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --accent-color: #ff006e;
    --text-color: #333333;
    --light-text: #666666;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --error-color: #dc3545;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --radius: 8px;
    --max-width: 1200px;
    --navbar-height: 70px;
    --footer-bg: #282c35;
}

/* Reset y estilos generales */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

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

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

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
}

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

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

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

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

/* Header y Navegación */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--navbar-height);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 50%;
    object-fit: cover;
}

.navbar {
    display: flex;
    gap: 30px;
}

.navbar a {
    padding: 10px;
    font-weight: 600;
    position: relative;
    color: var(--text-color);
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

.navbar a.active {
    color: var(--primary-color);
}

/* Banner de bienvenida en múltiples idiomas */
.welcome-languages {
    background-color: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 10px 0;
    font-size: 16px;
    letter-spacing: 1px;
}

/* Contador de tiempo */
.countdown-container {
    background-color: var(--light-bg);
    text-align: center;
    padding: 20px 0;
}

.countdown-container h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.countdown div {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px;
    border-radius: var(--radius);
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown div span:first-child {
    font-size: 24px;
    font-weight: bold;
}

.countdown div span:last-child {
    font-size: 12px;
    text-transform: uppercase;
}

/* Main Content */
main {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

.intro {
    margin-bottom: 40px;
    text-align: center;
}

.intro h2 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 32px;
}

.intro p {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 18px;
}

.featured-image {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 0 auto;
}

/* Posts */
.featured-posts h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--secondary-color);
    font-size: 28px;
}

.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

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

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

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

.post-content {
    padding: 20px;
}

.post-content h3 {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 20px;
}

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

.read-more {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.read-more:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Página About Us */
.about-container {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

.about-intro {
    text-align: center;
    margin-bottom: 50px;
}

.about-intro h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 32px;
}

.about-intro p {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 18px;
}

.team-section {
    margin-bottom: 50px;
}

.team-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--secondary-color);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.team-member {
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    text-align: center;
    padding-bottom: 20px;
}

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

.team-member h3 {
    margin: 15px 0 5px;
    color: var(--text-color);
}

.team-member p {
    color: var(--light-text);
    margin: 0 15px 10px;
}

.team-member p:nth-child(3) {
    font-weight: 600;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

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

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

.our-values {
    margin-bottom: 50px;
}

.our-values h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--secondary-color);
}

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

.value-card {
    background-color: var(--light-bg);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

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

.value-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Página de Contacto */
.contact-container {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

.contact-intro {
    text-align: center;
    margin-bottom: 50px;
}

.contact-intro h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 32px;
}

.contact-intro p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 50px;
}

.contact-info {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: var(--radius);
}

.contact-info h3 {
    margin-bottom: 25px;
    color: var(--secondary-color);
    font-size: 22px;
}

.info-item {
    display: flex;
    margin-bottom: 20px;
}

.info-item i {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 20px;
}

.contact-social h3 {
    margin: 30px 0 15px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

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

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

.contact-form-section {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--box-shadow);
}

.contact-form-section h3 {
    margin-bottom: 25px;
    color: var(--secondary-color);
    font-size: 22px;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group:nth-child(5),
.form-group:nth-child(6) {
    grid-column: span 2;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

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

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

.checkbox-group input {
    width: auto;
    margin-right: 10px;
    margin-top: 5px;
}

.submit-btn {
    grid-column: span 2;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

.map-container {
    margin-top: 50px;
}

.map-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 22px;
}

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

.map iframe,
.map-placeholder {
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal de Agradecimiento */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 15% auto;
    padding: 30px;
    border-radius: var(--radius);
    max-width: 500px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFade 0.3s;
}

@keyframes modalFade {
    from {opacity: 0; transform: translateY(-30px);}
    to {opacity: 1; transform: translateY(0);}
}

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

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

.modal-content h2 {
    margin-bottom: 15px;
    color: var(--success-color);
}

.modal-content p {
    margin-bottom: 25px;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding: 50px 20px 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 20px;
    position: relative;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column p {
    margin-bottom: 10px;
    color: #b8b8b8;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: #b8b8b8;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3a3f48;
    color: #b8b8b8;
    font-size: 14px;
}

/* Banner de Cookies */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(40, 44, 53, 0.95);
    color: var(--white);
    z-index: 1000;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cookie-content p {
    text-align: center;
    margin-bottom: 15px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.cookie-more-info {
    font-size: 14px;
}

.cookie-more-info a {
    color: var(--white);
    text-decoration: underline;
}

.cookie-more-info a:hover {
    color: var(--primary-color);
}

/* Iconos */
.icon-location, .icon-phone, .icon-email, .icon-clock {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.icon-location::before {
    content: '📍';
}

.icon-phone::before {
    content: '📞';
}

.icon-email::before {
    content: '✉️';
}

.icon-clock::before {
    content: '🕒';
}

/* Media Queries */
@media (max-width: 1024px) {
    .posts-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 15px 5%;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    .navbar {
        width: 100%;
        justify-content: space-around;
    }
    
    .posts-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .form-group:nth-child(5),
    .form-group:nth-child(6) {
        grid-column: span 1;
    }
    
    .submit-btn {
        grid-column: span 1;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .countdown {
        flex-wrap: wrap;
    }
    
    .countdown div {
        min-width: 70px;
    }
    
    .navbar {
        gap: 15px;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
    }
}
