/* =========================================
   1. RESET & VARIABLES
   ========================================= */
   :root {
    --color-bg: #0A0F1F;       /* Deep Navy Background */
    --color-bg-light: #111a33; /* Slightly lighter for cards */
    --color-azur: #0A89FF;     /* Main Brand Color */
    --color-azur-dark: #0060cb;
    --color-text: #E0E6ED;     /* Off-white text */
    --color-text-muted: #94A3B8;
    --font-main: 'Inter', sans-serif;
    --transition-speed: 0.3s;
    --header-height: 80px;
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition-speed); }
ul { list-style: none; }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. TYPOGRAPHY & BUTTONS
   ========================================= */
h1, h2, h3, h4 {
    color: #fff;
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-speed) ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--color-azur);
    color: #fff;
    box-shadow: 0 4px 15px rgba(10, 137, 255, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-azur-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 137, 255, 0.4);
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.8rem;
    background: transparent;
    border: 1px solid var(--color-azur);
    color: var(--color-azur);
    margin-top: 15px;
}

.btn-small:hover {
    background: var(--color-azur);
    color: white;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

/* =========================================
   3. HEADER & ANIMATION
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: background-color 0.8s ease, backdrop-filter 0.8s ease; /* Matched duration */
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Logo left, Nav right (or center if nav grows) */
    width: 100%;
    position: relative;
    height: 100%;
    transition: all 0.8s cubic-bezier(0.25, 0.1, 0.25, 1); /* Slower and smoother easing */
}

.header-logo-link {
    display: flex;
    align-items: center;
}

.header-logo-link img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.header-logo-link:hover img {
    transform: scale(1.05);
}

.main-nav {
    /* Removed width: 100% and justify-content: center to allow space-between to work */
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    gap: 40px;
    padding: 0;
    margin: 0;
}

.main-nav a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: monospace; /* Font matched to subtitle */
}

.main-nav a:hover {
    color: var(--color-azur);
}

/* Scrolled State */
header.scrolled {
    background-color: rgba(10, 15, 31, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

/* On scroll, we apply the background effect smoothly */
/* Removed the justify-content change to prevent the "jump" */
header.scrolled .header-content {
    /* No layout change, just background transition from parent */
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    /* Deep Navy Background matching image */
    background-color: #050A14; 
    background-image: radial-gradient(circle at 50% 50%, #0A1529 0%, #050A14 100%);
    padding-top: var(--header-height);
    overflow: hidden; /* Essential to cut off the large circles */
}

/* --- Hero Background Decorations --- */
.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Allows clicking through them */
    z-index: 1;
    overflow: hidden;
}

/* Large Arcs (Based on reference) */
.hero-arc {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08); /* Subtle line */
}

/* Top Right Arc System */
.arc-top-right {
    width: 900px; /* Reduced from 1200px */
    height: 900px; 
    top: -450px;  
    right: -250px; 
    border-width: 1px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2); /* Much softer shadow */
    opacity: 0.8;
}

.arc-top-right::after {
    content: '';
    position: absolute;
    top: 50px; left: 50px; right: 50px; bottom: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.03); /* Very subtle inner line */
}

/* Bottom Left Arc */
.arc-bottom-left {
    width: 600px; /* Reduced from 800px */
    height: 600px;
    bottom: -300px;
    left: -200px;
    border-color: rgba(255, 255, 255, 0.04);
}

/* Separator Line */
.hero-separator {
    width: 100%;
    max-width: 600px; /* Matches the text width roughly */
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0) 100%);
    margin: 30px auto;
}

/* Floating Dots with Animation */
.hero-dot {
    position: absolute;
    border-radius: 50%;
    background-color: #1a2c4e;
    animation: floatDots 6s ease-in-out infinite; /* Floating effect */
}

@keyframes floatDots {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.dot-1 {
    width: 8px; height: 8px;
    top: 25%; left: 20%;
    background-color: #162440;
    animation-delay: 0s;
}

.dot-2 {
    width: 12px; height: 12px;
    top: 35%; right: 20%;
    background-color: #12203a;
    animation-delay: 2s;
}

.dot-3 {
    width: 6px; height: 6px;
    bottom: 30%; left: 30%;
    background-color: #0A89FF;
    opacity: 0.4;
    box-shadow: 0 0 10px rgba(10, 137, 255, 0.4);
    animation-delay: 4s;
}

.dot-4 {
    width: 4px; height: 4px;
    top: 15%; right: 35%;
    opacity: 0.3;
    animation-delay: 1s;
}

.hero-content {
    /* Ensure content is centered even if container width is wide */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px; /* Limit width to prevent text stretching */
    margin: 0 auto;
    position: relative;
    z-index: 2; /* Content sits above decorations */
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, var(--color-azur));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-azur);
    margin-bottom: 3rem;
    font-family: monospace;
    opacity: 0.8;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--color-azur);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: #fff;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollMouse 1.5s infinite;
}

