/*
 * hsd-contatti.css — HectorSolisDigital
 * Floating label inputs · Animated underline · Client-side validation
 * GDPR checkboxes · Social icon ripple
 */


/* ============================================================
   SECTION
   ============================================================ */

.hsd-ct-section {
    padding: 80px 0;
    background: var(--hsd-bg-alt);
}


/* ============================================================
   CARDS
   ============================================================ */

.hsd-ct-card,
.hsd-ct-info {
    background: var(--hsd-white);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 4px 40px rgba(31, 95, 175, 0.07);
}

.hsd-ct-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--hsd-blue);
    margin-bottom: 0.4rem;
}

.hsd-ct-title {
    font-family: var(--hsd-font);
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--hsd-text);
    margin-bottom: 0.3rem;
    line-height: 1.25;
}

.hsd-ct-sub {
    font-size: 0.9rem;
    color: var(--hsd-text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}


/* ============================================================
   FLOATING LABEL INPUTS
   ============================================================ */

.hsd-field {
    position: relative;
    padding-top: 20px;
    margin-bottom: 8px;
}

.hsd-field-input {
    width: 100%;
    padding: 6px 0 10px;
    font-family: var(--hsd-font);
    font-size: 0.95rem;
    color: var(--hsd-text);
    background: transparent;
    border: none !important;
    border-bottom: 1.5px solid rgba(31, 95, 175, 0.2) !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    display: block;
}

.hsd-field-input:focus,
.hsd-field-input:active {
    border-color: rgba(31, 95, 175, 0.2) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Textarea */
.hsd-field-textarea {
    resize: none;
    min-height: 120px;
    padding-top: 4px;
}

/* Select */
.hsd-field-select .hsd-field-input {
    cursor: pointer;
    padding-right: 28px;
}

.hsd-select-arrow {
    position: absolute;
    right: 2px;
    bottom: 13px;
    font-size: 0.7rem;
    color: var(--hsd-blue);
    pointer-events: none;
    transition: transform 0.3s;
}

.hsd-field-select .hsd-field-input:focus ~ .hsd-select-arrow {
    transform: rotate(180deg);
}

/* ── Floating label ── */
.hsd-field-label {
    position: absolute;
    top: 28px;
    left: 0;
    font-size: 0.9rem;
    color: var(--hsd-text-muted);
    pointer-events: none;
    transform-origin: left top;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                color      0.25s;
}

.hsd-field-input:focus     ~ .hsd-field-label,
.hsd-field-input:not(:placeholder-shown) ~ .hsd-field-label {
    transform: translateY(-22px) scale(0.76);
    color: var(--hsd-blue);
}

/* Label sempre in alto per select */
.hsd-field-label-static {
    transform: translateY(-22px) scale(0.76);
    color: var(--hsd-text-muted);
}

.hsd-field--has-value .hsd-field-label-static,
.hsd-field-select .hsd-field-input:focus ~ .hsd-field-label-static {
    color: var(--hsd-blue);
}

/* ── Linea animata in basso ── */
.hsd-field-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--hsd-blue);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    pointer-events: none;
}

.hsd-field-input:focus ~ .hsd-field-line {
    width: 100%;
}

/* Indicatore email */
.hsd-field-email-check {
    position: absolute;
    right: 4px;
    bottom: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    pointer-events: none;
}

