/* Variables */
:root {
    --primary-color: #ff8c00; /* Naranja/Ámbar vibrante */
    --secondary-color: #f7f7f7;
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.3s;
}

/* Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: #ffb74d;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    border: none;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.primary-btn:hover {
    background-color: #ffb74d;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 140, 0, 0.4);
}

/* Header/Nav (Fijo en la parte superior) */
header {
    background: rgba(18, 18, 18, 0.95);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 140, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    /* APLICAR EL FONDO Y LA SOMBRA AL CONTENEDOR */
    background-color: var(--primary-color); /* Fondo Naranja vibrante */
    padding: 0 px 15px; /* Más espaciado para que se vea mejor */
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 5px; 
    
    /* Efecto de sombra de caja para que parezca elevado */
    box-shadow: 0 0px 15px rgba(255, 140, 0, 0.6); /* Sombra difuminada naranja */
    transition: box-shadow var(--transition-speed);
}
.logo a {
    width: auto;
}

.logo:hover {
    box-shadow: 0 0px 15px rgba(0, 0, 255, 2);
    background-color: rgba(255, 255, 255, 2);
}

.logo img {
    width: auto; 
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 400;
}

/* Hero Section */
.hero {
    padding: 100px 0;
    min-height: 40vh;
    display: flex;
    align-items: center;
}

.hero .content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero .text-content {
    flex: 1;
    max-width: 50%;
}

.hero .text-content h2 {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.1;
    color: var(--secondary-color);
    font-weight: 700;
}

.hero .image-content {
    flex: 1;
    text-align: right;
}

.hero .image-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}


/* Common Section Styling */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Services Section */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: 1px solid rgba(255, 140, 0, 0.1);
}

/* Efecto hover */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--primary-color);
}

.service-card .icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: inline-block;
}

/* Portfolio Section */
.portfolio {
    background-color: #0d0d0d;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.portfolio-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Efecto zoom al pasar el ratón */
.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Contact Section */
.contact {
    text-align: center;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1em;
    transition: border-color var(--transition-speed);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(255, 140, 0, 0.5);
}

/* Footer */
footer {
    background-color: var(--card-bg);
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 140, 0, 0.1);
}


/* --- ANIMACIONES Y EFECTOS PROFESIONALES --- */

/* 1. Efecto Pulso para el botón principal */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 140, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 140, 0, 0); }
}

.pulse-effect {
    animation: pulse 2s infinite;
}

/* 2. Animaciones de entrada al hacer scroll (gestionadas por JS) */
.fade-in-up, .fade-in-right {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right {
    transform: translateX(30px);
}

/* Estado final de la animación */
.animated {
    opacity: 1;
    transform: translate(0, 0);
}

/* Retardos para un efecto escalonado en los servicios y portafolio */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Media Queries (Responsividad) */
@media (max-width: 900px) {
    .hero .content {
        flex-direction: column;
        text-align: center;
    }
    .hero .text-content {
        max-width: 100%;
    }
    .hero .text-content h2 {
        font-size: 2.5em;
    }
    .hero .image-content {
        text-align: center;
    }
    nav ul {
        display: none;
    }
    header .container {
        justify-content: center;
    }
}