/* =============================================================================
   CETSA x Algorithmics - Estilos
   Diseño limpio, moderno y responsive. Sin frameworks ni dependencias.
   ============================================================================= */

:root {
    --color-primary: #2952e3;
    --color-primary-dark: #1c3aa9;
    --color-accent: #ff8a1e;
    --color-bg: #f5f7fb;
    --color-card: #ffffff;
    --color-text: #1f2430;
    --color-text-muted: #5a6272;
    --color-border: #dde2ec;
    --color-error: #c62828;
    --color-error-bg: #fdecea;
    --color-success: #1e7e34;
    --color-whatsapp: #25d366;
    --color-whatsapp-dark: #1ebe5a;
    --radius: 12px;
    --shadow: 0 4px 16px rgba(20, 30, 60, 0.08);
    --font-main: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

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

.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilidad para textos accesibles pero visualmente ocultos */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -----------------------------------------------------------------------------
   Encabezado
   ----------------------------------------------------------------------------- */
.site-header {
    background-color: var(--color-card);
    border-bottom: 1px solid var(--color-border);
    padding: 18px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    max-height: 48px;
    width: auto;
    display: block;
}

/* Contenedor temporal mientras no exista el logo oficial (ver index.php) */
.logo-placeholder {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    padding: 6px 14px;
    border: 2px solid var(--color-primary);
    border-radius: 8px;
}

/* -----------------------------------------------------------------------------
   Introducción
   ----------------------------------------------------------------------------- */
main.container {
    padding-top: 32px;
    padding-bottom: 48px;
}

.intro {
    text-align: center;
    margin-bottom: 28px;
}

.intro h1 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin: 0 0 12px;
    color: var(--color-text);
}

.intro-text {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* -----------------------------------------------------------------------------
   Tarjeta del formulario
   ----------------------------------------------------------------------------- */
.form-card {
    background-color: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field input[type="date"],
.form-field select {
    width: 100%;
    padding: 11px 12px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text);
    background-color: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(41, 82, 227, 0.15);
}

.form-field input.invalid,
.form-field select.invalid {
    border-color: var(--color-error);
}

.field-hint {
    display: block;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.error-message {
    display: block;
    min-height: 1.1em;
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: 5px;
}

.form-general-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.92rem;
    margin-bottom: 18px;
}

/* Checkbox de consentimiento */
.form-field-checkbox .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 0.92rem;
    color: var(--color-text);
    cursor: pointer;
}

.form-field-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}

/* Honeypot: oculto para personas, presente para bots simples */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* -----------------------------------------------------------------------------
   Botones
   ----------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
    width: 100%;
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--color-primary-dark);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    background-color: #eef1f8;
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: #e2e6f0;
}

.btn-whatsapp {
    width: 100%;
    background-color: var(--color-whatsapp);
    color: #fff;
}

.btn-whatsapp:hover {
    background-color: var(--color-whatsapp-dark);
}

/* -----------------------------------------------------------------------------
   Panel de éxito
   ----------------------------------------------------------------------------- */
.success-panel {
    text-align: center;
}

.success-panel h2 {
    color: var(--color-success);
    margin-bottom: 10px;
}

.success-panel p {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* -----------------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------------- */
.site-footer {
    background-color: #1a2140;
    color: #dbe0f0;
    padding: 32px 0;
    margin-top: 24px;
}

.footer-inner {
    text-align: center;
}

.footer-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 4px;
    color: #fff;
}

.footer-tagline {
    margin: 0 0 10px;
    color: #b7bedb;
    font-size: 0.9rem;
}

.footer-phone {
    margin: 0 0 16px;
    font-size: 0.95rem;
    color: #dbe0f0;
}

.footer-whatsapp {
    display: inline-flex;
    width: auto;
    padding: 10px 20px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.social-links a {
    color: #dbe0f0;
    text-decoration: none;
    font-size: 0.88rem;
    border-bottom: 1px solid transparent;
}

.social-links a:hover {
    border-bottom-color: #dbe0f0;
}

/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */
@media (min-width: 600px) {
    .intro h1 {
        font-size: 2.1rem;
    }

    .success-actions {
        flex-direction: row;
        justify-content: center;
    }

    .success-actions .btn {
        width: auto;
        min-width: 220px;
    }
}

@media (min-width: 900px) {
    .form-card {
        padding: 36px 44px;
    }

    .intro h1 {
        font-size: 2.3rem;
    }
}
