* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: white;
}

/* ========== TOP BAR RESPONSIVE ========== */
.top-bar {
    position: fixed;
    top: 15px;
    left: 20px;
    right: 20px;
    margin: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.top-bar > * {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInTop 2s forwards;
}

@keyframes fadeInTop {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../../assets/Home/arboles.png") no-repeat center/cover;
    opacity: 0.2;
    border-radius: 15px;
    z-index: -1;
}

/* --- Fila principal (logo + botones) --- */
.topbar-main-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(74, 56, 56, 0.178);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    padding: 10px 20px;
    position: relative;
    flex-wrap: wrap;
    gap: 15px;
}

/* --- Izquierda --- */
.left-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-box {
    position: relative;
    height: 50px;
}

.logo-box img.logo-img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* Tooltip del logo */
.logo-box::after {
    content: "Vida de ecosistemas terrestres:\a explora la biodiversidad de Colima";
    white-space: pre;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: rgba(10, 20, 10, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(143, 193, 160, 0.3);
    color: #c8e6c9;
    padding: 8px 14px;
    border-radius: 15px;
    font-family: 'League Spartan', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: center;
    line-height: 1.5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 9999;
}

.logo-box:hover::after {
    opacity: 1;
}

/* Perfil */
.perfil-box {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}

.perfil-box:hover {
    transform: scale(1.12);
    box-shadow: 0 0 12px rgba(155, 237, 183, 0.5);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #9bedb7;
}

.perfil-box i {
    font-size: 1.4rem;
    transition: color 0.3s;
}

/* --- Derecha --- */
.right-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buscador premium */
.search-box {
    width: 780px;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(180, 192, 182, 0.237);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.255);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: 0.4s ease;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    color: white;
    font-size: 16px;
    width: 100%;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box i {
    color: rgba(254, 254, 254, 0.893);
}

.search-box:hover {
    background: rgba(255,255,255,0.25);
}

.search-box input:focus {
    outline: none;
    border-bottom: 2px solid #95bb8c98;
    box-shadow: 0 0 10px rgba(228, 228, 228, 0.395);
}

/* Botón idioma */
.lang-box {
    padding: 10px 18px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: 0.4s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #1a2a1a;
}

.lang-box:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

/* Botón login */
.login-box {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);
    cursor: pointer;
    transition: 0.4s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: #1a2a1a;
    text-decoration: none;
}

.login-box:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
    transform: scale(1.05);
}

/* ========== BARRA DE CATEGORÍAS (NAV) RESPONSIVE ========== */
.topbar-categorias {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background: transparent !important;
    flex-wrap: wrap;
    gap: 15px;
}

.topbar-categorias .topbar-link {
    color: #000000 !important;
    text-decoration: none !important;
    font-family: 'League Spartan', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease !important;
}

.topbar-categorias .topbar-link:hover {
    color: #111111 !important;
}

.topbar-categorias .topbar-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 4px;
    background-color: #204e02;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.topbar-categorias .topbar-link:hover::after {
    width: 100%;
    left: 0;
}

/* ========== HOME (SECCIÓN PRINCIPAL) ========== */
.home {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../assets/Home/Colima,\ volcan.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: saturate(.8) contrast(1.01);
    z-index: -1;
}

.bienvenida {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(30% + 60px);
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(12px, 3vw, 17px);
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.673);
    text-shadow: 0 0 10px rgba(198, 168, 125, 0.8), 0 0 25px rgba(198, 168, 125, 0.4), 0 2px 4px rgba(0, 0, 0, 0.8);
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    animation: escribirBienvenida 2.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards 0.35s;
}

@keyframes escribirBienvenida {
    0% {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        clip-path: inset(0 0% 0 0);
        opacity: 1;
    }
}

.slogan {
    position: absolute;
    left: 370px;
    bottom: 30px;
    color: rgba(255, 255, 255, 0);
    font-family: 'Playfair Display', serif;
    font-weight: 180;
    font-size: clamp(12px, 2vw, 18px);
    max-width: 600px;
    line-height: 1.2;
    z-index: 9999;
    opacity: 0;
    animation: fadeInSlogan 1s forwards 0.5s;
}

@keyframes fadeInSlogan {
    to {
        opacity: 1;
    }
}

