/* ==========================================================================
   Agencia MG - Diseño Profesional Corporativo
   ========================================================================== */

/* ========== VARIABLES CSS ========== */
:root {
    /* Colores Corporativos Profesionales */
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --secondary: #34a853;
    --accent: #fbbc04;
    --danger: #ea4335;
    
    /* Neutros */
    --gray-900: #202124;
    --gray-800: #3c4043;
    --gray-700: #5f6368;
    --gray-600: #80868b;
    --gray-500: #9aa0a6;
    --gray-400: #bdc1c6;
    --gray-300: #dadce0;
    --gray-200: #e8eaed;
    --gray-100: #f1f3f4;
    --gray-50: #f8f9fa;
    --white: #ffffff;
    
    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px rgba(60,64,67,.15);
    --shadow-sm: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px rgba(60,64,67,.15);
    --shadow-md: 0 2px 6px rgba(60,64,67,.3), 0 8px 16px rgba(60,64,67,.15);
    --shadow-lg: 0 4px 12px rgba(60,64,67,.3), 0 16px 24px rgba(60,64,67,.15);
    
    /* Otros */
    --radius: 8px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========== RESET ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--gray-900);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== TIPOGRAFÍA ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 3rem; margin-bottom: 1.5rem; }
h2 { font-size: 2.25rem; margin-bottom: 1rem; }
h3 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.375rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--gray-700); }
.lead { font-size: 1.25rem; line-height: 1.6; }

/* ========== BOTONES ========== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.125rem;
}

/* ========== HEADER ========== */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-xs);
}

.navbar {
    padding: 16px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--gray-900);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
}

.badge-partner {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.nav-menu a {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
    background: var(--gray-100);
}

.mobile-menu-btn {
    display: none;
}

/* ========== HERO SECTION MEJORADO ========== */
.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    top: -200px;
    right: -100px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #34a853, #5bb974);
    bottom: -150px;
    left: -100px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #fbbc04, #fdd663);
    top: 40%;
    right: 10%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(26,115,232,0.1), rgba(66,133,244,0.1));
    border: 1px solid rgba(26,115,232,0.2);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-badge-top svg {
    color: var(--primary);
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.highlight-text {
    color: var(--primary);
    position: relative;
}

.hero-subtitle {
    font-size: 1.375rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin-bottom: 2.5rem;
    max-width: 580px;
}

.hero-stats-inline {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 2.5rem;
    padding: 20px 0;
}

.stat-inline {
    display: flex;
    flex-direction: column;
}

.stat-inline strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-inline span {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--gray-300);
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 3rem;
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(26,115,232,0.3);
}

.btn-hero-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,115,232,0.4);
}

.btn-hero-secondary {
    background: transparent;
    color: var(--gray-900);
    border: 2px solid var(--gray-300);
}

.btn-hero-secondary:hover {
    background: var(--gray-900);
    color: var(--white);
    border-color: var(--gray-900);
}

.hero-trust {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trust-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
    margin: 0;
}

.trust-logos {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.company-logo {
    opacity: 0.7;
    transition: opacity 0.3s ease;
    filter: grayscale(100%);
}

.company-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.trust-more {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
    padding: 6px 16px;
    background: var(--gray-100);
    border-radius: 20px;
}

/* Hero Visual Cards */
.hero-visual {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    position: relative;
}

.visual-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.visual-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-1 {
    animation: float 3s ease-in-out infinite;
}

.card-2 {
    animation: float 3s ease-in-out 0.5s infinite;
}

.card-3 {
    animation: float 3s ease-in-out 1s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--gray-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 8px;
}

.card-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.card-trend svg {
    color: var(--secondary);
}

/* ========== SECTIONS ========== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--gray-600);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 3rem;
}

/* ========== SERVICES GRID ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.service-icon {
    width: 72px;
    height: 72px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.service-link:hover {
    text-decoration: underline;
}

/* ========== WHY US ========== */
.why-us {
    background: var(--gray-50);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
}

.feature-icon-wrapper {
    margin: 0 auto 1.5rem;
    width: 72px;
    height: 72px;
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-item p {
    font-size: 1rem;
    line-height: 1.6;
}

/* ========== PRICING ========== */
.pricing-preview {
    background: var(--white);
}

.pricing-preview h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.pricing-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.pricing-preview-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 40px;
    position: relative;
    transition: var(--transition);
}

.pricing-preview-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.pricing-preview-card.popular {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.popular-tag {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--accent);
    color: var(--gray-900);
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pricing-preview-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.preview-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0;
}

.preview-price span {
    font-size: 1.25rem;
    color: var(--gray-600);
    font-weight: 400;
}

.pricing-preview-card p {
    margin-bottom: 2rem;
}

.pricing-preview-card ul {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-preview-card li {
    padding: 12px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.pricing-preview-card li:last-child {
    border-bottom: none;
}

.pricing-preview-card li::before {
    content: '';
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: var(--secondary);
    border-radius: 50%;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 10l3 3 5-5' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 20px 20px;
}

.pricing-preview-cta {
    text-align: center;
    margin-top: 48px;
}

.pricing-note {
    margin-top: 24px;
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* ========== CTA SECTION ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.cta-content h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* ========== PAGE HEADER ========== */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 0.75rem;
}

.page-header p {
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
}

/* ========== SERVICE DETAIL ========== */
.service-detail {
    padding: 60px 0;
    border-bottom: 1px solid var(--gray-200);
}

.service-detail:last-child {
    border-bottom: none;
}

.service-tag {
    display: inline-block;
    background: var(--gray-100);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-detail h2 {
    margin-bottom: 1rem;
}

.service-list {
    list-style: none;
    margin: 2rem 0;
}

.service-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-list li:last-child {
    border-bottom: none;
}

.service-list li::before {
    content: '';
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: var(--secondary);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 10l3 3 5-5' stroke='white' stroke-width='2.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 20px 20px;
}

.service-detail-content {
    display: flex;
    gap: 60px;
    align-items: start;
}

.service-detail-text {
    flex: 1;
}

/* ========== PLATFORM GRID ========== */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.platform-item {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    text-align: center;
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.platform-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.platform-icon {
    margin-bottom: 16px;
}

/* ========== PRODUCTOS ========== */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin: 40px 0;
}

.producto-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
}

.producto-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.producto-badge {
    background: linear-gradient(135deg, #fbbc04, #f39c12);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1rem;
}

.producto-categoria {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.producto-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.producto-precio {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0;
}

.btn-producto {
    width: 100%;
    text-align: center;
    margin-top: 1.5rem;
}

/* ========== CONTACT FORM ========== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin: 40px 0;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-900);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========== CEO SECTION ========== */
.ceo-section {
    background: var(--gray-50);
    padding: 80px 0;
}

.ceo-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    align-items: start;
}

.ceo-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 4rem;
    font-weight: 800;
    box-shadow: var(--shadow-md);
}

.ceo-content h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.ceo-title {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.ceo-bio p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* ========== FOOTER ========== */
.main-footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
}

.footer-legal {
    margin-top: 16px;
}

.footer-legal a {
    color: rgba(255,255,255,0.7);
}

/* ========== UTILITY ========== */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Prevent horizontal scroll */
img, svg, video, iframe {
    max-width: 100%;
    height: auto;
}
