/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: radial-gradient(circle at top right, #eff6ff 0%, #f8fbff 40%, #ffffff 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Variables CSS para colores */
:root {
    --primary-color: #1E90FF;
    --secondary-color: #2C3E50;
    --accent-color: #FF6B6B;
    --accent-soft: #7c4dff;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --border-color: #E9ECEF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.35s ease;
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
    height: 66px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:focus-visible {
    border-radius: 6px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Sección Hero */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.9), rgba(44, 62, 80, 0.8)), 
                url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2015&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 860px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    line-height: 1.2;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 300;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-soft));
    color: var(--white);
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.35s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
    filter: saturate(110%);
}

/* Secciones generales */
section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Sección Servicios */
.services {
    background: linear-gradient(180deg, #f7faff 0%, #f6f8fc 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.home-cards-carousel,
.services-cards-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-carousel-track-wrap,
.services-carousel-track-wrap {
    width: 100%;
    overflow: hidden;
}

.home-carousel-track,
.services-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s ease;
    will-change: transform;
}

.home-carousel-slide,
.services-carousel-slide {
    flex: 0 0 calc((100% - 48px) / 3);
    min-height: 280px;
}

.home-carousel-btn,
.services-carousel-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-soft));
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, filter 0.25s ease;
    flex-shrink: 0;
}

.home-carousel-btn:hover,
.services-carousel-btn:hover {
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.05);
}

.home-carousel-btn:disabled,
.services-carousel-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.home-carousel-dots,
.services-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.home-carousel-dot,
.services-carousel-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: none;
    background: #cfd6e4;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.home-carousel-dot.active,
.services-carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.service-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(250, 252, 255, 0.9));
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-icon i {
    font-size: 2rem;
    color: var(--white);
}

.service-card h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Sección Portafolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    border: 1px solid rgba(30, 144, 255, 0.08);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.9), rgba(44, 62, 80, 0.9));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    opacity: 0;
    transition: opacity 0.35s ease, backdrop-filter 0.35s ease;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.portfolio-overlay p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.portfolio-btn {
    background: var(--white);
    color: var(--primary-color);
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

/* Sección Testimonios */
.testimonials {
    background: var(--light-gray);
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
}

.testimonial-slide {
    display: none;
    padding: 60px 40px;
    background: var(--white);
    text-align: center;
    box-shadow: var(--shadow);
    border-radius: 15px;
}

.testimonial-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.testimonial-text p {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    font-style: italic;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 5px;
}

.author-info span {
    color: var(--text-light);
    font-size: 0.9rem;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.carousel-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active {
    background: var(--primary-color);
}

/* Sección Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    border: 1px solid rgba(30, 144, 255, 0.08);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 30px;
}

.blog-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.blog-date {
    color: var(--text-light);
}

.blog-category {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-content h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.blog-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.blog-link:hover {
    color: var(--secondary-color);
}

/* Sección Contacto */
.contact {
    background: linear-gradient(180deg, #f7faff 0%, #eef4ff 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(30, 144, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-soft));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.5rem;
    color: var(--white);
}

.contact-details h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-details p {
    color: var(--text-light);
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(30, 144, 255, 0.12);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 144, 255, 0.12);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-soft));
    color: var(--white);
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Sección del Mapa */
.map-section {
    margin-top: 60px;
    text-align: center;
}

.map-section h3 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    font-weight: 600;
}

.map-container {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.map-container:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.map-container iframe {
    width: 100%;
    border-radius: 15px;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.map-container:hover iframe {
    filter: grayscale(0%);
}

.map-info {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    text-align: left;
}

.map-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    font-size: 1rem;
    margin: 0;
}

.map-info i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.map-info strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1f2f46 0%, #1a2640 55%, #17273f 100%);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: var(--white);
}

.footer-section p {
    color: #BDC3C7;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #BDC3C7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-soft));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.social-link.whatsapp {
    background: #25d366;
}

.social-link.whatsapp:hover {
    background: #1ea952;
    color: var(--white);
}

.social-floating {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1200;
}

.social-floating .social-link {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.cv-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff3cd;
    color: #6b4f00;
    border: 1px solid #ffe69c;
    border-radius: 999px;
    padding: 10px 18px;
    margin: 0 auto 24px;
}

.cv-status i {
    color: #c58b00;
}

.cv-viewer {
    background: var(--white);
    border: 2px dashed rgba(30, 144, 255, 0.25);
    border-radius: 16px;
    min-height: 520px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.cv-placeholder {
    text-align: center;
    max-width: 520px;
}

.cv-placeholder i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.cv-placeholder h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.cv-placeholder p {
    color: var(--text-light);
}

.cv-actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.cv-disabled-btn[disabled] {
    opacity: 0.75;
    cursor: not-allowed;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495E;
    color: #BDC3C7;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .home-carousel-slide,
    .services-carousel-slide {
        flex: 0 0 100%;
    }

    .home-cards-carousel,
    .services-cards-carousel {
        gap: 8px;
    }

    .home-carousel-btn,
    .services-carousel-btn {
        width: 38px;
        height: 38px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .map-section {
        margin-top: 40px;
    }

    .map-section h3 {
        font-size: 1.8rem;
    }

    .map-container {
        margin-bottom: 20px;
    }

    .map-info {
        padding: 20px;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .testimonial-slide {
        padding: 40px 20px;
    }

    .testimonial-text p {
        font-size: 1.1rem;
    }

    .testimonial-author {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .service-card,
    .contact-form {
        padding: 30px 20px;
    }

    .home-carousel-btn,
    .services-carousel-btn {
        width: 34px;
        height: 34px;
    }

    .social-floating {
        right: 12px;
        bottom: 12px;
    }

    .testimonial-slide {
        padding: 30px 15px;
    }

    .map-section h3 {
        font-size: 1.5rem;
    }

    .map-info {
        padding: 15px;
    }

    .map-info p {
        font-size: 0.9rem;
    }
}

/* Efectos de scroll suave */
.scroll-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: all 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Brillo decorativo en el hero */
.hero::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 70%);
    top: -120px;
    right: -100px;
    z-index: 1;
    pointer-events: none;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Estilos para elementos enfocados */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mejoras de contraste para mejor legibilidad */
.service-card,
.blog-card,
.portfolio-item,
.testimonial-slide,
.contact-form {
    border: 1px solid var(--border-color);
}

/* Efectos hover mejorados */
.service-card:hover,
.blog-card:hover,
.portfolio-item:hover {
    border-color: var(--primary-color);
}
