/* Variables CSS para consistencia de colores */
:root {
    --primary-color: #007BFF; /* Azul profesional */
    --secondary-color: #343A40; /* Gris oscuro para texto */
    --background-light: #F8F9FA; /* Fondo claro */
    --text-light: #FFFFFF;
    --text-dark: #212529;
    --highlight-color: #28A745; /* Verde para destacar la acción */
    --spacing: 20px;
}

/* Reset Básico y Tipografía */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    overflow-x: hidden; /* Previene scroll horizontal en móviles */
}

h1, h2, h3 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--highlight-color);
}

/* 1. Estilos de la Sección Principal (Hero) */
.hero {
    background: url('fondo-hero.jpg') no-repeat center center/cover; /* Reemplaza 'fondo-hero.jpg' por una imagen de tecnología o abstracta */
    color: var(--text-light);
    height: 70vh; /* Altura visible */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* Overlay para mejorar la legibilidad del texto */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 var(--spacing);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.hero .role {
    font-size: 1.1rem;
    margin-bottom: var(--spacing) * 1.5;
    opacity: 0.8;
}

.highlight {
    color: var(--highlight-color);
    font-weight: 700;
}

.bold {
    font-weight: 700;
}

/* Botón CTA Principal */
.cta-button {
    display: inline-block;
    background-color: var(--highlight-color);
    color: var(--text-light);
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #1e7e34; /* Tono de verde más oscuro */
    transform: translateY(-2px);
}

/* 2. Estilos de la Sección de Servicios */
.services, .about, .contact {
    padding: 60px var(--spacing);
    text-align: center;
}

.services {
    background-color: var(--text-light);
}

.service-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing);
    margin-top: var(--spacing) * 2;
}

.service-card {
    background-color: var(--background-light);
    padding: var(--spacing);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 280px;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

/* 3. Estilos de la Sección Sobre Mí */
.about {
    background-color: #E9ECEF;
    text-align: left;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: var(--secondary-color);
    text-align: center;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    object-fit: cover;
}

/* 4. Estilos de la Sección de Contacto */
.contact {
    background-color: var(--text-light);
}

.contact h2 {
    font-size: 2rem;
    max-width: 800px;
    margin: 0 auto var(--spacing);
}

.contact p {
    margin-bottom: var(--spacing) * 2;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    padding: 12px;
    border: 1px solid #CED4DA;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
}

.submit-button {
    width: 100%;
    margin-top: 10px;
}

#form-message {
    color: var(--highlight-color);
    font-weight: 600;
    margin-top: 10px;
}

.hidden {
    display: none;
}

.social-links {
    margin-top: var(--spacing) * 2;
}

.social-links a {
    font-size: 1.8rem;
    margin: 0 10px;
    color: var(--secondary-color);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* 5. Estilos del Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--background-light);
    padding: var(--spacing);
    text-align: center;
    font-size: 0.9rem;
}

/* 6. Responsividad (Media Queries) */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .about-container {
        flex-direction: column;
        text-align: center;
    }
    .about-text, .about-image {
        flex: none;
        width: 100%;
    }
    .about-image img {
        margin-top: var(--spacing);
        max-height: 300px;
    }
}

@media (max-width: 600px) {
    .hero {
        height: 60vh;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .services, .about, .contact {
        padding: 40px var(--spacing) * 0.75;
    }
    .service-card {
        max-width: 100%;
    }
    .contact h2 {
        font-size: 1.5rem;
    }
}
