/* Variables y reset */
:root {
    --primary-color: #aa0f0e;
    --secondary-color: #000000;
    --dark-color: #000000;
    --light-color: #f8fafc;
    --gray-color: #aa0f0e;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header y navegación */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo-icon {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 2.2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-color);
}

/* Secciones generales */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    color: var(--gray-color);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Inicio - Hero */
#inicio {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    /*background-image: url("https://www.scorpionsoft.mx/img/bg-xmas.gif");*/
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.2rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.hero-text h1 span {
    color: var(--primary-color);
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 30px;
}

.hero-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 14px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Acerca de */
#acerca {
    background-color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--gray-color);
}

.skills {
    margin-top: 30px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-item span {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.skill-bar {
    height: 10px;
    background-color: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Portafolio */
#portafolio {
    background-color: #f8fafc;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.portfolio-img {
    height: 200px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 25px;
}

.portfolio-info h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.portfolio-info p {
    color: var(--gray-color);
    margin-bottom: 15px;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #e0f2fe;
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Contacto */
#contacto {
    /*background-color: white;*/
    background-color: #f8fafc;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: #e0f2fe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-details h3 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.contact-details p {
    color: var(--gray-color);
}

.contact-form {
    background-color: #f8fafc;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 25px;
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    display: block;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    display: block;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.8rem;
}

.footer-logo .logo-icon {
    color: white;
}

.footer-about p {
    color: #cbd5e1;
    margin-bottom: 20px;
}

.footer-links h3, .footer-social h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #334155;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #334155;
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content, .about-content {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }
    
    #inicio {
        /*background-image: url("https://www.scorpionsoft.mx/img/bg-xmas.gif");*/
        background-size: cover;
        /* O 'contain', o un tamaño específico */
        background-position: 50% 50%;
        /* Centra la imagen */
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .logo {
        position: static;
        transform: none;
    }

    .nav-container {
        justify-content: space-between;
    }

    .hero-text h1 {
        font-size: 2.4rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .contact-form {
        padding: 25px;
    }

    #inicio {
        /*background-image: url("https://www.scorpionsoft.mx/img/bg-xmas.gif");*/
        background-size: cover;
        /* O 'contain', o un tamaño específico */
        background-position: 50% 50%;
        /* Centra la imagen */
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 12px 25px;
    }

    #inicio {
        /*background-image: url("https://www.scorpionsoft.mx/img/bg-xmas.gif");*/
        background-size: cover;
        /* O 'contain', o un tamaño específico */
        background-position: 50% 50%;
        /* Centra la imagen */
    }
}


/* Botón "Ir Arriba" */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}

.scroll-top-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.scroll-top-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Animación de pulso (opcional) */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.scroll-top-btn.pulse {
    animation: pulse 2s infinite;
}

/* Efecto Nieve */
.snow-container {
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

.snowflake {
    background-color: white;
    border-radius: 50%;
    width: .2rem;
    aspect-ratio: 1;
    box-shadow: 0 0 10px white; 
    position: absolute;
    opacity: .5;
    top: -5%;
    animation: snowfall 6s forwards linear infinite; 
}

@keyframes snowfall {
    50% {
        transform: translateY(50vh);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}