.logo {
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(48px, 12vw, 180px);
    font-weight: 700;
    color: white;
    letter-spacing: 5px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6), 0 0 15px rgba(255,255,255,0.2);
    text-align: center;
    padding: 0 20px;
}

.glass {
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0.4));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.7);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 0 15px rgba(255,255,255,0.2);
}

/* ========== SECCIÓN CATEGORÍAS ========== */
.categorias {
    padding: 100px 60px;
    background: linear-gradient(180deg, #f8f9f6 0%, #edf0e8 100%);
    position: relative;
    overflow: hidden;
}

.categorias-titulo {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #2c3e2f;
    margin-bottom: 50px;
    text-align: center;
    font-weight: 600;
    position: relative;
}

.categorias-titulo::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #8fc1a0, #4a7c5c);
    border-radius: 2px;
}

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1300px;
    margin: 0 auto;
    justify-content: center;
}

.categoria-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: white;
    height: 480px;
    position: relative;
}

.categoria-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
    transition: transform 0.6s ease;
}

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

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 42, 26, 0.9) 0%, rgba(26, 42, 26, 0.4) 40%, rgba(26, 42, 26, 0.05) 80%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 35px 30px;
    color: white;
    transition: background 0.5s ease;
}

.categoria-card:hover .card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.3) 100%);
}

