:root {
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --accent: #f59e0b;
    --dark: #0f172a;
    --slate-800: #1e293b;
    --slate-600: #475569;
    --slate-200: #e2e8f0;
    --bg-light: #f8fafc;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--slate-800);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--slate-200);
}

.nav-bar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.badge {
    background: var(--primary);
    color: var(--white);
    font-size: 0.78rem;
    padding: 4px 8px;
    border-radius: 5px;
    letter-spacing: 0.5px;
}

nav {
    display: flex;
    gap: 28px;
}

nav a {
    text-decoration: none;
    color: var(--slate-600);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-nav:hover {
    background: var(--primary-dark);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: var(--white);
    padding: 85px 0;
}

.hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #bfdbfe;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 99px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: 2.6rem;
    line-height: 1.2;
    max-width: 780px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.12rem;
    color: #dbeafe;
    max-width: 700px;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-primary {
    background: var(--accent);
    color: var(--dark);
    text-decoration: none;
    font-weight: 700;
    padding: 14px 24px;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #fbbf24;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Secciones */
section {
    padding: 70px 0;
}

.section-white {
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--slate-600);
}

/* Grid de tarjetas */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.card-light {
    background: var(--bg-light);
}

.card-label {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.card-num {
    width: 44px;
    height: 44px;
    background: #dbeafe;
    color: var(--primary);
    font-weight: 800;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.card p {
    color: var(--slate-600);
    font-size: 0.95rem;
}

/* Contacto */
.contact-section {
    background: var(--dark);
    color: var(--white);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 44px;
    align-items: start;
}

.contact-section h2 {
    font-size: 2rem;
    margin-bottom: 14px;
}

.contact-intro {
    color: #cbd5e1;
    margin-bottom: 28px;
}

.info-item {
    margin-bottom: 20px;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 4px;
}

.info-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.info-link:hover {
    text-decoration: underline;
}

/* Formulario */
form,
form.comConnectForm {
    background: var(--white);
    color: var(--slate-800);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

form fieldset,
form.comConnectForm fieldset {
    border: none;
    padding: 0;
    margin: 0;
    min-width: 0;
}

form legend,
form.comConnectForm legend {
    display: none;
}

form h3,
form.comConnectForm h3 {
    font-size: 1.3rem;
    margin-bottom: 18px;
    color: var(--dark);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--slate-600);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--slate-800);
    background-color: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.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(29, 78, 216, 0.12);
}

form input[type="submit"],
form button[type="submit"] {
    display: block;
    width: 100%;
    margin-top: 8px;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 13px 20px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

form input[type="submit"]:hover,
form button[type="submit"]:hover {
    background: var(--primary-dark);
}

/* Alertas de validación y envío de com_connect */
.comError {
    list-style: none;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.comThanks {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    padding: 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
}



/* Footer */
footer {
    background: #020617;
    color: #94a3b8;
    text-align: center;
    padding: 26px 20px;
    font-size: 0.85rem;
    border-top: 1px solid #1e293b;
}

@media (max-width: 720px) {
    nav {
        display: none;
    }

    .hero h1 {
        font-size: 1.95rem;
    }
}

/* Reemplaza la regla .hero anterior por esta */
.hero {
    position: relative;
    background-color: var(--dark);
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 95px 0;
}

/* Capa de contraste para garantizar lectura sobre cualquier foto real */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(30, 58, 138, 0.82) 60%, rgba(15, 23, 42, 0.65) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

/* Tarjetas con fotografía */
.card-media {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--slate-200);
}

.card-body {
    padding: 26px 28px 28px;
}

/* Franja visual de respaldo técnico en Acreditación */
.evidence-banner {
    margin-top: 32px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--slate-200);
    background: var(--bg-light);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
}

.evidence-banner img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.evidence-text {
    padding: 32px;
}

.evidence-text h3 {
    font-size: 1.35rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.evidence-text p {
    color: var(--slate-600);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .evidence-banner {
        grid-template-columns: 1fr;
    }

    .evidence-banner img {
        height: 220px;
    }
}

