/* === Variables y Resets === */
:root {
    --bg-crema: #F5EBE0;
    --azul-dark: #1B263B;
    --azul-medium: #415A77;
    --dorado: #C1A461;
    --text-dark: #101828;
    --text-light: #FDFDFD;
    --ff-heading: 'Playfair Display', serif;
    --ff-body: 'Roboto', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-crema);
    color: var(--text-dark);
    font-family: var(--ff-body);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.sect-pad {
    padding: 100px 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    font-family: var(--ff-heading);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* === Títulos Generales === */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--dorado);
}

.section-title.light {
    color: var(--text-light);
}

/* === Botones === */
.btn-primary, .btn-secondary, .btn-small {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--azul-dark);
    color: var(--text-light);
    border: 2px solid var(--azul-dark);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--azul-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--azul-dark);
    border: 2px solid var(--azul-dark);
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: var(--azul-dark);
    color: var(--text-light);
}

.btn-small {
    padding: 8px 20px;
    background-color: var(--dorado);
    color: var(--azul-dark);
}

.btn-small:hover {
    background-color: var(--azul-dark);
    color: var(--text-light);
}

/* === Header === */
header {
    background-color: rgba(245, 235, 224, 0.95);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.logo {
    font-family: var(--ff-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--azul-dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a:not(.btn-small):hover {
    color: var(--dorado);
}

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

/* === Hero Sección === */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

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

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--dorado);
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--azul-medium);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-image {
    position: relative;
}

.profile-img {
    width: 350px;
    height: 450px;
    object-fit: cover;
    border-radius: 10px;
    position: relative;
    z-index: 2;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.1);
}

.gold-rect {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--dorado);
    top: 30px;
    left: 30px;
    border-radius: 10px;
    z-index: 1;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--azul-medium);
    animation: bounce 2s infinite;
}

/* === Sobre Mí === */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--azul-medium);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background-color: var(--azul-dark);
    color: var(--text-light);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border-bottom: 3px solid var(--dorado);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: var(--dorado);
}

/* === Servicios === */
.servicios {
    background-color: var(--azul-dark);
    color: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: rgba(255,255,255,0.05);
    padding: 40px;
    border-radius: 10px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(193, 164, 97, 0.3);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--dorado);
    margin-bottom: 20px;
    display: inline-block;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
}

/* === Portafolio === */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(16, 24, 40, 0.9), transparent);
    color: var(--text-light);
    transform: translateY(100%);
    transition: var(--transition);
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card:hover .project-info {
    transform: translateY(0);
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.project-info p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 10px;
}

.view-project {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dorado);
    text-transform: uppercase;
}

/* === Tecnologías === */
.tech {
    background-color: rgba(65, 90, 119, 0.05);
    text-align: center;
}

.subsection-title {
    color: var(--azul-medium);
    margin-bottom: 2rem;
    font-family: var(--ff-body);
}

.tech-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    font-size: 3rem;
    color: var(--azul-medium);
}

.tech-icons i {
    transition: var(--transition);
}

.tech-icons i:hover {
    color: var(--dorado);
    transform: scale(1.2);
}

/* === Contacto === */
.contacto {
    background-color: var(--azul-dark);
}

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

.contact-text p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 2rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.contact-info i {
    color: var(--dorado);
}

.contact-form {
    background-color: var(--text-light);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--ff-body);
}

.contact-form button {
    width: 100%;
}

/* === Footer y WhatsApp === */
footer {
    padding: 30px 0;
    background-color: #101828;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    text-align: center;
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    z-index: 100;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}
.trust-item i {
    font-size: 3rem;
    color: var(--dorado);
    margin-bottom: 20px;
    display: inline-block;
}
.trust-item h4 {
    font-family: var(--ff-heading);
    margin-bottom: 10px;
    font-size: 1.2rem;
}
.trust-item p {
    font-size: 0.9rem;
    color: var(--azul-medium);
}

/* === PROCESS SECTION === */
.process {
    background-color: var(--azul-dark);
    color: var(--text-light);
}
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}
.step {
    position: relative;
    padding: 20px;
    border-left: 1px solid rgba(193, 164, 97, 0.3);
}
.step-number {
    font-family: var(--ff-heading);
    font-size: 3.5rem;
    color: rgba(193, 164, 97, 0.1);
    position: absolute;
    top: -10px;
    right: 10px;
    font-weight: 700;
}
.step h4 {
    color: var(--dorado);
    margin-bottom: 10px;
}
.step p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
}

/* === Animaciones Keyframes y Media Queries (Móvil) === */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
    40% {transform: translateY(-10px) translateX(-50%);}
    60% {transform: translateY(-5px) translateX(-50%);}
}

/* Clases de animación iniciales para JS */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay {
    opacity: 0;
    transition: opacity 1s ease-out;
    transition-delay: 0.3s;
}

.fade-in-delay.appear {
    opacity: 1;
}

@media (max-width: 992px) {
    .hero-grid, .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 { font-size: 2.8rem; }
    
    .hero-text p { margin-left: auto; margin-right: auto; }
    
    .hero-image { order: -1; margin-bottom: 30px; }
    
    .profile-img { width: 250px; height: 320px; margin: 0 auto; }
    
    .gold-rect { width: 250px; height: 320px; left: calc(50% - 110px); top: 20px;}

    .contact-form { padding: 20px; }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 80px;
        right: -100%;
        background-color: var(--bg-crema);
        width: 70%;
        height: calc(100vh - 80px);
        flex-direction: column;
        padding: 50px;
        box-shadow: -5px 5px 10px rgba(0,0,0,0.05);
        transition: var(--transition);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .menu-toggle { display: block; }
}

/* Efecto de brillo en tarjetas al pasar el mouse */
.service-card, .step, .trust-item, .project-card, .fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* El "Brillo" que atraviesa la tarjeta */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(193, 164, 97, 0.1),
        transparent
    );
    transition: all 0.6s;
}

.service-card:hover::before {
    left: 100%;
}

/* Animación para el texto Highlight */
.highlight {
    color: var(--dorado);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 0;
    height: 8px;
    display: block;
    margin-top: -12px;
    right: 0;
    background: rgba(193, 164, 97, 0.3);
    transition: width 0.6s ease;
    z-index: -1;
}

.appear .highlight::after {
    width: 100%;
    left: 0;
}

.cursor, .cursor-follower {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    z-index: 9999;
    transform: translate(-50%, -50%); /* Centra el cursor */
}

.cursor {
    width: 8px;
    height: 8px;
    background: var(--dorado);
}

.cursor-follower {
    width: 30px;
    height: 30px;
    border: 1px solid var(--dorado);
    transition: all 0.3s ease-out;
}

.hero .fade-in, .hero .fade-in-delay {
    opacity: 1;
    transform: translateY(0);
}

.appear {
    opacity: 1 !important;
    transform: translateY(0) !important;
}