/* ============================================
   CSG-3000 - Estilos principales
   Consultores de Sistemas y Gerencia
   Caracas, Venezuela
   ============================================ */

:root {
    --primary: #0B3D91;
    --primary-dark: #082C6B;
    --primary-light: #1A5BBF;
    --accent: #00C2A8;
    --accent-hover: #00A890;
    --dark: #0F172A;
    --gray-900: #1E293B;
    --gray-700: #334155;
    --gray-500: #64748B;
    --gray-300: #CBD5E1;
    --gray-100: #F1F5F9;
    --white: #FFFFFF;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: var(--font-main);
    color: var(--gray-900);
    line-height: 1.65;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

ul, ol {
    list-style: none;
}

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

/* ========== HEADER ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark);
}

.logo-accent {
    color: var(--primary);
}

.logo-tagline {
    font-size: 0.7rem;
    color: var(--gray-500);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-nav a {
    display: block;
    padding: 0.5rem 0.9rem;
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: var(--radius-sm);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: rgba(11, 61, 145, 0.06);
}

.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

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

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

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

.btn-sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* ========== HERO ========== */
.hero {
    position: relative;
    padding: 5.5rem 0 4.5rem;
    background: linear-gradient(135deg, #0B3D91 0%, #082C6B 50%, #0A2540 100%);
    color: var(--white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(0, 194, 168, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.03em;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 580px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* ========== SECTIONS ========== */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem;
}

.section-header .eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.25;
}

.section-header p {
    color: var(--gray-500);
    font-size: 1.05rem;
}

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

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

.bg-dark .section-header h2 {
    color: var(--white);
}

.bg-dark .section-header p {
    color: rgba(255, 255, 255, 0.75);
}

/* ========== CARDS ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(11, 61, 145, 0.15);
}

.card-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(11, 61, 145, 0.1), rgba(0, 194, 168, 0.1));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    flex-grow: 1;
}

.card .card-link {
    margin-top: 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.card .card-link:hover {
    gap: 0.6rem;
}

/* ========== SERVICES DETAILED ========== */
.service-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
    margin-bottom: 5rem;
    scroll-margin-top: 100px;
}

.service-block:nth-child(even) {
    direction: rtl;
}

.service-block:nth-child(even) > * {
    direction: ltr;
}

.service-content h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.service-content .service-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.service-content p {
    color: var(--gray-500);
    margin-bottom: 1.25rem;
}

.service-list {
    margin: 1.5rem 0;
}

.service-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.65rem;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.service-visual {
    background: linear-gradient(135deg, var(--gray-100), #E0F2FE);
    border-radius: var(--radius-lg);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.85;
}

/* ========== CTA ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4.5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: 0.9;
    max-width: 520px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

/* ========== ABOUT ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.about-content h2 {
    font-family: var(--font-display);
    font-size: 2.1rem;
    margin-bottom: 1.25rem;
    color: var(--dark);
}

.about-content p {
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

.value-item {
    background: var(--gray-100);
    padding: 1.25rem;
    border-radius: var(--radius);
}

.value-item strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.value-item span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ========== CONTACT ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3.5rem;
}

.contact-info-card {
    background: var(--gray-100);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.contact-info-card h3 {
    font-family: var(--font-display);
    margin-bottom: 1.5rem;
    font-size: 1.35rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-form {
    background: var(--white);
    padding: 2.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.12);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ========== BLOG ========== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.blog-card-img {
    height: 180px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.blog-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.blog-card h3 a {
    color: var(--dark);
}

.blog-card h3 a:hover {
    color: var(--primary);
}

.blog-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--accent);
}

.footer-about p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.footer-col h4 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--accent);
}

.contact-info li {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.contact-info strong {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
}

/* ========== PAGE HEADER ========== */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0 3rem;
    text-align: center;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    margin-bottom: 0.75rem;
}

.page-header p {
    opacity: 0.9;
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb span {
    opacity: 0.5;
}

/* ========== ADMIN ========== */
.admin-body {
    background: var(--gray-100);
    min-height: 100vh;
}

.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
}

.login-card h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-card .subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--dark);
    color: var(--white);
    padding: 1.5rem;
}

.admin-sidebar .logo {
    margin-bottom: 2rem;
    color: var(--white);
}

.admin-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.admin-main {
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.stat-card .number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .about-grid,
    .contact-grid,
    .service-block {
        grid-template-columns: 1fr;
    }
    .service-block:nth-child(even) {
        direction: ltr;
    }
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-100);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
    }
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
    }
    .has-dropdown:hover .dropdown,
    .has-dropdown.open .dropdown {
        display: block;
    }
    .mobile-toggle {
        display: flex;
    }
    .header-actions .btn {
        display: none;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .values-grid {
        grid-template-columns: 1fr;
    }
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3.5rem 0 3rem;
    }
    .section {
        padding: 3.5rem 0;
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
    }
}
