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

:root {
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-900: #134e4a;
    --blue-600: #2563eb;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-600: #475569;
    --slate-900: #0f172a;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--slate-50), var(--slate-100));
    min-height: 100vh;
}

h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.125rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

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

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-logo {
    cursor: pointer;
    transition: transform 0.3s;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-logo h3 {
    color: var(--teal-600);
    margin: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu button {
    background: none;
    border: none;
    color: var(--slate-600);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-menu button:hover {
    color: var(--teal-600);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--slate-900);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1rem;
}

.mobile-menu.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.mobile-menu button {
    background: none;
    border: none;
    color: var(--slate-600);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 0.5rem 0;
    text-align: left;
}

.mobile-menu button:hover {
    color: var(--teal-600);
}

/* Botones */
.btn-primary {
    background: var(--teal-600);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--teal-700);
    transform: scale(1.05);
}

.btn-secondary {
    background: white;
    color: var(--slate-900);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    color: var(--slate-900);
    border: 1px solid var(--slate-600);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: var(--slate-100);
    transform: scale(1.05);
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 1rem 5rem;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-image-wrapper {
    display: flex;
    justify-content: center;
    order: 2;
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 28rem;
    aspect-ratio: 3/4;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s;
}

.hero-image-container:hover {
    transform: scale(1.02);
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bubble {
    position: absolute;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    filter: blur(60px);
    animation: pulse 4s ease-in-out infinite;
}

.bubble-1 {
    background: rgba(13, 148, 136, 0.1);
    bottom: -1.5rem;
    right: -1.5rem;
}

.bubble-2 {
    background: rgba(37, 99, 235, 0.1);
    top: -1.5rem;
    left: -1.5rem;
    animation-delay: 1s;
    animation-duration: 5s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

.hero-content {
    order: 1;
    text-align: left;
}

.hero-title {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 4rem;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--teal-700);
    font-weight: normal;
    margin-bottom: 1rem;
    animation: fadeInLeft 0.6s ease-out;
}

.hero-subtitle {
    color: var(--teal-600);
    margin-bottom: 1.5rem;
    animation: fadeInLeft 0.6s ease-out 0.1s backwards;
}

.hero-description {
    color: var(--slate-600);
    margin-bottom: 2rem;
    max-width: 40rem;
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.hero-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--slate-600);
    animation: fadeIn 0.6s ease-out 0.4s backwards;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Secciones */
.section {
    padding: 5rem 1rem;
}

.section.bg-white {
    background: white;
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.section-icon {
    width: 2rem;
    height: 2rem;
    color: var(--teal-600);
}

/* Cards */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.text-teal {
    color: var(--teal-600);
}

.badge {
    background: var(--slate-100);
    color: var(--slate-600);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    width: fit-content;
}

.card-list {
    list-style-position: inside;
    color: var(--slate-600);
}

.card-list li {
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--slate-600);
    margin-top: 1rem;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Badges */
.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.badge-pill {
    background: var(--teal-50);
    color: var(--teal-700);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    transition: background 0.3s;
}

.badge-pill:hover {
    background: var(--teal-100);
}

/* Galería */
.gallery-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--slate-50), white);
    overflow: hidden;
}

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

.gallery-subtitle {
    color: var(--slate-600);
    max-width: 48rem;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

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

.gallery-large {
    grid-column: span 7;
    grid-row: span 2;
    height: 450px;
}

.gallery-medium {
    grid-column: span 5;
    height: 215px;
}

.gallery-small {
    grid-column: span 3;
    height: 225px;
}

.gallery-small:last-child {
    grid-column: span 2;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-text {
    color: white;
}

.gallery-text h3,
.gallery-text h4 {
    margin: 0;
}

.gallery-text p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Publicaciones */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.publication-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.publication-image {
    width: 100%;
    max-width: 24rem;
    aspect-ratio: 3/4;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.publication-image:hover {
    transform: translateY(-10px);
}

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

.publication-description {
    color: var(--slate-600);
    margin-bottom: 1.5rem;
    max-width: 28rem;
}

/* Contacto */
.contact-section {
    padding: 5rem 1rem;
    background: linear-gradient(135deg, var(--teal-600), var(--blue-600));
    color: white;
    text-align: center;
}

.contact-container {
    max-width: 64rem;
    margin: 0 auto;
}

.contact-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    padding: 2rem 1rem;
    background: var(--slate-900);
    color: #94a3b8;
    text-align: center;
}

.footer-subtitle {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Intersection Observer animations */
.fade-in-up.visible {
    animation: fadeInUp 0.5s ease-out forwards;
}

.fade-in-up:not(.visible) {
    opacity: 0;
    transform: translateY(30px);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-image-wrapper {
        order: 1;
    }

    .hero-content {
        order: 2;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-contact-info .contact-item {
        justify-content: center;
    }

    .card-header {
        align-items: flex-start;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-large,
    .gallery-medium,
    .gallery-small {
        grid-column: span 1;
        height: 300px;
    }

    .gallery-large {
        height: 300px;
    }

    .gallery-medium {
        height: 200px;
    }

    .gallery-small {
        height: 180px;
    }

    .publications-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

@media (min-width: 769px) {
    .card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}
