/* General */
* {
    box-sizing: border-box;
    user-select: none;
    padding: 0;
    margin: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #2c3e50;
    overflow-x: hidden;
    color: #ecf0f1;
    line-height: 1.6;
}

body.menu-open .container {
    transition: filter 1.5s ease;
    -webkit-filter: blur(5px);
    filter: blur(5px);
}

.container {
    overflow: hidden;
    margin: auto;
    width: 90%;
}

/* Header */
header {
    background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
    border-bottom: 5px solid #1abc9c;
    text-align: center;
    color: #ecf0f1;
    position: fixed;
    top: 0;
    left: 0;
    height: 140px;
    width: 100%;
    transition: top 0.3s ease;
    z-index: 1000;
}

header h1 {
    font-family: 'Georgia', serif;
    font-style: italic;
    text-shadow: 3px 3px 6px #1abc9c99;
    font-size: 2.5rem;
    color: #2c3e50;
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Navigation */
nav {
    justify-content: space-between;
    background-color: #1c2833;
    align-items: center;
    position: relative;
    display: flex;
    padding: 20px;
    width: 100%;
    z-index: 1010;
}

nav .logo {
    text-decoration: none;
    font-weight: bold;
    color: #ecf0f1;
}

nav .logo img {
    transition: transform 0.5s ease;
    border-radius: 10px;
    height: 60px;
    width: 60px;
}

nav .logo img:hover {
    transform: scale(1.08);
}

#nav-menu {
    transition: transform 0.4s ease;
    list-style: none;
    display: flex;
    font-size: 16px;
    padding: 0;
    margin: 0;
}

#nav-menu li {
    margin: 0 15px;
}

#nav-menu li a {
    transition: color 0.3s ease;
    text-decoration: none;
    color: #ecf0f1;
}

#nav-menu li svg {
    transition: color 0.3s ease;
    cursor: pointer;
    height: 25px;
    width: 25px;
}

#nav-menu li a:hover,
#nav-menu li svg:hover {
    font-style: italic;
    color: #1abc9c;
}

/* Fade animation menu */
#nav-menu.open li {
    animation: fadeIn 0.3s forwards;
    opacity: 0;
}

#nav-menu.open li:nth-child(1) {
    animation-delay: 0.1s;
}

#nav-menu.open li:nth-child(2) {
    animation-delay: 0.2s;
}

#nav-menu.open li:nth-child(3) {
    animation-delay: 0.3s;
}

#nav-menu.open li:nth-child(4) {
    animation-delay: 0.4s;
}

#nav-menu.open li:nth-child(5) {
    animation-delay: 0.5s;
}

#nav-menu.open li:nth-child(6) {
    animation-delay: 0.6s;
}

/* Hamburguer menu */
.hamburger {
    transition: transform 0.3s ease;
    justify-content: space-between;
    flex-direction: column;
    cursor: pointer;
    display: none;
    z-index: 100;
    height: 20px;
    width: 30px;
}

.hamburger span {
    background-color: #ecf0f1;
    transition: all 0.3s ease;
    border-radius: 5px;
    height: 4px;
    width: 100%;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Section */
#about {
    background: linear-gradient(to right, #34495e, #2c3e50);
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border-radius: 0 0 30px 30px;
    padding: 60px 10px;
    padding-top: 160px;
}

#about h2 {
    margin: 0 0 20px 0;
    font-size: 2.5em;
}

#about p {
    margin: auto;
    font-size: 1.2em;
    line-height: 1.6;
    max-width: 800px;
}

/* Services Section */
#services {
    margin-top: 20px;
    padding: 60px 10px;
    box-shadow: 0 0px 10px #33ffff;
    border-radius: 30px 30px 0 0;
    background: linear-gradient(to top, #0f2027, #203a43, #2c5364);
}

#services h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
}

#services .carousel-text,
#skills .carousel-text {
    border-radius: 15px;
    padding: 30px;
}

#services .carousel-text h3,
#skills .carousel-text h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.8em;
}

#services .carousel-text p,
#skills .carousel-text p {
    text-align: left;
    font-size: 1.1em;
}

/* Skills Section */
#skills {
    background: linear-gradient(to bottom, #0f2027, #203a43, #2c5364);
    box-shadow: 0 10px 10px #33ffff;
    border-radius: 0 0 0 0;
    padding: 60px 10px;
}

#skills h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
}

/* Projects Section */
#projects {
    background: linear-gradient(to top, #0f2027, #203a43, #2c5364);
    box-shadow: 0 10px 10px #33ffff;
    border-radius: 0 0 30px 30px;
    padding: 60px 10px;
}

#projects h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
}

/* Carrusel */
.container-empty {
    background-color: #34495e;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 0 0 15px 15px;
    font-size: 16px;
    padding: 10px;
    flex: 1;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    margin: auto;
    border-radius: 30px;
    width: 100%;
}

.carousel {
    transition: transform 0.5s ease-in-out;
    display: flex;
}

.carousel-item {
    box-sizing: border-box;
    flex-direction: column;
    display: flex;
    transition: transform 0.4s, box-shadow 0.4s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-radius: 30px;
    min-width: 33.33%;
    padding: 10px;
}

.carousel-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    transform: translateY(-10px);
}

.carousel-image img {
    object-fit: cover;
    display: block;
    border-radius: 15px 15px 0 0;
    transition: opacity 0.7s;
    height: 200px;
    width: 100%;
}

