/* Molecule.com.ar - Renovación 2025
   Diseño minimalista para sitio educativo/investigación */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #2c2c2c;
    background-color: #000;
    overflow-x: hidden;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ===== BACKGROUNDS POR PÁGINA ===== */
body.bg-hero {
    background-color: #000;
}

body.bg-about {
    background-image: url('../picts/background-about.jpg');
}

body.bg-fotosarmado {
    background-image: url('../picts/background-fotosarmado.jpg');
    color: white;
}

body.bg-gallery {
    background-image: url('../picts/background-gallery.jpg');
    color: white;
}

body.bg-publications {
    background-image: url('../picts/background-publications.jpg');
    color: white;
}

body.bg-contact {
    background-image: url('../picts/background-contact.jpg');
    color: white;
}

/* ===== NAVIGATION ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    z-index: 1000;
    padding: 0;
    transition: background 0.3s ease;
}

nav.scrolled {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.nav-container a {
    display: block;
    padding: 18px 20px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.nav-container a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-bottom-color: white;
}

nav.scrolled .nav-container a {
    color: white;
    text-shadow: none;
}

nav.scrolled .nav-container a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: white;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    padding: 80px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-section.fullscreen {
    height: 100vh;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.3;
}

.hero-section.fullscreen .hero-title {
    font-size: 72px;
    letter-spacing: 3px;
    margin-bottom: 30px;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
    text-align: center;
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 0;
}

.hero-section.fullscreen .hero-subtitle {
    font-size: 24px;
    font-weight: 600;
    color: white;
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    text-align: center;
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== CONTENT SECTIONS (index scrolling) ===== */
.content-section {
    position: relative;
    min-height: auto;
    padding: 80px 20px 60px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

.section-container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin-bottom: 30px;
    text-align: center;
}

.section-with-sidebar {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.section-sidebar {
    flex-shrink: 0;
    width: 240px;
}

.section-sidebar img {
    width: 100%;
    margin-bottom: 30px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.section-content {
    flex: 1;
}

.section-content h1,
.section-content h2,
.section-content h3,
.section-content p,
.section-content li {
    color: white;
}

.section-content a {
    color: #88ccff;
    text-decoration: underline;
}

.section-content a:hover {
    color: #aaddff;
}

.section-content strong {
    color: #ffffff;
    font-weight: 600;
}

.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    margin: 60px 0;
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-size: 32px;
    font-weight: 300;
    color: #1a1a1a;
    margin-bottom: 20px;
    line-height: 1.3;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 30px 0 15px;
}

h3 {
    font-size: 18px;
    font-weight: 500;
    color: #2c2c2c;
    margin: 20px 0 10px;
}

p {
    margin-bottom: 20px;
    text-align: justify;
}

ul {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    line-height: 1.7;
}

li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #666;
    font-weight: bold;
}

a {
    color: #2c2c2c;
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:hover {
    color: #000;
}

strong {
    font-weight: 600;
}

em {
    color: #555;
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.gallery-photo {
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.gallery-photo:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.7);
}

.gallery-photo img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin-top: 8px;
}

/* Gallery pages (fotosarmado / fotoscasa) */
.gallery-content {
    background: transparent;
    padding: 0 20px 80px;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.7);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    user-select: none;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover, .lightbox-next:hover {
    color: #ccc;
}

/* ===== PRENSA PAGE ===== */
.press-item {
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.press-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.5);
}

.press-image {
    flex-shrink: 0;
}

.press-image img {
    width: 354px;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
}

.press-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.press-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    line-height: 1.4;
}

.press-meta {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
}

.press-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4a9eff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.press-link:hover {
    color: #80c0ff;
    text-decoration: underline;
}

.pdf-icon {
    width: 20px;
    height: 20px;
}

.video-item {
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.video-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    text-align: center;
}

.video-meta {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
    text-align: center;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== ESTEREOESTRUCTURA PAGE ===== */
.pdf-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(74, 158, 255, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
    transition: all 0.3s ease;
    margin: 20px 0;
}

.pdf-download:hover {
    background: rgba(74, 158, 255, 1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

.pdf-download .pdf-icon {
    width: 24px;
    height: 24px;
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.article-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.article-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.article-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c2c2c;
    margin: 30px 0 15px;
}

.article-section p {
    line-height: 1.8;
    color: #2c2c2c;
}

.article-section strong {
    color: #1a1a1a;
}

.article-section .image-container {
    text-align: center;
    margin: 40px 0;
}

.article-section .image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border: none;
}

.divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #ccc, transparent);
    margin: 40px 0;
}

.author-note {
    background: rgba(240, 240, 240, 0.9);
    padding: 20px;
    border-left: 4px solid #4a9eff;
    margin: 30px 0;
    border-radius: 4px;
}

/* ===== CONTACTO PAGE ===== */
.contact-wrapper {
    padding: 40px 20px 120px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.contact-info h2 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    text-align: center;
}

.contact-info p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
}

.contact-details {
    margin-top: 50px;
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid rgba(255,255,255,0.2);
}

.contact-name {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
}

.contact-email {
    font-size: 18px;
}

.contact-email a {
    color: #4a9eff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-email a:hover {
    color: #80c0ff;
    text-decoration: underline;
}

/* ===== FOOTER ===== */
footer {
    position: relative;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    gap: 20px;
}

.footer-item {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.footer-item a:hover {
    color: white;
    text-decoration: underline;
}

footer strong {
    color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Aumentar tamaño de fuente base para mejor legibilidad en móviles */
    body {
        font-size: 18px;
    }

    /* Mejorar legibilidad de párrafos en móviles */
    p {
        font-size: 18px;
        line-height: 1.8;
    }

    /* Ajustar títulos con estilos inline para móviles */
    .section-content h1 {
        font-size: 28px !important;
    }

    .section-content p {
        font-size: 18px;
    }

    .nav-container a {
        padding: 15px 12px;
        font-size: 11px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-section.fullscreen .hero-title {
        font-size: 36px;
    }

    .hero-section.fullscreen .hero-subtitle {
        font-size: 18px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-with-sidebar {
        flex-direction: column;
    }

    .section-sidebar {
        width: 100%;
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
    }

    .section-sidebar img {
        width: calc(33.333% - 14px);
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .gallery-photo img,
    .gallery-item img {
        height: 200px;
    }

    .press-item {
        flex-direction: column;
    }

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

    .article-section {
        padding: 25px;
    }

    .article-section h2 {
        font-size: 24px;
    }

    .contact-info {
        padding: 30px 25px;
    }

    .contact-info h2 {
        font-size: 26px;
    }

    .contact-name {
        font-size: 20px;
    }

    .contact-email {
        font-size: 16px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-container a {
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    nav, footer {
        display: none !important;
    }

    .article-section {
        box-shadow: none;
        background: white;
    }
}
