/* ==========================================================================
   Jizasoft Material Enterprise (Google Cloud Style)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&family=Google+Sans:wght@400;500;700&display=swap');

:root {
    /* Premium Monochrome Palette (Anthropic/Linear style) */
    --bg-main: #FAFAFA; /* Off-white, very gentle */
    --bg-surface: #FFFFFF; /* Pure white cards */
    
    --text-primary: #111111; /* Almost black */
    --text-secondary: #666666; /* Elegant gray */
    
    --border-color: #EAEAEA; /* Very soft border */
    
    --color-primary: #0A0A0A; /* Obsidian Black */
    --color-primary-hover: #222222;
    
    --color-success: #1e8e3e;
    --color-warning: #f29900;
    --color-danger: #d93025;
    
    --font-heading: 'Google Sans', 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    
    /* Ultra soft Stripe-like shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0,0,0,0.03);
    
    --transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   BRAND I-DOT COLORING HACK
   ========================================================================== */
.dot-red {
    background: linear-gradient(to bottom, #e63946 0%, #e63946 32%, #ffffff 32%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.dot-yellow {
    background: linear-gradient(to bottom, #fbbc04 0%, #fbbc04 32%, #ffffff 32%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   1. LAYOUT & TYPOGRAPHY
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }

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

.section-padding { padding: 4rem 0; }
.bg-white { background-color: var(--bg-surface); }

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 500; color: var(--text-primary); }

.title-hero { font-size: 2.75rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 1rem; color: var(--bg-surface); }
.title-section { font-size: 2rem; margin-bottom: 2rem; text-align: center; }

.text-lead { font-size: 1.125rem; color: var(--bg-surface); opacity: 0.9; font-weight: 400; }
.text-lead-dark { font-size: 1.125rem; color: var(--text-secondary); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    font-family: var(--font-heading);
    letter-spacing: 0.25px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    color: #fff;
}

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--color-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: #f1f3f4;
    border-color: #d1d3d4;
    transform: translateY(-2px);
}

/* ==========================================================================
   Top Utility Bar (Enterprise Style)
   ========================================================================== */
.top-bar {
    background-color: #050505;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    height: 36px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.top-bar-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.top-bar-left span { font-weight: 400; letter-spacing: 0.3px; }
.top-bar-right { display: flex; gap: 1.5rem; align-items: center; }
.top-bar-right a { color: rgba(255, 255, 255, 0.7); display: flex; align-items: center; gap: 0.35rem; transition: color 0.2s; }
.top-bar-right a:hover { color: #ffffff; }

/* ==========================================================================
   Header & Dropdown
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: none;
    height: 64px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.05) 0%, 
        rgba(255,255,255,0.8) 25%, 
        rgba(255,255,255,0.05) 50%, 
        rgba(255,255,255,0.8) 75%, 
        rgba(255,255,255,0.05) 100%
    );
    background-size: 200% 100%;
    animation: shineLine 4s linear infinite;
}

@keyframes shineLine {
    0% { background-position: 200% 0; }
    100% { background-position: 0% 0; }
}

.header.scrolled {
    height: 56px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

.logo { display: flex; align-items: center; position: relative; }
.logo img { 
    transition: opacity 0.4s ease, visibility 0.4s ease; 
}
.logo .logo-full { height: 24px; opacity: 1; visibility: visible; }
.logo .logo-mini { 
    height: 32px; 
    position: absolute; 
    left: 0; 
    top: 50%; 
    transform: translateY(-50%); 
    opacity: 0; 
    visibility: hidden; 
}



.navmenu { display: flex; align-items: center; }
.navmenu > ul { display: flex; gap: 1.5rem; margin: 0; align-items: center; height: 100%; }
.navmenu a { font-size: 0.875rem; font-weight: 500; padding: 0.5rem 0; display: flex; align-items: center; gap: 0.25rem; }
.navmenu > ul > li > a { color: rgba(255, 255, 255, 0.75); }
.navmenu > ul > li > a:hover { color: #ffffff; }

/* Dropdown CSS */
.dropdown { position: relative; }
.dropdown > a { cursor: pointer; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    min-width: 260px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1001;
}
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li a {
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.1s;
}
.dropdown-menu li a:hover {
    background-color: #f1f3f4;
    color: var(--color-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    background-color: var(--color-primary); /* Google Blue background for Hero */
    padding: 6rem 0;
    color: white;
}

.hero-content {
    max-width: 800px;
}

/* ==========================================================================
   Services Grid (Material Cards)
   ========================================================================== */
.gc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gc-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.gc-card:hover {
    box-shadow: var(--shadow-hover);
}

.gc-icon {
    font-size: 1.75rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.gc-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.gc-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.gc-link {
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
}
.gc-link:hover { text-decoration: underline; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    font-size: 0.875rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h4 { color: var(--text-primary); margin-bottom: 1rem; font-weight: 500; }
.footer ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--color-primary); }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

/* ==========================================================================
   LEGACY BOOTSTRAP POLYFILL (Fixes inner pages: Contacto, Proyectos, etc.)
   ========================================================================== */
.row { display: flex; flex-wrap: wrap; margin: -0.75rem; }
.row > * { padding: 0.75rem; }
.col-md-6 { width: 50%; }
.col-lg-8 { width: 66.666%; margin: 0 auto; } /* Centered typical col-8 */
.col-md-12 { width: 100%; }

.justify-content-center { justify-content: center; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.p-4 { padding: 1.5rem; }

/* Contact Forms / Legacy Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.shadow-sm { box-shadow: var(--shadow-sm); }

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    transition: border-color 0.2s;
    background: var(--bg-surface);
}
.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}

.btn-success {
    background-color: var(--color-success);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-success:hover { background-color: #188038; }

.page-title { padding: 4rem 0 2rem; background: var(--bg-main); border-bottom: 1px solid var(--border-color); }
.page-title h1 { font-size: 2.25rem; font-weight: 400; margin-bottom: 1rem; color: var(--text-primary); }

@media (max-width: 768px) {
    .navmenu ul { display: none; } /* Simplified mobile for now */
    .footer-grid { grid-template-columns: 1fr; }
    .col-md-6, .col-lg-8 { width: 100%; }
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS (Dynamic Feel)
   ========================================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-fade {
    opacity: 0;
    transition: all 1s ease;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-fade.is-visible {
    opacity: 1;
}

/* Staggered delays for children if needed */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ==========================================================================
   STICKY SCROLL SECTION (Process)
   ========================================================================== */
.sticky-section {
    position: relative;
    background-color: var(--bg-main);
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}
.sticky-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}
.sticky-sidebar {
    position: sticky;
    top: 140px; /* Offset from header to pin in the middle of screen */
    width: 40%;
    padding-right: 3rem;
}
.sticky-content {
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 12vh; /* Reduced gap so cards are closer together */
    padding-bottom: 20vh; /* space at the bottom */
}
.process-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem;
    box-shadow: var(--shadow-hover);
    position: relative;
}
.process-number {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .sticky-sidebar {
        position: relative;
        top: 0;
        width: 100%;
        margin-bottom: 4rem;
        padding-right: 0;
    }
    .sticky-content {
        width: 100%;
        gap: 3rem;
        padding-bottom: 2rem;
}
}

/* ==========================================================================
   MODAL (Client Portal Login)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal-content {
    background: var(--bg-surface);
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    padding: 2.5rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
}
.modal-close:hover {
    color: var(--text-primary);
}
.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}
.modal-header img {
    height: 32px;
    margin-bottom: 1rem;
}
.modal-header h3 {
    margin-bottom: 0.5rem;
}
.modal-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

