.mailing-list-block{
	background: var(--color-secondary);
	padding: 40px;
	margin: 40px auto;
}
.mailing-list-form{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-areas:
        "formEmail  formEmail    formName   formName   formLast formLast"
        "formPref   formPref   formPref   formPref   formPref   formPref"
        "formConsent formConsent formConsent formConsent formSend  formSend";
    gap: 10px;
}

/* Areas */
.mailing-list-form .form-row.form-email{
    grid-area: formEmail;
    margin: 0;
}

.mailing-list-form .form-row.form-first{
    grid-area: formName;
    margin: 0;
}
.mailing-list-form .form-row.form-last{
    grid-area: formLast;
    margin: 0;
}

.mailing-list-form .form-row label{
    display: inline-block;
    padding: 20px 15px;
    margin: 0;
    width: 120px;
    border: 1px solid var(--color-dull-text);
    border-right: none;
    background: rgba(255,255,255,0.05);
}
.mailing-list-form .form-row{
    display: flex;
    justify-content: flex-start;
}
.mailing-list-form .form-row input{
    color: #fff;
    padding: 20px 15px;
    display: inline-block;
    outline: none;
    background: rgba(0,0,0,0);
    border: 1px solid var(--color-dull-text);
    border-left:  1px solid rgba(255,255,255,0.05);
    margin: 0;
    width: calc(100% - 100px);
    transition: all easse-in-out 0.4s;
}
.mailing-list-form .form-row input:focus{
    border: 1px solid var(--color-accent);
}
.mailing-list-form fieldset{
    grid-area: formPref;
    border: 1px solid var(--color-dull-text);
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size:var(--secondary-font-size);
    text-align: center;
        flex-wrap:wrap;
}
.checkbox-row{
    width: calc(33% - 10px);
        margin: 0;
}

.form-consent{
    grid-area: formConsent;
}

.form-submit{
    grid-area: formSend;
    display: flex;
    justify-content: flex-end;
}

/* =========================
   Checkbox row layout
========================= */

.checkbox-row{
    position: relative;
    padding: 15px 5px;
}
.form-consent {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 5px;
    margin: 0;
    color: var(--color-dull-text);
}

/* =========================
   Visually hide native checkbox
   (accessible technique)
========================= */

.checkbox-row input[type="checkbox"],
.form-consent input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* =========================
   Label as clickable area
========================= */

.checkbox-row label,
.form-consent label {
    position: relative;
    padding-left: 34px;
    cursor: pointer;    
    padding-top: 3px;
    display: inline-block;
    line-height: 1.4;
    color: var(--color-text);
    font-size:var(--secondary-font-size);
}
.form-consent label{
    color:var(--color-dull-text);
}

/* =========================
   Custom checkbox box
========================= */

.checkbox-row label::before,
.form-consent label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-dull-text);
    background: transparent;
    border-radius: 4px;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* =========================
   Checkmark (SVG-free)
========================= */

.checkbox-row label::after,
.form-consent label::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 0.45em;
    width: 6px;
    height: 10px;
    border-right: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(45deg);
    transition: border-color 0.15s ease;
}

/* =========================
   Checked state
========================= */

.checkbox-row input[type="checkbox"]:checked + label::before,
.form-consent input[type="checkbox"]:checked + label::before {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.checkbox-row input[type="checkbox"]:checked + label::after,
.form-consent input[type="checkbox"]:checked + label::after {
    border-color: var(--color-primary);
}

/* =========================
   Hover state
========================= */

.checkbox-row label:hover::before,
.form-consent label:hover::before {
    border-color: var(--color-accent);
}

/* =========================
   Keyboard focus (VERY IMPORTANT)
========================= */

.checkbox-row input[type="checkbox"]:focus-visible + label::before,
.form-consent input[type="checkbox"]:focus-visible + label::before {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
    border-color: var(--color-accent);
}

/* =========================
   Required / consent emphasis
========================= */

.form-consent label {
    font-size: var(--secondary-font-size);
}

/* =========================
   Disabled (future-proof)
========================= */

.checkbox-row input[type="checkbox"]:disabled + label,
.form-consent input[type="checkbox"]:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}



.form-submit-button{
    vertical-align: middle;
    -webkit-transform: perspective(1px) translateZ(0);
    transform: perspective(1px) translateZ(0);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
    position: relative;
    overflow: hidden;
    color: rgba(255,255,255,1);
    font-size: var(--default-font-size);
    padding:calc(.667em + 2px) calc(2em + 2px);
    background: var(--color-text);
    outline: none;
    border:none;
}
.form-submit-button:after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-text);;
  height: 2px;
  opacity: 0.3;
}
.form-submit-button:before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 51%;
  right: 51%;
  bottom: 0;
  background: var(--color-accent);
  height:2px;
  -webkit-transition-property: left, right;
  transition-property: left, right;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
}
.form-submit-button:hover:before, 
.form-submit-button:focus:before, 
.form-submit-button:active:before {
  left: 0;
  right: 0;
}
@media (max-width: 1350px){
    .mailing-list-form{
        width: 100%;
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-areas:
            "formEmail  formEmail formEmail  formEmail formEmail  formEmail"
            " formName   formName  formName   formLast  formLast formLast"
            "formPref   formPref   formPref   formPref   formPref   formPref"
            "formConsent formConsent formConsent formConsent formSend  formSend";
        gap: 10px;
    }
    .mailing-list-form fieldset{
        justify-content: flex-start;
        text-align: left;
    }
    .checkbox-row{
        width: calc(50% - 10px);
        text-align: left;
    }
}
@media (max-width: 1200px){
    .mailing-list-form{
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "formEmail"
            "formName"
            "formLast"
            "formPref   formPref"
            "formConsent formConsent"
            "formSend   formSend";
    }

    .form-submit{
        justify-content: center;
    }
    .checkbox-row{
        width: 100%;
        text-align: left;
    }
}
@media (max-width: 700px){
    .mailing-list-form{
        grid-template-columns: 1fr;
        grid-template-areas:
            "formEmail"
            "formName"
            "formLast"
            "formPref"
            "formConsent"
            "formSend";
    }
}