/* ==========================================================================
   Variables y Reset
   ========================================================================== */
   :root {
    --primary-color: #1e3a8a; /* Azul oscuro corporativo */
    --secondary-color: #3b82f6; /* Azul brillante */
    --text-color: #374151; /* Gris oscuro para lectura */
    --light-bg: #f3f4f6; /* Gris muy claro */
    --white: #ffffff;
    --border-color: #e5e7eb;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

/* ==========================================================================
   Utilidades Generales
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #152c6b;
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-primary-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-primary-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Navegación
   ========================================================================== */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.logo span.highlight {
    color: var(--secondary-color);
}

.logo-icon {
    color: var(--secondary-color);
    font-weight: 800;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* ==========================================================================
   Sección Hero (Inicio)
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ==========================================================================
   Servicios
   ========================================================================== */
.services {
    padding: 80px 0;
    background-color: var(--light-bg);
}

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

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

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

/* ==========================================================================
   Proyectos / Portafolio
   ========================================================================== */
.portfolio {
    padding: 80px 0;
    background-color: var(--white);
}

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

.project-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
}

.project-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.project-body h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.project-body p {
    font-size: 1.05rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background-color: rgba(59, 130, 246, 0.12);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
}

/* ==========================================================================
   Sobre Mí
   ========================================================================== */
.about {
    padding: 80px 0;
}

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

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.about-text p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact {
    padding: 80px 0;
    background-color: var(--light-bg);
}

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

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 5px;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.privacy-check {
    font-size: 0.9rem;
    color: var(--text-color);
}

.privacy-check label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.privacy-check input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
}

.privacy-check a {
    color: var(--primary-color);
    text-decoration: none;
}

.privacy-check a:hover {
    text-decoration: underline;
}

/* Alertas del formulario */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0 30px;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.footer-logo span.highlight {
    color: #93c5fd; /* Azul más claro para que resalte en el footer oscuro */
}

.footer-links {
    margin-top: 20px;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.7;
    transition: var(--transition);
    padding: 0 5px;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* En un futuro se puede añadir menú hamburguesa */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

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

/* ==========================================================================
   Páginas de Servicios (Internas)
   ========================================================================== */
.page-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.service-detail {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.service-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.service-content h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
}

.service-content h3 {
    color: var(--primary-color);
    margin: 30px 0 15px;
    font-size: 1.5rem;
}

.service-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.service-content ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.service-content li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}
