/*
This is a project by Hermeteus (Francisco Fernández Coca) for his personal portfolio.
It is released under the CC BY-SA license.
*/

/* -----------------------------------------------
   1. GENERAL STYLES AND BODY
-------------------------------------------------- */
body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Arial', sans-serif;
    background-image: url("../img/fondo.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    overflow: hidden;
}

/* -----------------------------------------------
   2. NAVBAR AND MENU
-------------------------------------------------- */
.navbar {
    background-color: #1c1c1c;
    padding: 10px 20px;
    position: relative;
}

.navbar-toggler {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
}

.dropdown-menu {
    background-color: #1c1c1c;
    border: none;
}

.dropdown-menu .dropdown-item {
    color: white;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #333;
}

@media (max-width: 990px) {
    .navbar {
        padding: 15px 20px;
        min-height: 60px;
    }

    .navbar-toggler {
        top: 50%;
        left: 20px;
        transform: translateY(-50%);
    }

    .navbar-collapse {
        text-align: center;
    }

    .navbar-nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* -----------------------------------------------
   3. CANVAS BACKGROUND
-------------------------------------------------- */
#spaceCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* -----------------------------------------------
   4. ANIMATIONS (FADE IN/OUT)
-------------------------------------------------- */
.fade-in {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: fadeIn 1s forwards;
}

.fade-out {
    visibility: hidden !important;
    opacity: 0 !important;
    animation: fadeOut 1s forwards;
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* -----------------------------------------------
   5. MAIN SECTIONS
-------------------------------------------------- */

/* Hide all sections by default */
.hero-section,
.about-section,
.portfolio-section,
.social-container {
    display: none;
    visibility: hidden;
    opacity: 0;
    position: relative;
    z-index: 2;
    min-height: 100vh;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* HERO (HOME) SECTION */
.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    z-index: 2;
    padding: 20px;
}

.hero-section img {
    max-width: 250px;
    width: 100%;
}

#hero-title {
    font-size: 3rem;
    margin: 20px 0;
}

#hero-description {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

/* ABOUT SECTION */
.about-section {
    flex-direction: column;
    align-items: center;
    margin-top: 2%;
    gap: 20px;
    z-index: 3;
}

.about-box {
    background: rgba(28, 28, 28, 0.8);
    border-radius: 20px;
    padding: 20px;
    width: 80%;
    max-width: 50%;
    box-shadow: 0px 0px 15px rgba(0, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    text-align: center;
}

.about-img {
    width: 100%;
    max-width: 20%;
    border-radius: 50%;
}

.about-text {
    color: #fff;
    font-size: 1.2rem;
}

/* PORTFOLIO SECTION */
.portfolio-section {
    flex-direction: column;
    align-items: center;
    z-index: 4;
}

#portfolio-title {
    font-size: 2.5rem;
    margin-top: -50px;
}

#portfolio-description {
    font-size: 1.25rem;
}

/* -----------------------------------------------
   6. PORTFOLIO CAROUSEL
-------------------------------------------------- */
#carousel {
    margin-top: -200px;
}

button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 10px;
    cursor: pointer;
    z-index: 100;
}

#prev { 
    left: 10%; 
}

#next { 
    right: 10%; 
}

/* -----------------------------------------------
   7. CUSTOM BUTTON BELOW CAROUSEL
-------------------------------------------------- */
#portfolio .btn-custom {
    background: rgba(28, 28, 28, 0.8);
    color: white;
    border: none;
    font-size: 1.25rem;
    padding: 12px 24px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px rgba(0, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    text-decoration: none;
    align-items: center;
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

#portfolio .btn-custom:hover {
    background: rgba(0, 255, 255, 0.6);
    box-shadow: 0px 0px 25px rgba(0, 255, 255, 0.8);
}

/* -----------------------------------------------
   8. FOOTER
-------------------------------------------------- */
.footer {
    background-color: #1c1c1c;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    text-align: center;
}

/* -----------------------------------------------
   9. SOCIAL SECTION (DEV & GAMEPLAY)
-------------------------------------------------- */
.social-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 5%;
}

.social-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.social-box {
    background: rgba(28, 28, 28, 0.8);
    padding: 20px;
    border-radius: 20px;
    width: 400px;
    max-width: 400px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    text-align: center;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.social-box h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: #0ff;
}

.social-links {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links li {
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Social links icon styles */
.social-links i {
    margin-right: 10px;
}

.social-links a {
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: #0ff;
}

/* Mobile scale */
@media (max-width: 768px) {
    body, html {
        overflow-y: auto;
    }

    .social-section {
        margin-bottom: 25%;
    }

    .social-wrapper {
        min-height: 100vh;
    }
}
