/* Estilos para el tooltip */
.tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted #4b5563;
    color: #2563eb;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    line-height: 1.4;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    margin: 0;
}

section {
    padding: 3rem 1rem;
}

.project-card {
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: scale(1.05) rotate(2deg);
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.skill-item {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.skill-item:hover {
    background-color: #e0e7ff;
    transform: scale(1.1);
}

/* Navbar */
#navbar {
    transition: background-color 0.3s ease;
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

#navbar .nav-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#navbar ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 40;
}

#navbar ul.active {
    display: flex;
}

#navbar ul li {
    margin: 0.5rem 0;
}

#navbar ul li a {
    font-size: 1.1rem;
    padding: 0.5rem;
    display: block;
}

#language-switcher {
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    width: 80px;
    height: 40px;
    touch-action: manipulation;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 4rem 1rem;
}

#home h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

#home p {
    font-size: 1.1rem;
}

#home .hero-button {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
}

/* About */
#about .flex {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#about img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 50%;
}

#about .about-text {
    max-width: 100%;
}

/* Projects */
#projects .grid {
    display: grid;
    gap: 0 !important;
}

#projects .project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#projects .project-card img {
    flex-shrink: 0;
    width: 100%;
    height: 280px;
    object-fit: contain;
    background: #f4f4f9;
    margin-bottom: 0;
    border-radius: 0.5rem;
    display: block;
}

#projects .project-card[data-i18n-card="project8_title"] img,
#projects .project-card:nth-child(8) img {
    height: 350px !important;
}

#projects .project-card[data-i18n-card="project1_title"] img,
#projects .project-card:nth-child(1) img {
    height: 350px !important;
}

#projects .project-card[data-i18n-card="project7_title"] img,
#projects .project-card:nth-child(7) img {
    height: 350px !important;
}

@media (min-width: 640px) {
    #projects .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    #projects .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Skills */
#skills .grid {
    display: grid;
    gap: 1rem;
}

/* Contact */
#contact .contact-link {
    font-size: 1.5rem;
}

/* Responsive Styles */
@media (min-width: 640px) {
    section {
        padding: 4rem 2rem;
    }

    #navbar .container {
        flex-wrap: nowrap;
    }

    #navbar ul {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        box-shadow: none;
        padding: 0;
    }

    #navbar ul li {
        margin: 0 0.5rem;
    }

    .hamburger {
        display: none;
    }

    #home h1 {
        font-size: 3.5rem;
    }

    #home p {
        font-size: 1.25rem;
    }

    #about .flex {
        flex-direction: row;
        align-items: flex-start;
    }

    #about img {
        max-width: 300px;
    }

    #about .about-text {
        max-width: 600px;
    }

    #projects .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #skills .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #home h1 {
        font-size: 4.5rem;
    }

    #home p {
        font-size: 1.5rem;
    }

    #projects .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #skills .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .tooltip .tooltip-text {
        width: 300px;
        font-size: 0.9rem;
    }
}
