/* Variables globales */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #f39c12;
    --text-color: #333333;
    --light-text: #666666;
    --background-color: #ffffff;
    --light-gray: #f7f7f7;
    --medium-gray: #e0e0e0;
    --dark-gray: #555555;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease-in-out;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    position: relative;
    padding-top: 80px;
    transition: var(--transition);
}

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

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

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
}

/* Tema oscuro */
body.dark-mode {
    --text-color: #f7f7f7;
    --light-text: #cccccc;
    --background-color: #1a1a1a;
    --light-gray: #222222;
    --medium-gray: #333333;
    --dark-gray: #cccccc;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Barra de indicador de scroll */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--accent-color);
    z-index: 1000;
    width: 0%;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    box-shadow: var(--box-shadow);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: var(--transition);
}

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

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

header h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    align-items: center;
}

nav li {
    margin-left: 25px;
}

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

nav a:hover, nav a.active {
    color: var(--primary-color);
}

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

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

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

#theme-toggle:hover {
    color: var(--primary-color);
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/1.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 5%;
    text-align: center;
    margin-bottom: 50px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-family: var(--font-heading);
    font-size: 42px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* Banner para otras páginas */
.page-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/3.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 80px 5%;
    text-align: center;
    margin-bottom: 50px;
}

.page-banner h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    margin-bottom: 15px;
}

.page-banner p {
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Layout principal */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* Sección de blog posts */
.blog-posts {
    flex: 2;
    margin-right: 40px;
}

.blog-posts h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-color);
    position: relative;
}

.blog-posts h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Tarjetas de posts */
.post-card {
    display: flex;
    margin-bottom: 40px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.post-image {
    flex: 1;
    min-height: 250px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    flex: 2;
    padding: 25px;
}

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

.post-content .date {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 15px;
}

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

.read-more {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Barra lateral */
.sidebar {
    flex: 1;
    max-width: 320px;
}

.sidebar-section {
    background-color: var(--light-gray);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.sidebar-section h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.sidebar-section ul li {
    margin-bottom: 10px;
}

.sidebar-section ul li a {
    color: var(--light-text);
}

.sidebar-section ul li a:hover {
    color: var(--primary-color);
    margin-left: 5px;
}

/* Formulario de newsletter */
.newsletter-form {
    display: flex;
    flex-direction: column;
}

.newsletter-form input {
    padding: 12px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    background-color: var(--background-color);
    color: var(--text-color);
}

.newsletter-form button {
    padding: 12px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Iconos sociales */
.social-icons {
    display: flex;
    gap: 15px;
}

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

.social-icons a:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* Sobre nosotros */
.about-content {
    width: 100%;
}

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

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

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

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

.team-card {
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

.team-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin: 20px 0 5px;
}

.team-card p:first-of-type {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.team-card p:last-of-type {
    padding: 0 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.team-card .social-icons {
    justify-content: center;
    margin: 20px 0;
}

.our-values {
    text-align: center;
    margin: 50px 0;
}

.our-values h2 {
    font-family: var(--font-heading);
    font-size: 32px;
    margin-bottom: 30px;
}

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

.value-card {
    background-color: var(--light-gray);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.value-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
}

.value-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 15px;
}

/* Contacto */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 50px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    margin-right: 30px;
}

.contact-form-container {
    flex: 1;
    min-width: 300px;
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-info h2, .contact-form-container h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 25px;
    position: relative;
}

.contact-info h2::after, .contact-form-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.contact-details {
    margin-bottom: 40px;
}

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

.contact-icon {
    flex: 0 0 40px;
    height: 40px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color);
}

.contact-text h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    margin-bottom: 5px;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

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

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

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-main);
}

.form-group textarea {
    resize: vertical;
}

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

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

.checkbox-group label {
    margin-bottom: 0;
}

.submit-button {
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    align-self: flex-start;
}

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

.map-section {
    width: 100%;
    margin-top: 50px;
}

.map-section h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 20px;
}

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

.map-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
}

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

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

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

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: var(--dark-gray);
    cursor: pointer;
}

.modal-content svg {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.modal-content h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 15px;
}

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

/* Footer */
footer {
    background-color: var(--light-gray);
    padding: 50px 5% 20px;
    margin-top: 70px;
    color: var(--text-color);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
}

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

.footer-section p, .footer-section li {
    margin-bottom: 10px;
}

.footer-section i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-section ul li a {
    color: var(--text-color);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--medium-gray);
    padding-top: 20px;
    margin-top: 20px;
}

/* Banner de cookies */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 5%;
    z-index: 1000;
    animation: slideUp 0.5s forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-content p {
    flex: 3;
    min-width: 300px;
    margin-right: 20px;
    margin-bottom: 10px;
}

.cookie-buttons {
    flex: 2;
    min-width: 300px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.cookie-buttons button {
    padding: 8px 15px;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
    transition: var(--transition);
}

#accept-cookies {
    background-color: var(--primary-color);
    color: #fff;
}

#accept-cookies:hover {
    background-color: var(--secondary-color);
}

#customize-cookies, #reject-cookies {
    background-color: var(--medium-gray);
    color: var(--text-color);
}

#customize-cookies:hover, #reject-cookies:hover {
    background-color: var(--dark-gray);
    color: #fff;
}

.cookie-content a {
    margin-left: 20px;
    font-size: 14px;
}

/* Borde personalizado para imágenes */
.fancy-border {
    position: relative;
    border: 5px solid var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.fancy-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 60%, rgba(52, 152, 219, 0.2));
    z-index: 1;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 992px) {
    .blog-posts {
        margin-right: 0;
        flex: 1 1 100%;
    }
    
    .sidebar {
        flex: 1 1 100%;
        max-width: 100%;
        margin-top: 50px;
    }
    
    .post-card {
        flex-direction: column;
    }
    
    .post-image {
        min-height: 200px;
    }
    
    .contact-info, .contact-form-container {
        flex: 1 1 100%;
    }
    
    .contact-info {
        margin-right: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px 5%;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    nav ul {
        justify-content: center;
        width: 100%;
    }
    
    nav li {
        margin: 0 10px;
    }
    
    .hero {
        padding: 70px 5%;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 120px;
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    nav li {
        margin: 5px 10px;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .cookie-content {
        flex-direction: column;
    }
    
    .cookie-content p, .cookie-buttons {
        flex: 1 1 100%;
        margin-right: 0;
    }
}
