:root {
    --primary: #1a2b3c;
    --secondary: #34495e;
    --accent: #e67e22;
    --accent-hover: #d35400;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.2);
    --glass: rgba(255, 255, 255, 0.85);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.bg-light {
    background-color: var(--bg-light);
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
}

header.scrolled {
    background: var(--glass);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

header.scrolled .navbar {
    height: 100px;
}

header.scrolled .logo img {
    height: 80px;
}

.navbar {
    height: 150px;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 130px;
    width: auto;
    display: block;
    transition: var(--transition);
}

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

/* Custom Cursor */
#cursor {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 20000;
    transition: transform 0.1s ease;
}

#cursor-blur {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 19999;
    transition: width 0.3s, height 0.3s, background 0.3s, transform 0.15s ease-out;
}

.cursor-hover #cursor-blur {
    width: 80px;
    height: 80px;
    background: rgba(230, 126, 34, 0.1);
    border-color: transparent;
}

/* Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -5;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.05) 0%, rgba(230, 126, 34, 0) 70%);
    border-radius: 50%;
    filter: blur(80px);
}

.blob-1 {
    top: -10%;
    left: -10%;
    animation: move-blob-1 20s infinite alternate;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    animation: move-blob-2 25s infinite alternate;
}

@keyframes move-blob-1 {
    from { transform: translate(0, 0); }
    to { transform: translate(100px, 100px); }
}

@keyframes move-blob-2 {
    from { transform: translate(0, 0); }
    to { transform: translate(-100px, -100px); }
}

/* Hero Parallax */
.hero {
    overflow: hidden;
}

.parallax-bg {
    transform: scale(1.1);
    transition: transform 0.1s ease-out;
}

/* Split Text */
.split-text span:not(.word-node) {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.split-text.active span:not(.word-node) {
    opacity: 1;
    transform: translateY(0);
}

/* WhatsApp Floating */
#whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    z-index: 10000;
    transition: var(--transition);
    animation: pulse-green 2s infinite;
    display: block;
}

#whatsapp-float img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

#whatsapp-float:hover {
    transform: rotate(10deg) scale(1.1);
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Footer Social */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-link {
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

.social-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(1) invert(1);
    opacity: 0.6;
}

.social-link:hover img {
    filter: none;
    opacity: 1;
}

.social-link:hover {
    transform: translateY(-5px);
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
}

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

/* Hero */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8));
    z-index: -1;
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 1.1rem 2.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn:hover::after {
    width: 300%;
    height: 300%;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    margin-right: 1.5rem;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.5);
}

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

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

/* Nosotros */
.nosotros-main {
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.nosotros-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.mission-vision {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 5rem;
}

.mission-vision h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--accent);
}

.valores-section h3 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.valores-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: center;
}

.valor-item .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.valor-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.valor-item p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Servicios */
.servicios-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.servicio-card .preview-list {
    margin: 1.5rem 0;
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-light);
}

.servicio-card .preview-list li::before {
    content: "✓";
    margin-right: 0.5rem;
    color: var(--accent);
}

.btn-more {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-more:hover {
    background: var(--accent);
    color: var(--white);
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 11000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal.active .modal-overlay {
    opacity: 1;
}

.modal-container {
    background: var(--white);
    width: 90%;
    max-width: 700px;
    padding: 3rem;
    border-radius: 2rem;
    position: relative;
    z-index: 2;
    transform: translateY(50px) scale(0.9);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.modal.active .modal-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

/* Modal Content Styling */
.modal-body h2 {
    color: var(--primary);
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

.modal-detail-item {
    margin-bottom: 2rem;
}

.modal-detail-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.modal-detail-item ul {
    list-style: none;
    padding-left: 1rem;
}

.modal-detail-item ul li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.modal-detail-item ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

body.modal-open {
    overflow: hidden;
}

/* Portafolio */
.portafolio-section {
    margin-top: 4rem;
}

.portafolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 4rem;
}

.portafolio-category h4 {
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--accent);
}

.portafolio-category ul {
    list-style: none;
}

.portafolio-category li {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.portafolio-image-placeholder img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.portafolio-card {
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.portafolio-card .card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.portafolio-card .card-icon stroke {
    stroke-width: 1.5px;
}

.portafolio-card .card-icon svg {
    width: 3rem;
    height: 3rem;
}

.valor-item .icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--accent);
    stroke-width: 1.5px;
}

/* Navbar Visibility Improvement */
header {
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
}

header.scrolled {
    background: var(--glass);
    backdrop-filter: blur(10px);
}

.hero-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%);
}

.galeria {
    position: relative;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('fotos/WhatsApp%20Image%202026-03-19%20at%2020.19.16%20(1).jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.galeria .section-header h2,
.galeria .section-header p {
    color: var(--white);
}

.portafolio-card h4 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.portafolio-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.mission-card, .vision-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mission-card p, .vision-card p {
    margin-bottom: 1.5rem;
}

/* Galería & Carousel */
.carousel-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0 4rem;
}

.carousel {
    overflow: hidden;
    width: 100%;
    border-radius: 2rem;
    box-shadow: var(--shadow);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.carousel-item {
    flex: 0 0 calc(33.333% - 1rem);
    aspect-ratio: 16/10;
    border-radius: 1.5rem;
    overflow: hidden;
    background: var(--bg-light);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.carousel-item:hover {
    transform: scale(1.03) translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.carousel-item:hover img {
    transform: scale(1.1);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    cursor: pointer;
    color: var(--primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.carousel-btn:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

@media screen and (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media screen and (max-width: 600px) {
    .carousel-container {
        padding: 0 1rem;
    }
    .carousel-item {
        flex: 0 0 100%;
    }
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Contacto */
.contacto-wrapper {
    grid-template-columns: 1fr 2fr;
}

.contacto-info .info-item {
    margin-bottom: 2rem;
}

.contacto-info h4 {
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.contacto-form .form-group {
    margin-bottom: 1.5rem;
}

.contacto-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contacto-form input, 
.contacto-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

/* Footer */
.footer {
    padding: 3rem 0;
    background: var(--primary);
    color: var(--white);
    text-align: center;
}

.footer p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 2px;
    background-color: var(--primary);
    margin: 5px;
    transition: var(--transition);
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .contacto-wrapper {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 100vh;
        top: 0;
        padding-top: 80px;
        background-color: var(--white);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: -1;
    }
    
    .nav-links li {
        margin: 2rem 0;
    }
    
    .burger {
        display: block;
    }

    .nav-active {
        transform: translateX(0%);
    }

    .mission-vision {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .section-padding {
        padding: 4rem 0;
    }

    .logo img {
        height: 80px;
    }
    
    .navbar {
        height: 110px;
    }
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-content {
    text-align: center;
}

.loader-logo img {
    height: 260px;
    width: auto;
    display: block;
    margin: 0 auto 1.5rem;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    border-radius: 2px;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: loading 2s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    50% { left: 0; }
    100% { left: 100%; }
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--accent);
    z-index: 10001;
    transition: width 0.1s ease;
}

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent-hover);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delay */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Pulse animation for important elements */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.portafolio-category ul li:hover {
    color: var(--accent);
    padding-left: 1rem;
    transition: var(--transition);
}

.navbar .nav-links a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

/* Footer Logo */
.footer-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.footer-banner {
    height: 80px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: var(--transition);
}

.footer-banner:hover {
    opacity: 1;
    transform: scale(1.05);
}
