/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Bootstrap-like Palette */
  --bs-blue: #0d6efd;
  --bs-indigo: #6610f2;
  --bs-gray: #6c757d;
  --bs-gray-dark: #343a40;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
  --bs-white: #fff;
  
  /* Theme Variables */
  --primary: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary: #6c757d;
  --success: #198754;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #212529;

  --bg-body: #ffffff;
  --bg-sec: #f8f9fa;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  
  --text-main: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;

  --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
  --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);

  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-width: 260px;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; color: var(--text-main); margin-bottom: 0.5rem; }
h1 { font-size: 3rem; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; text-align: center; }
h3 { font-size: 1.5rem; }
p { color: var(--text-muted); margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

/* Layout */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* Header & Nav */
header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
header .container {
    padding-top: 1rem; padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand { font-size: 1.5rem; font-weight: 700; color: var(--text-main); text-decoration: none; }
.brand span { color: var(--primary); }

/* Logo */
.logo {
    max-width: 350px;
    height: auto;
    display: block;
    margin: 0 auto;
}

nav { display: flex; align-items: center; gap: 2rem; }
.nav-link { color: var(--text-main); font-weight: 500; font-size: 1rem; transition: color 0.2s; }
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary); font-weight: 600; }

.btn-cta {
    background-color: var(--primary);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.btn-cta:hover { background-color: var(--primary-hover); color: #fff; }

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1rem;
    background-color: #212529;
    background: linear-gradient(rgba(33, 37, 41, 0.85), rgba(33, 37, 41, 0.9)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero h1 { color: #fff; }
.hero p { font-size: 1.25rem; max-width: 700px; margin: 0 auto 2.5rem; line-height: 1.5; color: #dee2e6; }

.section-title { margin-bottom: 3rem; text-align: center; }
.section-title p { max-width: 600px; margin: 0 auto; }

/* Services Section */
.section-padding { padding: 5rem 0; }
.bg-sec { background-color: var(--bg-sec); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.service-card {
    background: #fff;
    padding: 0;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease-in-out;
    overflow: hidden;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.service-card-body {
    padding: 2rem;
}
.service-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.service-icon { 
    font-size: 2rem; margin-bottom: 1.5rem; color: var(--primary); 
    background: #e7f1ff; width: 64px; height: 64px; 
    display: flex; align-items: center; justify-content: center; border-radius: 0.375rem;
}

/* Grid System */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

/* Generic Card */
.card {
    background: #fff;
    padding: 2rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
}

/* Cards */
.product-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.product-img-placeholder {
    height: 200px;
    background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
    color: #ccc; font-size: 4rem;
}

.product-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.product-cat { font-size: 0.75rem; color: #888; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.product-title { font-size: 1.1rem; margin-bottom: 0.5rem; color: #111; font-weight: 600; line-height: 1.4; }
.product-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-grow: 1; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; border-top: 1px solid var(--border-color); padding-top: 1rem; }
.product-price { color: #111; font-weight: 800; font-size: 1.4rem; }

/* Buttons */
.btn {
    display: inline-block;
    background-color: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 1rem;
    text-decoration: none;
}
.btn:hover { background-color: #e9ecef; border-color: #dee2e6; transform: translateY(-1px); }

.btn-primary { background-color: var(--primary); color: #fff; border: 1px solid var(--primary); }
.btn-primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }

.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background-color: var(--primary); color: #fff; }

/* Hero specific buttons */
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover { background: #fff; color: #000; }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* CTA Section */
.cta-section {
    background: var(--bg-sec);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* Forms */
label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text-main); font-size: 0.9rem; }
input, textarea, select { 
    width: 100%; 
    padding: 0.375rem 0.75rem; 
    background-color: #fff; 
    border: 1px solid var(--border-color); 
    border-radius: 0.375rem; 
    color: var(--text-main); 
    font-family: inherit; 
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { 
    outline: none;
    border-color: #86b7fe; 
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); 
}

/* Tables (Admin) */
.table-container { overflow-x: auto; border-radius: 0.5rem; border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 1rem; border-bottom: 1px solid var(--border-color); }
th { background-color: #f8f9fa; font-weight: 600; color: var(--text-main); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background-color: rgba(0,0,0,0.02); }

/* Admin Layout (Sidebar) */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: var(--sidebar-width);
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}
.admin-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    background-color: #f8f9fa;
}
.sidebar-nav { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-link { color: var(--text-muted); padding: 0.75rem; border-radius: 0.5rem; transition: all 0.2s; }
.sidebar-link:hover, .sidebar-link.active { background-color: var(--primary); color: #fff; font-weight: 500; }

/* Utilities */
.flex { display: flex; gap: 1rem; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 2fr; } }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.badge { padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; background: var(--bg-input); color: var(--text-muted); }

/* Footer */
footer {
    background-color: #212529;
    color: #adb5bd;
    border-top: none;
    padding: 4rem 0 2rem;
    margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-col h4 { margin-bottom: 1.5rem; color: #ffffff; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #adb5bd; font-size: 0.95rem; }
.footer-links a:hover { color: #ffffff; }
.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #343a40;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Modal Styles */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    z-index: 1000; align-items: center; justify-content: center;
}
.modal-content {
    background: #fff; border: none;
    padding: 2.5rem; border-radius: 16px; max-width: 500px; width: 90%;
    position: relative; text-align: center; box-shadow: var(--shadow-lg);
}
.close-modal {
    position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; cursor: pointer; color: var(--text-muted);
}
.close-modal:hover { color: #fff; }
.modal-icon { font-size: 4rem; margin-bottom: 1rem; }

/* Stats Bar (Nuevo) */
.stats-bar {
    width: 100%;
    border-bottom: none;
    background: var(--primary);
    padding: 1.5rem 0;
    border-top: none;
    border-bottom: none;
}
.stat-item { text-align: center; color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.stat-item strong { display: block; font-size: 1.5rem; color: #fff; margin-bottom: 0.25rem; }

/* Clients Section */
.clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}
.client-logo {
    max-width: 160px;
    height: auto;
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.4s ease;
    cursor: pointer;
}
.client-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 2fr; } }
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.badge { padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; background: var(--bg-input); color: var(--text-muted); }

/* Footer */
footer {
    background-color: #000;
    color: var(--color-text-muted);
    border-top: 1px solid var(--border-soft);
    background-color: #212529;
    color: #adb5bd;
    border-top: none;
    padding: 4rem 0 2rem;
    margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-col h4 { margin-bottom: 1.5rem; color: #ffffff; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: var(--color-text-muted); font-size: 0.95rem; }
.footer-links a { color: #adb5bd; font-size: 0.95rem; }
.footer-links a:hover { color: #ffffff; }
.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-soft);
    color: var(--color-text-muted);
    border-top: 1px solid #343a40;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Modal Styles */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    z-index: 1000; align-items: center; justify-content: center;
}
.modal-content {
    background: #fff; border: none;
    padding: 2.5rem; border-radius: 16px; max-width: 500px; width: 90%;
    position: relative; text-align: center; box-shadow: var(--shadow-lg);
}
.close-modal {
    position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; cursor: pointer; color: var(--text-muted);
}
.close-modal:hover { color: #fff; }
.modal-icon { font-size: 4rem; margin-bottom: 1rem; }

/* Stats Bar (Nuevo) */
.stats-bar {
    width: 100%;
    border-bottom: none;
    background: #000;
    background: var(--primary);
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    border-top: none;
    border-bottom: none;
}
.stat-item { text-align: center; color: var(--color-text-muted); font-size: 0.9rem; }
.stat-item { text-align: center; color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.stat-item strong { display: block; font-size: 1.5rem; color: #fff; margin-bottom: 0.25rem; }

/* Clients Section */
.clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}
.client-logo {
    max-width: 160px;
    height: auto;
    filter: grayscale(100%) opacity(0.4);
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.4s ease;
    cursor: pointer;
}
.client-logo:hover {
    filter: grayscale(0%) opacity(1) drop-shadow(0 0 8px var(--color-primary));
    transform: scale(1.1);
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Methodology Steps */
.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.step-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}