/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Header */
header {
    background: #001f54;
    color: white;
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    max-width: 280px;
    height: auto;
    z-index: 1001;
}

.logo img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    display: block;
}

.nav-back {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s;
}

.nav-back:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero-service {
    background: linear-gradient(135deg, rgba(0, 31, 84, 0.95) 0%, rgba(10, 17, 40, 0.95) 100%),
                url('https://images.unsplash.com/photo-1556912173-3bb406ef7e77?w=1920') center/cover;
    color: white;
    padding: 180px 2rem 120px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-service h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    max-width: 900px;
    line-height: 1.2;
}

.hero-service p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-button {
    display: inline-block;
    background: #fefcfb;
    color: #001f54;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    text-align: center;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    background-color: #e6f2ff;
}

.cta-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Sections */
.section {
    padding: 100px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-alt {
    background: linear-gradient(135deg, #f8f9fa 0%, #e6f2ff 100%);
    padding: 100px 0;
    width: 100%;
}

.section-title {
    font-size: 2.8rem;
    color: #001f54;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: #1282a2;
    border-radius: 2px;
}

.section-intro {
    font-size: 1.2rem;
    color: rgba(10, 17, 40, 0.8);
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    line-height: 1.8;
}

/* Services Grid */
.services-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 90px;
    height: 90px;
    background: rgba(18, 130, 162, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    transition: transform 0.3s, background-color 0.3s;
}

.service-icon svg {
    color: #1282a2;
    stroke-width: 1.5;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    background: rgba(18, 130, 162, 0.2);
}

.service-card h3 {
    color: #001f54;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Benefits */
.benefits-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.benefit-item {
    display: flex;
    gap: 1.5rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 2rem;
    color: #1282a2;
    min-width: 50px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon svg {
    color: #1282a2;
    stroke-width: 1.5;
}

.benefit-content h3 {
    color: #001f54;
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.benefit-content p {
    color: #666;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Projects Carousel */
.projects-section {
    background: #fff;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.projects-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.projects-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
    padding: 1rem 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.projects-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.project-slide {
    min-width: 100%;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: flex-end;
}

.project-content {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2.5rem;
    width: 100%;
}

.project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.project-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-size: 1.1rem;
}

.project-details {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.project-details span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #001f54;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.carousel-button:hover {
    background: #001f54;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-button.prev {
    left: 2rem;
}

.carousel-button.next {
    right: 2rem;
}

.project-dots {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.8rem;
}

.project-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d9e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-dot.active {
    background: #001f54;
    transform: scale(1.2);
}

/* Nuestro Trabajo */
.our-work-section {
    padding: 4rem 0;
    background-color: #f9f9f9;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.work-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 250px;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.work-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    position: relative;
}

.work-item:hover .work-image {
    transform: scale(1.05);
}

.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 31, 84, 0.9));
    color: white;
    padding: 1.5rem;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.work-item:hover .work-overlay {
    background: rgba(0, 31, 84, 0.95);
}

.work-overlay h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: white;
}

.work-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* Responsive para la cuadrícula */
@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .work-item {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
    
    .work-item {
        height: 200px;
    }
    
    .work-overlay {
        padding: 1rem;
    }
    
    .work-overlay h3 {
        font-size: 1.1rem;
    }
    
    .work-overlay p {
        font-size: 0.85rem;
    }
}

/* Testimonial Section */
.testimonial-section {
    background: linear-gradient(135deg, #001f54 0%, #0a1128 100%);
    padding: 100px 0;
    color: white;
}

.testimonial {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.testimonial-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 3rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-content p {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    position: relative;
    font-style: italic;
}

.testimonial-content p::before,
.testimonial-content p::after {
    content: '"';
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.2);
    position: absolute;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-content p::before {
    top: -20px;
    left: -15px;
}

.testimonial-content p::after {
    bottom: -40px;
    right: -15px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.author-info h4 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    color: white;
}

.author-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Contact Form */
#contacto.section {
    padding: 60px 2rem;
}

#contacto .section-title {
    margin-bottom: 1.5rem;
}

#contacto .section-intro {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 700px;
}

.contact-form-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e1e5ee;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #1282a2;
    box-shadow: 0 0 0 2px rgba(18, 130, 162, 0.1);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form button[type="submit"] {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    width: auto;
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    cursor: pointer;
    justify-self: center;
    border-radius: 6px;
}

/* Footer */
footer {
    background: #001f54;
    color: white;
    padding: 5rem 2rem 2rem;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-section .logo {
    max-width: 200px;
    margin-bottom: 1.5rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inline-icon {
    width: 18px;
    height: 18px;
    color: #1282a2;
    flex-shrink: 0;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #1282a2;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-service h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-service {
        padding: 160px 1.5rem 100px;
    }
    
    .hero-service h1 {
        font-size: 2.5rem;
    }
    
    .hero-service p {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 80px 1.5rem;
    }
    
    .section-alt {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .carousel-button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .carousel-button.prev {
        left: 1rem;
    }
    
    .carousel-button.next {
        right: 1rem;
    }
}

@media (max-width: 576px) {
    .logo {
        max-width: 200px;
    }
    
    .hero-service h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-button {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .testimonial-content {
        padding: 2rem 1.5rem;
    }
    
    .testimonial-content p {
        font-size: 1.1rem;
    }
    
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-slide {
        height: 400px;
    }
}

/* Asegurar que el contenido no quede oculto detrás del header fijo */
.section:first-of-type {
    padding-top: 120px;
}

/* Estilos para el formulario de contacto */
#contactForm .form-group {
    position: relative;
}

#contactForm label {
    position: absolute;
    left: 15px;
    top: 15px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
    background: #f8fafc;
    padding: 0 5px;
    font-size: 0.9rem;
}

#contactForm input:focus + label,
#contactForm textarea:focus + label,
#contactForm input:not(:placeholder-shown) + label,
#contactForm textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    color: #1282a2;
    background: white;
    padding: 0 8px;
}

/* Estilos para el select personalizado */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

/* Ajustes para el select */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 40px !important;
    cursor: pointer;
}

/* Estilos para el mensaje de éxito del formulario */
.form-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    text-align: center;
    display: none;
}

/* Estilos para el mensaje de error del formulario */
.form-error {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    text-align: center;
    display: none;
}

/* Estilos para el contenedor del botón de contacto */
.contact-button-container {
    text-align: center;
    padding: 2rem 0;
}

.contact-button-large {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 31, 84, 0.2);
}

.contact-button-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 31, 84, 0.3);
}

.contact-button-large i {
    flex-shrink: 0;
}

.contact-note {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #666;
}

.contact-note strong {
    color: #001f54;
}