.carousel-image img:hover {
    opacity: 0.8;
}

.carousel-text {
    background-color: #34495e;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 0 0 15px 15px;
    font-size: 16px;
    padding: 10px;
    flex: 1;
}

.carousel-text h3 {
    text-align: left;
    color: #ecf0f1;
    margin: 0 10px 0 0;
    font-size: 1.8em;
    padding: 15px;
}

.carousel-text p {
    text-align: left;
    color: #bdc3c7;
    padding: 0 15px 15px;
    font-size: 1.1em;
}

.carousel-text a {
    transition: color 0.5s ease, background-color 0.5s ease;
    text-decoration: none;
    font-weight: bold;
    background-color: #3498db;
    color: #ddd;
    padding: 2px;
    border-radius: 5px;
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.carousel-text a:hover {
    background-color: #1abc9c;
    outline: 2px solid #1abc9c;
    color: #fff;
}

.carousel-button {
    transition: transform 0.3s ease, opacity 0.7s ease;
    position: absolute;
    user-select: none;
    cursor: pointer;
    color: #fff;
    border: none;
    background-color: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
    border-radius: 50%;
    font-size: 24px;
    padding: 5px 15px;
    opacity: 70%;
    z-index: 10;
    top: 50%;
}

.carousel-button:hover {
    transform: translateY(-50%) scale(1.1);
    opacity: 100%;
}

.carousel-button:active {
    transform: translateY(-50%) scale(0.9);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Contact Section */
#contact {
    background: linear-gradient(to right, #34495e, #2c3e50);
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border-radius: 30px 30px 0 0;
    padding: 60px 10px;
    margin-top: 40px;
}

#contact h2 {
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 2.5em;
}

#contact form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 600px;
    margin: auto;
}

#contact form input:focus,
#contact form textarea:focus {
    box-shadow: 0 0 8px #33ffff;
    border-color: #4CAF50;
    outline: none;
}

/* Chrome, Safari y Edge */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

#contact .form-group {
    flex-direction: column;
    display: flex;
}

#contact .form-group label {
    font-weight: bold;
    text-align: left;
    margin-bottom: 5px;
}

#contact .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

#contact .form-group input,
#contact .form-group textarea {
    padding: 10px;
    font-size: 1.1em;
    border-radius: 5px;
    border: 1px solid #bdc3c7;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #1abc9c;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Social Media Section */
#contact .social-media {
    text-align: center;
    margin: 40px 0 20px 0;
}

#contact .social-media h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

#contact .social-icons {
    justify-content: center;
    flex-wrap: wrap;
    display: flex;
    gap: 20px;
}

#contact .social-icon {
    transition: color 0.3s ease;
    text-decoration: none;
    align-items: center;
    display: flex;
    color: #fff;
    font-size: 1.2em;
}

#contact .social-icon svg {
    transition: transform 0.3s ease;
    margin-right: 5px;
    height: 24px;
    width: 24px;
}

#contact .social-icon:hover svg {
    transform: scale(1.1);
}

#contact .social-icon:hover {
    font-style: italic;
    color: #1abc9c;
}

/* Buttons */
button.btn {
    background-color: #1abc9c;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 1.1em;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

button.btn:hover {
    background-color: #16a085;
    transform: scale(1.05);
}

button.btn:active {
    transform: scale(1.02);
}

/* Footer */
footer {
    background-color: #1c2833;
    color: #ecf0f1;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    border-top: 5px solid #1abc9c;
}

/* Responsive */
@media (max-width: 1016px) {
    body {
        overflow-x: hidden;
    }

    header {
        height: 110px;
    }

    header h1 {
        text-shadow: 2px 2px 4px #1abc9c99;
        font-size: 1.3rem;
    }

    .hamburger {
        display: flex;
    }

    #nav-menu {
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        background-color: #1c2833;
        width: 250px;
        height: 100vh;
        transform: translateX(100%);
        transition: transform 0.4s ease, opacity 0.4s ease;
        opacity: 0;
        border-radius: 10px 0 0 10px;
        z-index: 99;
        padding-top: 30px;
        overflow-x: hidden;
    }

    #nav-menu.open {
        transform: translateX(0);
        opacity: 1;
    }

    #nav-menu li {
        margin: 20px 0;
        text-align: center;
    }

    #nav-menu li a {
        font-size: 18px;
        font-weight: bold;
    }

    #about {
        padding-top: 130px;
    }

    #contact form {
        padding: 0 20px;
        grid-template-columns: 1fr;
    }

    .carousel-item {
        min-width: 100%;
    }

    .carousel-text {
        font-size: 14px;
        padding: 5px;
    }

    .carousel-text h3 {
        font-size: 1.5em;
    }

    .carousel-text p {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    #contact .social-icon {
        font-size: 1em;
    }

    #contact .social-icon img {
        height: 30px;
        width: 30px;
    }
}

@media (max-width: 400px) {
    header h1 {
        font-size: 1rem;
    }

    #contact .social-icons {
        flex-direction: column;
        align-items: center;
    }

    #contact .social-icon {
        font-size: 0.9em;
        margin-bottom: 5px;
    }

    #contact .social-icon img {
        height: 25px;
        width: 25px;
    }
}

@media (max-width: 260px) {
    header h1 {
        font-size: 0.6rem;
    }
}