.hsd-email-ok  { color: #059669; }
.hsd-email-err { color: #DC2626; }


/* ============================================================
   GDPR CHECKBOXES
   ============================================================ */

.hsd-gdpr {
    border-top: 1px solid rgba(31, 95, 175, 0.08);
    padding-top: 1.25rem;
}

.hsd-check-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.hsd-check-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom checkbox */
.hsd-check-box {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(31, 95, 175, 0.3);
    border-radius: 5px;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    background: var(--hsd-white);
}

.hsd-check-box::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
    margin-top: -2px;
}

.hsd-check-wrap input:checked ~ .hsd-check-box {
    background: var(--hsd-blue);
    border-color: var(--hsd-blue);
    transform: scale(1.1);
}

.hsd-check-wrap input:checked ~ .hsd-check-box::after {
    transform: rotate(45deg) scale(1);
}

.hsd-check-wrap:hover .hsd-check-box {
    border-color: var(--hsd-blue);
}

.hsd-check-text {
    font-size: 0.82rem;
    color: var(--hsd-text-muted);
    line-height: 1.6;
}

.hsd-check-text a {
    color: var(--hsd-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hsd-check-text strong { color: var(--hsd-blue); }


/* ============================================================
   SUBMIT — disabled / ready / loading
   ============================================================ */

.hsd-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    padding: 0 40px;
    background: rgba(31, 95, 175, 0.3);    /* disabled state */
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--hsd-font);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: not-allowed;
    overflow: hidden;
    transition: background 0.35s, box-shadow 0.3s, transform 0.2s;
}

/* Activo cuando form es válido */
.hsd-submit--ready {
    background: var(--hsd-blue);
    cursor: pointer;
}

.hsd-submit--ready:hover {
    background: var(--hsd-blue-dark);
    box-shadow: 0 8px 28px rgba(31, 95, 175, 0.35);
    transform: translateY(-2px);
}

.hsd-submit--ready:active { transform: translateY(0); }

.hsd-submit-label,
.hsd-submit-spinner {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.25s, transform 0.25s;
}

.hsd-submit-label   { opacity: 1; transform: translateY(0); }
.hsd-submit-spinner { opacity: 0; transform: translateY(16px); }

.hsd-submit--loading .hsd-submit-label   { opacity: 0; transform: translateY(-16px); }
.hsd-submit--loading .hsd-submit-spinner { opacity: 1; transform: translateY(0); }
.hsd-submit--loading { pointer-events: none; }


/* ============================================================
   ALERT ERROR
   ============================================================ */

.hsd-alert-err {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1.75rem;
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
}

.hsd-alert-err i { flex-shrink: 0; margin-top: 2px; }
.hsd-alert-err a { color: inherit; font-weight: 700; }


/* ============================================================
   INFO ROWS
   ============================================================ */

.hsd-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(31, 95, 175, 0.07);
    text-decoration: none !important;
    transition: transform 0.25s;
    border-radius: 8px;
}

.hsd-info-row:hover,
.hsd-info-row:focus {
    text-decoration: none !important;
}

.hsd-info-row-static { cursor: default; }

.hsd-info-row:not(.hsd-info-row-static):hover {
    transform: translateX(5px);
}

.hsd-info-ico {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--hsd-blue-light);
    color: var(--hsd-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background 0.25s, color 0.25s;
}

.hsd-info-row:not(.hsd-info-row-static):hover .hsd-info-ico {
    background: var(--hsd-blue);
    color: #fff;
}

.hsd-info-text  { display: flex; flex-direction: column; gap: 2px; }
.hsd-info-lbl   { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--hsd-text-muted); }
.hsd-info-val   { font-size: 0.9rem; font-weight: 600; color: var(--hsd-text); transition: color 0.25s; }

.hsd-info-row:not(.hsd-info-row-static):hover .hsd-info-val { color: var(--hsd-blue); }

.hsd-ct-divider { height: 1px; background: rgba(31,95,175,0.08); margin: 1.5rem 0; }


/* ============================================================
   SOCIAL ICONS — ripple + hover profesional
   ============================================================ */

.hsd-social-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--hsd-text-muted);
    margin-bottom: 1rem;
}

.hsd-socials { display: flex; gap: 14px; }

.hsd-soc {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none !important;
    border-bottom: none !important;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.3s;
}

.hsd-soc:hover,
.hsd-soc:focus {
    text-decoration: none !important;
    border-bottom: none !important;
}

