/* Fondo base unificado con el color del logo */
html, body, .main, .main-container {
    background-color: #d2f2e1 !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* Tarjetas y Contenedores (Boxed) */
.boxed-lovable {
    background: white !important;
    border-radius: 2.5rem !important; /* Bordes muy redondeados tipo SaaS */
    border: 1px solid #d1fae5 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    padding: 2.5rem !important;
}

/* Estilización de Formularios web2py */
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100% !important;
    padding: 14px 18px !important;
    border: 1.5px solid #d1fae5 !important;
    border-radius: 14px !important;
    background: #f9fafb !important;
    margin-top: 6px !important;
    margin-bottom: 4px !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

input:focus {
    outline: none !important;
    border-color: #15803d !important;
    box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.1) !important;
}

/* Placeholders tenues */
input::placeholder {
    color: #9ca3af !important;
    font-weight: 400;
    font-size: 0.9rem;
}

/* Botón Principal (Submit) */
input[type="submit"], .btn-lovable-primary {
    width: 100% !important;
    background-color: #15803d !important;
    color: white !important;
    padding: 16px !important;
    border-radius: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.2s ease !important;
    font-size: 1.1rem !important;
}

input[type="submit"]:hover {
    background-color: #166534 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Footer ─────────────────────────────────────────────────── */
footer.footer, .footer-lovable {
    background-color: transparent !important;
    border: none !important;
    padding: 2rem 0 !important;
    width: 100%;
}

.site-footer {
    width: 100%;
    padding: 2rem 0;
    background: transparent;
    border: none;
}

.site-footer-inner {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: 0.85rem;
    color: #166534;
    font-weight: 500;
}

.site-footer-inner a {
    color: #166534;
    text-decoration: none;
}

.site-footer-inner a:hover {
    text-decoration: underline;
}

.site-footer-sep {
    opacity: 0.3;
}

/* Clases legacy — mantener por compatibilidad */
.footer-horizontal-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    font-size: 0.85rem !important;
    color: #166534 !important;
    font-weight: 500;
}

.footer-horizontal-container a:hover {
    text-decoration: underline;
}

.opacity-divider {
    opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════
   FORMULARIO CONTACTO — .ct-*
   Compatible con web2py SQLFORM.factory + layout.html
   ═══════════════════════════════════════════════════════════ */

/* ── Página ───────────────────────────────────────────────── */
.ct-wrap {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px 64px;
}

/* ── Tarjeta ──────────────────────────────────────────────── */
.ct-card {
    background: white;
    border: 1px solid #d1fae5;
    border-radius: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
    width: 100%;
    max-width: 560px;
    overflow: hidden;
}

/* ── Cabecera verde ───────────────────────────────────────── */
.ct-header {
    background: linear-gradient(135deg, #166534 0%, #15803d 60%, #16a34a 100%);
    padding: 32px 36px 28px;
    color: #fff;
}
.ct-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 99px;
    padding: 5px 14px;
    font-size: .82rem;
    font-weight: 500;
    color: #d1fae5;
    margin-bottom: 14px;
}
.ct-header h2 {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}
.ct-header p {
    font-size: .95rem;
    color: rgba(255,255,255,.75);
    margin: 0;
    line-height: 1.5;
}

/* ── Cuerpo ───────────────────────────────────────────────── */
.ct-body {
    padding: 32px 36px 36px;
}

/* ── Campo (label + input) ────────────────────────────────── */
.ct-field {
    margin-bottom: 20px;
}
.ct-field > label,
.ct-field .ct-label {
    display: block !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: .07em !important;
    color: #6b7280 !important;
    margin-bottom: 7px !important;
    margin-top: 0 !important;
}

/* ── Checkbox privacidad ──────────────────────────────────── */
.ct-check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 22px;
    font-size: .88rem;
    color: #6b7280;
    line-height: 1.5;
}
.ct-check input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin-top: 2px !important;
    padding: 0 !important;
    accent-color: #15803d;
    flex-shrink: 0;
    cursor: pointer;
}
.ct-check a {
    color: #166534;
    font-weight: 600;
    text-decoration: none;
}
.ct-check a:hover { text-decoration: underline; }

/* ── Captcha ──────────────────────────────────────────────── */
.ct-captcha {
    margin-bottom: 24px;
}

/* ── Divisor ──────────────────────────────────────────────── */
.ct-divider {
    height: 1px;
    background: #d1fae5;
    margin: 24px 0;
}

/* ── Errores web2py ───────────────────────────────────────── */
.ct-field .error_wrapper,
.ct-field .help-block {
    font-size: .83rem !important;
    color: #dc2626 !important;
    margin-top: 5px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
    .ct-header { padding: 24px 22px 20px; }
    .ct-body    { padding: 24px 22px 28px; }
    .ct-header h2 { font-size: 1.35rem; }
}
/* ── Fix Bootstrap: página contacto ──────────────────────── */
/* Añadir class="page-contacto" al body vía {{block head}}    */
.page-contacto .main-container,
.page-contacto .main-container > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    float: none !important;
}