@keyframes scrollMouse {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* =========================================
   5. SERVICES (FLIP CARDS)
   ========================================= */
.services {
    padding: 100px 0;
    background-color: var(--color-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h3 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--color-azur);
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    perspective: 1000px; /* Essential for 3D flip */
}

/* Card Container */
.service-card {
    background-color: transparent;
    height: 350px;
    cursor: pointer;
}

/* Inner wrapper for 3D effect */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

/* JS toggle class */
.service-card.active .card-inner {
    transform: rotateY(180deg);
}

/* Front and Back common styles */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
}

/* Front Style */
.card-front {
    background-color: var(--color-bg-light);
}

.card-front:hover {
    border-color: var(--color-azur);
}

.card-front h4 {
    margin-top: 20px;
    font-size: 1.5rem;
}

.card-preview {
    color: var(--color-text-muted);
    margin-top: 10px;
    font-size: 0.9rem;
}

.click-instruction {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--color-azur);
    opacity: 0.7;
}

/* Back Style */
.card-back {
    background-color: var(--color-bg-light);
    transform: rotateY(180deg);
    border: 1px solid var(--color-azur);
    background: linear-gradient(135deg, var(--color-bg-light) 0%, #0e162b 100%);
}

.card-back p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

/* ---------------- CSS ICONS ---------------- */
.icon-container {
    width: 80px;
    height: 80px;
    position: relative;
    margin-bottom: 15px;
}

/* Icon: Gear (Automation) */
.icon-gear {
    width: 50px;
    height: 50px;
    border: 4px dashed var(--color-azur);
    border-radius: 50%;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 10s linear infinite;
}
.gear-core {
    width: 20px; height: 20px;
    background-color: var(--color-azur);
    border-radius: 50%;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }

/* Icon: Chart (Analytics) */
.icon-chart {
    width: 50px; height: 50px;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
.bar { width: 10px; background-color: var(--color-azur); border-radius: 2px; }
.b1 { height: 40%; animation: grow 2s infinite alternate; }
.b2 { height: 70%; animation: grow 2.2s infinite alternate-reverse; }
.b3 { height: 100%; animation: grow 1.8s infinite alternate; }

@keyframes grow { from { opacity: 0.5; transform: scaleY(0.9); } to { opacity: 1; transform: scaleY(1); } }

/* Icon: Shield (Security) */
.icon-shield {
    width: 50px; height: 60px;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.shield-body {
    width: 100%; height: 100%;
    background-color: transparent;
    border: 3px solid var(--color-azur);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    position: relative;
    overflow: hidden;
}
.shield-glare {
    width: 150%; height: 20px;
    background: rgba(255,255,255,0.1);
    transform: rotate(45deg);
    position: absolute;
    top: 10px; left: -20px;
}

/* =========================================
   6. CONTACT SECTION
   ========================================= */
.contact {
    padding: 100px 0;
    background-color: #0d1224; /* Slightly different tone */
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    color: var(--color-azur);
}

.css-dot {
    width: 10px; height: 10px;
    background-color: var(--color-azur);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-azur);
}

/* Form Styles */
.contact-form {
    background-color: var(--color-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(10, 137, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #050810;
    border: 1px solid #1f2a48;
    color: white;
    border-radius: 6px;
    font-family: var(--font-main);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-azur);
}

.form-group textarea {
    resize: none; /* Impide que el usuario redimensione el campo */
}

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    padding: 40px 0;
    border-top: 1px solid #1f2a48;
    background-color: var(--color-bg);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.footer-links {
    font-size: 0.85rem;
    color: #556279;
}
/* =========================================
   8. WHATSAPP FLOAT
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--color-azur); /* Corporate Blue */
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform 0.3s, background-color 0.3s;
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(10, 137, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(10, 137, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(10, 137, 255, 0);
    }
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: var(--color-azur-dark);
    animation: none; /* Stops pulsing on hover */
}

/* (Previous CSS icon styles removed) */

/* =========================================
   9. RESPONSIVE QUERIES
   ========================================= */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr; /* Stack columns on tablet/mobile */
        max-width: 500px;
        margin: 0 auto;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .hero h1 { 
        font-size: 2.5rem; 
        line-height: 1.2;
    }

    .hero h2 {
        font-size: 1.2rem; /* Significantly smaller to maintain hierarchy */
        margin-bottom: 1.5rem;
    }
    
    .header-content {
        justify-content: space-between; /* Always space between on mobile */
    }

    /* Reduce Hero Decorations on Mobile */
    .arc-top-right {
        width: 400px;
        height: 400px;
        top: -200px;
        right: -150px;
        opacity: 0.5;
    }

    .arc-bottom-left {
        width: 300px;
        height: 300px;
        bottom: -150px;
        left: -100px;
    }

    /* Make floating dots smaller and less intrusive on mobile */
    .hero-dot {
        transform: scale(0.6); /* Scale down to 60% */
    }
    
    .dot-1 { top: 15%; left: 10%; }
    .dot-2 { top: 25%; right: 10%; }
    /* Hide some dots if too crowded */
    .dot-3 { display: none; }
}

.form-status {
    text-align: center;
}
