/* 
   Estilos para El Futuro de la Robótica
   Tema: Tecnología y Robótica
   Año: 2024
*/

/* Variables y reset */
:root {
    /* Paleta de colores principal */
    --primary-color: #2C3E50;     /* Azul oscuro */
    --secondary-color: #16A085;   /* Verde esmeralda */
    --accent-color: #E74C3C;      /* Rojo coral */
    --light-color: #ECF0F1;       /* Gris muy claro */
    --dark-color: #1A252F;        /* Azul casi negro */
    
    /* Colores de acento secundarios */
    --accent-blue: #3498DB;       /* Azul claro */
    --accent-purple: #9B59B6;     /* Púrpura */
    --accent-orange: #F39C12;     /* Naranja */
    
    /* Colores funcionales */
    --text-color: #2C3E50;        /* Color de texto principal */
    --text-light: #ECF0F1;        /* Texto sobre fondos oscuros */
    --text-muted: #7F8C8D;        /* Texto secundario/muted */
    --link-color: #16A085;        /* Links */
    --link-hover: #1ABC9C;        /* Links al pasar el cursor */
    --border-color: #E5E7E9;      /* Bordes sutiles */
    --success-color: #2ECC71;     /* Verde éxito */
    --warning-color: #F1C40F;     /* Amarillo advertencia */
    --error-color: #E74C3C;       /* Rojo error */
    
    /* Tipografía */
    --font-primary: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-secondary: 'Montserrat', 'Segoe UI', Roboto, sans-serif;
    --font-monospace: 'Courier New', monospace;
    
    /* Tamaños y espaciados */
    --container-width: 1200px;
    --header-height: 80px;
    --footer-height: 320px;
    --border-radius: 6px;
    --button-radius: 4px;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #FFFFFF;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

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

button, 
input, 
select, 
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

ul, ol {
    list-style-position: inside;
}

/* Utilidades */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--button-radius);
    transition: all var(--transition-fast);
    cursor: pointer;
}

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

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

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

.btn-secondary:hover {
    background-color: #D6DBDF;
}

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

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

/* Encabezado */
header {
    background-color: var(--primary-color);
    color: var(--text-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 50px;
    width: auto;
}

nav ul {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav li {
    margin-left: 1.5rem;
}

nav a {
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    position: relative;
}

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

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

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

.live-clock {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-family: var(--font-monospace);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: var(--text-light);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="none" width="100" height="100"/><path d="M0,0 L100,100 M0,100 L100,0" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    background-size: 20px 20px;
    opacity: 0.8;
}

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

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.registration {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Blog posts grid */
.blog-posts {
    padding: 4rem 0;
}

.blog-posts h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.25rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
}

.blog-posts h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.post-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.post-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

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

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

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--primary-color);
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

.read-more {
    margin-top: auto;
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: transform var(--transition-fast);
}

.read-more:hover {
    transform: translateX(5px);
}

.read-more::after {
    content: '→';
    margin-left: 0.25rem;
    transition: transform var(--transition-fast);
}

.read-more:hover::after {
    transform: translateX(3px);
}

/* Post-card small (para artículos relacionados) */
.post-card.small {
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-rows: 1fr;
}

.post-card.small .post-image {
    height: 100%;
    grid-row: 1;
    grid-column: 1;
}

.post-card.small .post-content {
    grid-row: 1;
    grid-column: 2;
    padding: 1rem;
}

.post-card.small .post-content h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Página individual de post */
.post-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

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

.post-header h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

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

.post-featured-image img {
    width: 100%;
    height: auto;
}

figcaption {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    background-color: #f8f9fa;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

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

.post-content h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.post-content h3 {
    font-size: 1.35rem;
    margin: 1.75rem 0 1rem;
    color: var(--primary-color);
}

.post-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

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

.post-content figure.post-image {
    margin: 2rem 0;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.post-navigation a {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.post-related {
    margin-top: 3rem;
}

.post-related h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Página de contacto */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: var(--text-light);
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

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

.contact-section {
    padding: 4rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h2,
.contact-form-container h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    margin-bottom: 1.5rem;
}

.contact-icon {
    color: var(--secondary-color);
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-item p, 
.contact-item address {
    font-style: normal;
    color: var(--text-color);
}

.social-connect h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

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

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

.registration-info {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Formulario de contacto */
.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

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

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

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

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

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

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

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.9rem;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close-modal {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-muted);
}

.thank-you-message {
    text-align: center;
}

.thank-you-message svg {
    margin-bottom: 1rem;
}

.thank-you-message h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--success-color);
}

.thank-you-message p {
    margin-bottom: 1.5rem;
}

.close-btn {
    margin-top: 1rem;
}

/* Página Nosotros */
.about-section {
    padding: 4rem 0;
}

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

.about-content h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.about-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-values {
    margin: 3rem 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.value-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition-normal);
}

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

.value-icon {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.value-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.team-section {
    background-color: var(--light-color);
    padding: 4rem 0;
}

.team-section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

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

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

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

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

.team-member h3 {
    font-size: 1.25rem;
    margin: 1.25rem 1.25rem 0.25rem;
    color: var(--primary-color);
}

.team-member p {
    padding: 0 1.25rem;
    margin-bottom: 0.75rem;
}

.team-member p:nth-of-type(1) {
    font-weight: 600;
    color: var(--secondary-color);
}

.member-social {
    display: flex;
    gap: 0.75rem;
    padding: 0 1.25rem 1.25rem;
}

.member-social a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

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

.collaboration {
    text-align: center;
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.collaboration h2 {
    margin-bottom: 1rem;
}

.collaboration p {
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

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

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: white;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-column p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer-column address {
    font-style: normal;
    opacity: 0.8;
}

.footer-column ul {
    list-style-type: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--text-light);
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.footer-column a:hover {
    opacity: 1;
    color: var(--accent-blue);
}

.footer-column .social-icons {
    margin-top: 1rem;
}

.footer-column .social-icons a {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

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

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

/* Banner de cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.cookie-content p {
    margin-bottom: 1rem;
}

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

.cookie-policy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Íconos para el footer y contacto */
[class^="icon-"] {
    margin-right: 0.5rem;
}

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

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

.icon-email::before {
    content: '📧';
}

/* Media queries */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .contact-section {
        grid-template-columns: 1fr;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    header .container {
        flex-direction: column;
        padding: 1rem;
        height: auto;
    }
    
    header {
        height: auto;
        position: relative;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav li {
        margin: 0.5rem 0;
    }
    
    .live-clock {
        margin-top: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .blog-posts h2, 
    .post-header h1 {
        font-size: 1.75rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
}
