/* ==========================================================================
   Estilos dedicados para Contacto (contacto.php)
   Diseño sobrio, técnico, moderno y 100% responsivo para Miguel Fuenzalida
   ========================================================================== */

:root {
    --ct-primary: #0d1e33;
    --ct-secondary: #1a6fb5;
    --ct-secondary-hover: #145994;
    --ct-accent: #f7a81b;
    --ct-accent-hover: #e0940e;
    --ct-text: #24354a;
    --ct-text-muted: #576d85;
    --ct-bg-soft: #f4f7fb;
    --ct-card-bg: #ffffff;
    --ct-border: #dbe4ef;
    --ct-radius: 16px;
    --ct-shadow: 0 10px 30px rgba(13, 30, 51, 0.08);
    --ct-shadow-hover: 0 16px 36px rgba(13, 30, 51, 0.12);
}

.contacto-wrapper {
    background: var(--ct-bg-soft);
    padding: 3rem 1.2rem 4rem 1.2rem;
    display: flex;
    justify-content: center;
}

.contacto-container {
    max-width: 1180px;
    width: 100%;
}

/* Tarjeta Principal de Presentación */
.contacto-hero-card {
    background: #ffffff;
    border-radius: var(--ct-radius);
    box-shadow: var(--ct-shadow);
    border: 1px solid var(--ct-border);
    padding: 2.5rem 2.2rem;
    margin-bottom: 2.2rem;
    position: relative;
    overflow: hidden;
}

.contacto-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #1a6fb5 0%, #f7a81b 100%);
}

.contacto-header-intro {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contacto-icon-circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #0d1e33 0%, #1a6fb5 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 6px 16px rgba(26, 111, 181, 0.28);
    flex-shrink: 0;
}

.contacto-title-area h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ct-primary);
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.contacto-title-area .contacto-subtitle {
    font-size: 1.05rem;
    color: var(--ct-text-muted);
    line-height: 1.45;
}

.contacto-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.contacto-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #eef4fb;
    color: #1a558c;
    border: 1px solid #d4e2f2;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 600;
}

.contacto-badge-pill.sec {
    background: #fff8e8;
    color: #8c5d00;
    border-color: #f7e0a8;
}

/* Grilla de 2 Columnas */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 991px) {
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Tarjetas de Información */
.contacto-info-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contacto-card {
    background: #ffffff;
    border-radius: var(--ct-radius);
    box-shadow: var(--ct-shadow);
    border: 1px solid var(--ct-border);
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contacto-card:hover {
    box-shadow: var(--ct-shadow-hover);
}

.contacto-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ct-primary);
    margin: 0 0 1.2rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 0.75rem;
}

.contacto-card-title i {
    color: var(--ct-secondary);
}

/* Caja de Webmail Oficial */
.webmail-box {
    background: linear-gradient(135deg, #0d1e33 0%, #16365c 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 1.4rem;
    box-shadow: 0 8px 24px rgba(13, 30, 51, 0.15);
    margin-bottom: 1.2rem;
}

.webmail-box .webmail-tag {
    display: inline-block;
    background: var(--ct-accent);
    color: #0d1e33;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.webmail-box .webmail-address {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.webmail-box .webmail-address i {
    color: var(--ct-accent);
}

.webmail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-webmail-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-webmail-copy {
    background: #ffffff;
    color: #0d1e33;
}

.btn-webmail-copy:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.btn-webmail-write {
    background: var(--ct-secondary);
    color: #ffffff !important;
}

.btn-webmail-write:hover {
    background: #145994;
    transform: translateY(-2px);
}

/* Accesos rápidos a Webmail */
.webmail-quick-links {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.82rem;
    color: #c0d1e5;
}

.webmail-quick-links a {
    color: #ffd88a;
    font-weight: 600;
    text-decoration: none;
    margin-right: 12px;
    display: inline-inline-flex;
    align-items: center;
    gap: 4px;
}

.webmail-quick-links a:hover {
    text-decoration: underline;
    color: #ffffff;
}

/* Lista de detalles de contacto */
.contacto-details-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem 0;
}

.contacto-details-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: var(--ct-text);
}

.contacto-details-list li:last-child {
    border-bottom: none;
}

.contacto-details-list li .item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eef4fb;
    color: var(--ct-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.contacto-details-list li .item-content strong {
    color: var(--ct-primary);
    display: block;
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.contacto-details-list li .item-content span {
    color: var(--ct-text-muted);
}

/* Nota de Horario y Compromiso */
.contacto-info-note {
    background: #f8fafc;
    border-left: 4px solid var(--ct-secondary);
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.45;
}

/* ==========================================================================
   FORMULARIO DE CONTACTO
   ========================================================================== */
.form-card {
    background: #ffffff;
    border-radius: var(--ct-radius);
    box-shadow: var(--ct-shadow);
    border: 1px solid var(--ct-border);
    padding: 2.2rem 2.4rem;
}

@media (max-width: 576px) {
    .form-card {
        padding: 1.5rem 1.2rem;
    }
    .contacto-hero-card {
        padding: 1.8rem 1.4rem;
    }
}

.form-card-header {
    margin-bottom: 1.8rem;
}

.form-card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ct-primary);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card-header h2 i {
    color: var(--ct-secondary);
}

.form-card-header p {
    color: var(--ct-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Campos de Formulario */
.ct-form-group {
    margin-bottom: 1.3rem;
    position: relative;
}

.ct-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 6px;
}

.ct-form-group label .req {
    color: #dc2626;
    margin-left: 3px;
}

.ct-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ct-input-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.ct-form-control {
    width: 100%;
    padding: 11px 14px 11px 40px;
    font-size: 0.95rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #1e293b;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.ct-form-control:focus {
    outline: none;
    border-color: var(--ct-secondary);
    box-shadow: 0 0 0 3px rgba(26, 111, 181, 0.15);
    background: #ffffff;
}

.ct-form-control:focus + .ct-input-icon,
.ct-input-wrapper:focus-within .ct-input-icon {
    color: var(--ct-secondary);
}

select.ct-form-control {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
}

textarea.ct-form-control {
    min-height: 120px;
    resize: vertical;
    padding-left: 14px;
    line-height: 1.5;
}

.ct-char-hint {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 5px;
}

/* Trampa Anti-Spam Oculta */
.ct-hidden-field {
    display: none !important;
    visibility: hidden;
    position: absolute;
    left: -9999px;
}

/* Botón de Envío */
.btn-submit-contacto {
    width: 100%;
    padding: 13px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #1a6fb5 0%, #11538a 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(26, 111, 181, 0.35);
    transition: all 0.25s ease;
}

.btn-submit-contacto:hover:not(:disabled) {
    background: linear-gradient(135deg, #1f7dcc 0%, #155d9b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26, 111, 181, 0.45);
}

.btn-submit-contacto:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Contenedor de Alertas */
.contacto-alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: fadeInSlide 0.3s ease;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.contacto-alert.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-left: 5px solid #059669;
}

.contacto-alert.danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-left: 5px solid #dc2626;
}

.contacto-alert.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #2563eb;
}

.contacto-alert .btn-alert-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    background: #1a6fb5;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
}

.contacto-alert .btn-alert-action:hover {
    background: #145994;
}

/* Toast flotante para copiado rápido */
.ct-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0d1e33;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ct-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.ct-toast i {
    color: #10b981;
    font-size: 1.1rem;
}
