/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    overflow-x: hidden;
}

/* Top Bar */
.top-bar {
    background-color: #2b1f1a;
    color: #8c827a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 50px;
    font-size: 0.85rem;
}

.top-bar-left span {
    margin-right: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.top-bar-left span:hover {
    color: #fff;
}

.top-bar-right {
    position: relative;
    display: flex;
    align-items: center;
}

.top-bar-right input {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #5a4f4a;
    color: #fff;
    padding: 3px 20px 3px 5px;
    font-size: 0.85rem;
    outline: none;
}

.top-bar-right .search-icon {
    position: absolute;
    right: 5px;
    color: #8c827a;
    cursor: pointer;
}

/* Main Navigation */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 130px;
    width: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-top: 5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: #000;
}

.btn-repo {
    background-color: #4a3628;
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.btn-repo:hover {
    background-color: #35251b;
}

/* Hero Section */
.hero {
    height: calc(100vh - 110px);
    background-image: url('fondo_nuevo.jpg?v=4');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
}

/* Semi-transparent overlay to make text readable and blend image */
.hero::before {
    display: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.4);
    padding: 20px 40px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: #b5121b; /* Deep Red color */
    margin-bottom: 10px;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    letter-spacing: 2px;
}

/* Floating Tech Icons */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.icon {
    position: absolute;
    filter: drop-shadow(0px 10px 15px rgba(0,0,0,0.3));
    animation: float 6s ease-in-out infinite;
}

.html-icon {
    top: 20%;
    left: 10%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.css-icon {
    top: 35%;
    left: 20%;
    width: 75px;
    height: 75px;
    animation-delay: 1s;
}

.js-icon {
    top: 50%;
    left: 5%;
    width: 85px;
    height: 85px;
    animation-delay: 2s;
}

.java-icon {
    top: 65%;
    left: 15%;
    width: 90px;
    height: 90px;
    animation-delay: 0.5s;
}

.sql-icon {
    top: 80%;
    left: 8%;
    width: auto;
    height: 70px;
    animation-delay: 1.5s;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@media (max-width: 992px) {
    .hero-content h1 { font-size: 3rem; }
    .hero-content h2 { font-size: 1.5rem; }
    .nav-links { gap: 15px; }
}

@media (max-width: 768px) {
    .main-nav { flex-direction: column; padding: 20px; }
    .nav-links { flex-direction: column; text-align: center; margin-top: 20px; }
    .hero {
        background-image: url('fondo_vertical.jpg?v=4');
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        height: calc(100vh - 150px);
        padding-top: 0;
        margin-top: 10px;
    }
    .floating-icons { display: none; }
}

/* Games Grid */
.games-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.game-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    width: 250px;
    padding: 30px 20px;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: #b5121b;
}

.game-card i {
    font-size: 4rem;
    color: #b5121b;
    margin-bottom: 20px;
}

.game-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #b5121b;
}

.game-card p {
    font-size: 0.9rem;
    color: #777;
    font-weight: 600;
}

/* Sobre Mi Section */
.sobre-mi-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 60px 10%;
    background-color: #f9f9f9;
}

.sobre-mi-content {
    flex: 1;
    min-width: 300px;
    padding-right: 40px;
}

.sobre-mi-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    color: #0b1a30; /* Navy blue from logo */
    margin-bottom: 10px;
}

.sobre-mi-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #00a0ff; /* Sky blue from logo */
    margin-bottom: 25px;
    line-height: 1.5;
}

.sobre-mi-text p {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
    font-family: 'Courier New', Courier, monospace;
}

.sobre-mi-images {
    flex: 0.8;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-pic {
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}

.profile-pic:hover {
    transform: translateY(-5px);
}

@media (max-width: 992px) {
    .sobre-mi-container {
        flex-direction: column-reverse;
        text-align: center;
        padding: 40px 5%;
    }
    .sobre-mi-content {
        padding-right: 0;
        margin-top: 30px;
    }
    .sobre-mi-text p {
        text-align: left;
    }
}

/* Floating background image behind Sobre Mi text */
.sobre-mi-content {
    position: relative;
    overflow: visible;
}

.paises-bg {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.sobre-mi-text-content {
    position: relative;
    z-index: 1;
}

/* Category Filter Buttons */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #b5121b;
    color: #b5121b;
    background-color: #fcfcfc;
}

.filter-btn.active {
    background-color: #b5121b;
    color: #fff;
    border-color: #b5121b;
    box-shadow: 0 4px 10px rgba(181, 18, 27, 0.3);
}

/* Language Selector styling */
.lang-selector {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}

.lang-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 14px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    outline: none;
}

.lang-btn:hover {
    border-color: #b5121b;
    color: #b5121b;
}

.lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    min-width: 105px;
    border: 1px solid #eee;
}

.lang-dropdown a {
    display: block;
    padding: 8px 12px;
    color: #555;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    transition: background 0.2s, color 0.2s;
    text-align: left;
}

.lang-dropdown a:hover {
    background-color: #f5f5f5;
    color: #b5121b;
}

.lang-selector.active .lang-dropdown {
    display: block;
}

@media (max-width: 768px) {
    .lang-selector {
        margin-left: 0;
        margin-top: 15px;
        align-self: center;
    }
}
