:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #7c3aed;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --success: #10b981;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header y Navegación */
header {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

/* Logo en el Header */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    height: 70px;
    width: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.logo-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    background-color: var(--primary);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 5px;
}

/* Hero Section */
.hero {
    padding: 80px 0 100px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="white" opacity="0.05"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-main {
    max-width: 900px;
    margin: 0 auto;
}

.hero-logo {
    margin-bottom: 30px;
}

.hero-logo-img {
    height: 150px;
    width: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: transform 0.5s, box-shadow 0.5s;
}

.hero-logo-img:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--dark);
    line-height: 1.2;
    position: relative;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto 30px;
    position: relative;
}

.highlight {
    color: var(--primary);
    font-weight: 700;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--primary);
    opacity: 0.2;
    border-radius: 3px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    position: relative;
}

.secondary-button {
    background-color: white;
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary);
    transition: all 0.3s;
    display: inline-block;
}

.secondary-button:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Secciones generales */
.section {
    padding: 80px 0;
}

.bg-light {
    background-color: #f8fafc;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

/* Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--light-gray);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.service-card p {
    color: var(--gray);
}

/* Proyectos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.project-content p {
    color: var(--gray);
    margin-bottom: 10px;
}

/* Sobre Mí */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.about-text p {
    margin-bottom: 15px;
    color: var(--gray);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.tech-display {
    background-color: #e0f2fe;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow);
}

.tech-display i {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.tech-display h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.tech-tag {
    background-color: var(--primary);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Formulario de Contacto */
.contact-section {
    background-color: white;
    padding: 80px 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.contact-description {
    margin-bottom: 20px;
    color: var(--gray);
}

.advantages {
    margin-bottom: 30px;
}

.advantages h4 {
    margin-bottom: 10px;
    color: var(--dark);
}

.advantages ul {
    list-style-position: inside;
    margin-top: 10px;
}

.advantages li {
    margin-bottom: 8px;
    color: var(--gray);
}

.contact-details h4 {
    margin-bottom: 10px;
    color: var(--dark);
}

.contact-details p {
    margin-bottom: 10px;
    color: var(--gray);
}

.contact-details i {
    color: var(--primary);
    margin-right: 10px;
    width: 20px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    font-size: 1.1rem;
    padding: 15px;
}

/* Footer */
footer {
    background-color: var(--dark);
    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-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo-img {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.footer-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.footer-about p {
    color: #cbd5e1;
    margin-bottom: 20px;
}

.footer-links h3, .footer-contact h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icons a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card, .project-card, .stat {
    animation: fadeIn 0.5s ease-out;
}

/* Blog Section (oculto por defecto) */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 90px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        display: none;
        z-index: 99;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-img {
        height: 60px;
        width: 60px;
    }
    
    .hero-logo-img {
        height: 120px;
        width: 120px;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 60px 0;
    }
    
    .service-card, .project-card {
        padding: 20px;
    }
    
    .tech-display {
        padding: 30px 20px;
    }
    
    .logo-text {
        display: none;
    }
    
    .logo-img {
        height: 50px;
        width: 50px;
    }
}