.card-titulo {
    font-family: 'League Spartan', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-descripcion {
    font-family: Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    opacity: 0.9;
    max-width: 90%;
}

.card-boton {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.card-boton i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.card-boton:hover {
    background: white;
    color: #2c3e2f;
    border-color: white;
    transform: scale(1.05);
}

.card-boton:hover i {
    transform: translateX(5px);
    color: #2c3e2f;
}

/* ========== FOOTER RESPONSIVE ========== */
.footer-nuevo {
    background-color: #000000;
    color: #ffffff;
    padding: 50px 40px 30px 40px;
    font-family: 'League Spartan', sans-serif;
    position: relative;
    border-top: 1px solid #1a1a1a;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.7fr 1fr;
    gap: 30px;
    align-items: start;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.footer-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.logo-eco-lima {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.img-principal {
    max-width: 180px;
    height: auto;
    display: block;
    margin-left: -25px;
}

.github-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #333;
    border-radius: 5px;
    margin: 20px 0;
    width: fit-content;
    font-size: 13px;
    transition: 0.3s ease;
}

.github-btn:hover {
    border-color: #ffffff;
    background-color: #111;
}

.facultad-tag {
    background-color: #FFFAF0;
    color: #000;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 11px;
    border-radius: 4px;
    display: inline-block;
    max-width: 250px;
    line-height: 1.2;
}

.box-text p {
    font-size: 12px;
    line-height: 1.5;
    color: #bbbbbb;
    max-width: 240px;
}

.lista-footer {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
}

.lista-footer li {
    font-size: 12px;
    margin-bottom: 6px;
    color: #dddddd;
    font-weight: 400;
}

.nombres-equipo li {
    background-color: #111111;
    padding: 4px 10px;
    margin-bottom: 5px;
    width: fit-content;
    border-radius: 2px;
    transform: translateX(-12px);
}

.nombres-equipo {
    margin-left: -10px;
    padding-left: 0;
}

.footer-decor-icon {
    position: absolute;
    bottom: 25px;
    right: 40px;
    width: 70px;
    height: auto;
    opacity: 0.8;
}

/* ========== FAB BUTTON ========== */
.fab-container {
    position: fixed;
    bottom: 25px;
    left: 0px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 15px;
}

.fab-btn {
    width: 67px;
    height: 67px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5a3d, #4a7c5c);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-btn:hover {
    transform: scale(1.08);
}

.fab-btn i {
    transition: transform 0.3s ease;
}

.fab-btn.active i {
    transform: rotate(45deg);
}

.fab-menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 5px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.fab-menu.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.fab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(20, 35, 20, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-family: 'League Spartan', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.fab-item:hover {
    background: rgba(45, 90, 61, 0.9);
    transform: translateX(5px);
}

/* ===================================================== */
/* ========== MEDIA QUERIES - RESPONSIVE ========== */
/* ===================================================== */

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .topbar-main-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .left-icons {
        justify-content: space-between;
    }
    
    .right-buttons {
        justify-content: flex-end;
    }
    
    .search-box {
        width: 100%;
    }
    
    .topbar-categorias {
        justify-content: center;
        gap: 20px;
        padding: 10px 20px;
    }
    
    .topbar-categorias .topbar-link {
        font-size: 13px !important;
        letter-spacing: 2px !important;
    }
    
    .slogan {
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        width: 90%;
        bottom: 15px;
    }
    
    .bienvenida {
        font-size: 12px;
        letter-spacing: 3px;
        bottom: calc(30% + 40px);
        white-space: normal;
        text-align: center;
        width: 90%;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* Móviles grandes (480px - 768px) */
@media (max-width: 768px) {
    .top-bar {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .topbar-main-row {
        padding: 12px;
    }
    
    .left-icons {
        justify-content: space-between;
        width: 100%;
    }
    
    .right-buttons {
        justify-content: space-between;
        width: 100%;
    }
    
    .lang-box, .login-box {
        padding: 8px 16px;
        font-size: 14px;
        flex: 1;
        text-align: center;
    }
    
    .search-box {
        order: -1;
        width: 100%;
    }
    
    .topbar-categorias {
        display: none; /* Ocultar en móvil, se puede usar menú hamburguesa */
    }
    
    /* Menú hamburguesa para móvil */
    .menu-mobile-btn {
        display: block;
        background: rgba(0,0,0,0.5);
        border: none;
        color: white;
        font-size: 24px;
        padding: 10px;
        border-radius: 12px;
        cursor: pointer;
    }
    
    .logo {
        font-size: clamp(40px, 10vw, 80px);
    }
    
    .bienvenida {
        display: none; /* Ocultar en móvil muy pequeño */
    }
    
    .slogan {
        font-size: 10px;
        bottom: 10px;
    }
    
    .categorias {
        padding: 50px 20px;
    }
    
    .categorias-titulo {
        font-size: 1.8rem;
    }
    
    .categorias-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .categoria-card {
        height: 350px;
    }
    
    .card-titulo {
        font-size: 1.5rem;
    }
    
    .card-descripcion {
        font-size: 0.85rem;
        max-width: 100%;
    }
    
    .card-boton {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .fab-container {
        bottom: 15px;
        left: 10px;
    }
    
    .fab-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .fab-item {
        padding: 8px 16px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
}

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    .topbar-main-row {
        gap: 10px;
    }
    
    .logo-box {
        height: 35px;
    }
    
    .perfil-box {
        width: 35px;
        height: 35px;
    }
    
    .lang-box, .login-box {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .search-box {
        padding: 6px 12px;
    }
    
    .search-box input {
        font-size: 14px;
    }
    
    .logo {
        font-size: clamp(32px, 8vw, 48px);
    }
    
    .categorias-titulo {
        font-size: 1.5rem;
    }
    
    .categoria-card {
        height: 300px;
    }
    
    .card-overlay {
        padding: 20px;
    }
    
    .card-titulo {
        font-size: 1.3rem;
    }
    
    .card-descripcion {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
    
    .card-boton {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
    
    .footer-nuevo {
        padding: 30px 20px 20px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 25px;
    }
    
    .footer-column {
        align-items: center;
        text-align: center;
    }
    
    .github-btn, .nombres-equipo li, .facultad-tag {
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-decor-icon {
        display: none;
    }
    
    .img-principal {
        margin-left: 0;
        margin: 0 auto;
    }
    
    .logo-eco-lima {
        justify-content: center;
    }
    
    .nombres-equipo li {
        transform: translateX(0);
    }
    
    .nombres-equipo {
        margin-left: 0;
    }
    
    .fab-item span {
        display: none;
    }
    
    .fab-item {
        padding: 12px;
        white-space: normal;
    }
    
    .fab-item i {
        margin: 0;
        font-size: 1.2rem;
    }
}

/* Menú móvil - agregar este HTML si quieres menú hamburguesa */
.menu-mobile-btn {
    display: none;
}

@media (max-width: 768px) {
    .menu-mobile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.2);
        color: white;
        width: 45px;
        height: 45px;
        border-radius: 12px;
        font-size: 22px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .menu-mobile-btn:hover {
        background: rgba(0,0,0,0.8);
        transform: scale(1.05);
    }
}

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