/* Variables y reset */
:root {
    /* Nueva paleta de colores más profesional */
    --primary-color: #1a5f7a;     /* Azul profesional más oscuro */
    --secondary-color: #002b36;   /* Azul muy oscuro para contraste */
    --accent-color: #57c5b6;      /* Verde azulado para acentos */
    --accent-secondary: #159895;  /* Verde azulado secundario */
    --text-color: #333;           /* Negro suave para texto principal */
    --text-light: #666;           /* Gris para texto secundario */
    --bg-light: #f5f7f8;          /* Fondo claro con tono azulado */
    --bg-dark: #1a2a32;           /* Fondo oscuro con tono azulado */
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* Transición mejorada */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Botones con transiciones mejoradas */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 35px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 15px 35px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Logo mejorado */
.logo a {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 2px;
    position: relative;
    transition: var(--transition);
}

.logo a:hover {
    text-shadow: 0 0 10px rgba(26, 95, 122, 0.3);
}

.logo span {
    font-weight: 400;
    font-size: 18px;
    color: var(--secondary-color);
    letter-spacing: normal;
    margin-left: 5px;
}

/* Navbar con transición para ocultar/mostrar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.navbar-hidden {
    transform: translateY(-100%);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin-bottom: 5px;
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-scrolled {
    height: 70px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hero Section con gradiente mejorado */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, rgba(26, 95, 122, 0.9) 0%, rgba(0, 43, 54, 0.9) 100%), url('https://images.unsplash.com/photo-1581092160607-ee22731c9c64?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
}

.hero-content {
    max-width: 700px;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--accent-color);
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.section-header:hover h2::after {
    width: 100px;
    background-color: var(--accent-color);
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    margin-top: 20px;
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, rgba(26, 95, 122, 0.05), transparent);
    transition: var(--transition);
    z-index: -1;
}

.service-card:hover::before {
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--accent-color);
    transform: rotateY(360deg);
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.service-card:hover h3 {
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
}

/* About Section */
.about {
    padding: 100px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text {
    text-align: left;
}

.about-text .section-header {
    text-align: left;
    margin-bottom: 30px;
}

.about-text .section-header h2::after {
    left: 0;
    transform: none;
}

.about-text p {
    margin-bottom: 25px;
    color: var(--text-light);
}

.values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.value-item:hover {
    transform: translateX(5px);
}

.value-item i {
    color: var(--primary-color);
    font-size: 18px;
    transition: var(--transition);
}

.value-item:hover i {
    color: var(--accent-color);
    transform: scale(1.2);
}

.about-image .image-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-image .image-container:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.about-image .image-container::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 200px;
    height: 200px;
    border: 10px solid var(--primary-color);
    border-radius: 8px;
    z-index: -1;
    transition: var(--transition);
}

.about-image .image-container:hover::before {
    border-color: var(--accent-color);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.project-card:hover .project-info h3 {
    color: var(--primary-color);
}

.project-info p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.project-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    transition: var(--transition);
}

.project-card:hover .project-category {
    background-color: var(--accent-color);
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 15px;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-top: 5px;
    transition: var(--transition);
}

.contact-item:hover i {
    color: var(--accent-color);
    transform: scale(1.2);
}

.contact-item h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.social-media {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px) rotate(360deg);
}

.contact-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-form:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.2);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: var(--white);
    padding: 70px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo a {
    font-size: 28px;
    margin-bottom: 15px;
    display: inline-block;
    color: var(--white);
}

.footer-logo span {
    color: var(--accent-color);
}

.footer-logo p {
    color: var(--gray-400);
    margin-top: 15px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--white);
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.footer-column:hover h3::after {
    width: 60px;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--gray-400);
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-700);
    color: var(--gray-500);
    font-size: 14px;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.reveal {
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

/* Media Queries */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 40px;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image {
        order: -1;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 40px 20px;
        transition: 0.4s;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        margin: 0 0 20px 0;
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 5px 0;
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .values {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}