.hsd-soc i {
    position: relative;
    z-index: 1;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.hsd-soc-ig { background: rgba(225,48,108,0.1);  color: #C2185B; border: 1.5px solid rgba(225,48,108,0.2); }
.hsd-soc-fb { background: rgba(24,119,242,0.1);   color: #1565C0; border: 1.5px solid rgba(24,119,242,0.2); }
.hsd-soc-wa { background: rgba(37,211,102,0.1);   color: #1B8A4A; border: 1.5px solid rgba(37,211,102,0.2); }

.hsd-soc:hover { transform: translateY(-5px) scale(1.12); }

.hsd-soc-ig:hover { background:#E1306C; color:#fff; border-color:#E1306C; box-shadow:0 8px 24px rgba(225,48,108,0.4); }
.hsd-soc-fb:hover { background:#1877F2; color:#fff; border-color:#1877F2; box-shadow:0 8px 24px rgba(24,119,242,0.4); }
.hsd-soc-wa:hover { background:#25D366; color:#fff; border-color:#25D366; box-shadow:0 8px 24px rgba(37,211,102,0.4); }

.hsd-soc:hover i { transform: rotate(-8deg) scale(1.15); }

.hsd-soc-ripple {
    position: absolute;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    pointer-events: none;
}

.hsd-soc-ripple--active {
    animation: hsdRipple 0.55s ease-out forwards;
}

@keyframes hsdRipple {
    0%   { width:0;     height:0;     opacity:0.7; }
    100% { width:110px; height:110px; opacity:0;   }
}


/* ============================================================
   GRAZIE PAGE
   ============================================================ */

.hsd-grazie-card { text-align: center; padding: 4rem 3rem; }

.hsd-grazie-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--hsd-blue);
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: hsdCheckPop 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes hsdCheckPop {
    0%   { transform:scale(0); opacity:0; }
    100% { transform:scale(1); opacity:1; }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991px) {
    .hsd-ct-card,
    .hsd-ct-info { padding: 2rem 1.5rem; }
}

@media (max-width: 575px) {
    .hsd-ct-section { padding: 48px 0; }
    .hsd-grazie-card { padding: 2.5rem 1.5rem; }
}


/* ============================================================
   GRAZIE PAGE
   ============================================================ */

.hsd-grazie-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
    background: var(--hsd-bg-alt);
}

.hsd-grazie-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--hsd-blue);
    color: #fff;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: hsdCheckPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    box-shadow: 0 12px 32px rgba(31, 95, 175, 0.35);
}

@keyframes hsdCheckPop {
    0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg);   opacity: 1; }
}

.hsd-grazie-title {
    font-family: var(--hsd-font);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--hsd-text);
    line-height: 1.2;
    margin: 0.75rem 0 1rem;
}

.hsd-grazie-sub {
    font-size: 1rem;
    color: var(--hsd-text-muted);
    line-height: 1.75;
    margin-bottom: 0;
}

.hsd-grazie-sub strong {
    color: var(--hsd-blue);
}

.hsd-grazie-divider {
    width: 60px;
    height: 3px;
    background: var(--hsd-blue);
    border-radius: 2px;
    margin: 2rem auto;
    opacity: 0.25;
}

/* Bottoni grazie — grandi, rotondi, spaziati */
.hsd-grazie-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.hsd-grazie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    padding: 16px 40px;
    border-radius: 999px;
    font-family: var(--hsd-font);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-decoration: none;
    transition: all 0.3s;
}

.hsd-grazie-btn-primary {
    background: var(--hsd-blue);
    color: #fff;
    border: 2px solid var(--hsd-blue);
}

.hsd-grazie-btn-primary:hover {
    background: var(--hsd-blue-dark);
    border-color: var(--hsd-blue-dark);
    color: #fff;
    box-shadow: 0 8px 28px rgba(31, 95, 175, 0.3);
    transform: translateY(-2px);
}

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

.hsd-grazie-btn-outline:hover {
    background: var(--hsd-blue-light);
    color: var(--hsd-blue);
    transform: translateY(-2px);
}

@media (max-width: 575px) {
    .hsd-grazie-section { padding: 60px 0; }
    .hsd-grazie-btn { max-width: 100%; }
}