/* ===========================
   Contact page — ibercook-contact.css
   =========================== */

/* Page wrapper with grain texture */
.ct-page {
    position: relative;
    background: var(--ib-off-white);
    min-height: 100vh;
}

.ct-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/images/ib/textura-fondo.jpg');
    background-repeat: repeat;
    background-size: 512px 512px;
    opacity: 0.15;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
}

.ct-page > * {
    position: relative;
    z-index: 1;
}

/* Page title */
.ct-header {
    padding: 3rem 5vw 2.5rem;
    text-align: center;
}

.ct-header__title {
    font-family: 'Bitter', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0;
    line-height: 1.1;
}

/* Two-col section: info card + form */
.ct-body {
    display: grid;
    grid-template-columns: 38fr 62fr;
    gap: 2rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5vw 3rem;
}

/* Left: navy info card */
.ct-info {
    background: var(--ib-navy);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.ct-info__title {
    font-family: 'Bitter', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #f5f5f5;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.ct-info__subtitle {
    font-size: 1rem;
    color: #f5f5f5;
    margin: 0;
    line-height: 1.5;
    opacity: 0.85;
}

.ct-info__items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ct-info__item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.ct-info__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    color: var(--ib-red);
    margin-top: 2px;
}

.ct-info__icon svg {
    width: 100%;
    height: 100%;
}

.ct-info__text {
    flex: 1;
}

.ct-info__text-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f5f5f5;
    margin: 0 0 0.5rem;
}

.ct-info__text-body {
    font-size: 0.9375rem;
    color: rgba(245, 245, 245, 0.85);
    margin: 0;
    line-height: 1.55;
}

.ct-info__text-body strong {
    font-weight: 600;
    color: #f5f5f5;
}

/* Right: form panel */
.ct-form-panel {
    padding: 0.5rem 0 0;
}

.ct-form-panel__title {
    font-family: 'Bitter', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0 0 1.75rem;
}

/* Flash messages */
.ct-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.ct-error-global {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

/* Form grid */
.ct-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
}

.ct-form__group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.ct-form__group--full {
    grid-column: 1 / -1;
}

.ct-form__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ib-blue);
}

.ct-form__label--optional::after {
    content: ' (opcional)';
    font-size: 0.75rem;
    font-weight: 400;
    color: #999;
}

.ct-form__input,
.ct-form__select,
.ct-form__textarea {
    background: #e6e6e6;
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ib-navy);
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    outline: none;
    transition: background 0.15s;
}

.ct-form__input::placeholder,
.ct-form__textarea::placeholder {
    color: #999;
}

.ct-form__input:focus,
.ct-form__select:focus,
.ct-form__textarea:focus {
    background: #d8d8d8;
    box-shadow: 0 0 0 2px var(--ib-blue);
}

.ct-form__select-wrap {
    position: relative;
}

.ct-form__select-wrap::after {
    content: '';
    pointer-events: none;
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--ib-blue);
}

.ct-form__textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.ct-form__input--error,
.ct-form__select--error,
.ct-form__textarea--error {
    box-shadow: 0 0 0 1.5px var(--ib-red);
}

.ct-form__field-error {
    font-size: 0.8125rem;
    color: var(--ib-red);
    margin-top: 0.125rem;
}

/* Checkboxes */
.ct-form__checks {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.ct-form__check {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
}

.ct-form__check input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 0.5px solid var(--ib-navy);
    border-radius: 3px;
    background: #e6e6e6;
    appearance: none;
    cursor: pointer;
    margin-top: 1px;
    position: relative;
    transition: background 0.12s;
}

.ct-form__check input[type="checkbox"]:checked {
    background: var(--ib-navy);
}

.ct-form__check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: 2px solid #f5f5f5;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.ct-form__check-label {
    font-size: 0.875rem;
    color: var(--ib-navy);
    line-height: 1.45;
}

.ct-form__check-label a {
    color: var(--ib-blue);
    font-style: italic;
    text-decoration: underline;
}

.ct-form__check--error .ct-form__check-label {
    color: var(--ib-red);
}

/* Submit button */
.ct-form__submit {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ib-red);
    color: #f5f5f5;
    font-size: 1.125rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    border-radius: 14px;
    padding: 0.875rem 2rem;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.ct-form__submit:hover {
    background: #a80823;
}

/* Map section */
.ct-map {
    max-width: 1440px;
    margin: 0 auto 0;
    padding: 0 5vw 0;
}

.ct-map__frame {
    width: 100%;
    height: 560px;
    border-radius: 16px;
    border: 1px solid #ccc;
    overflow: hidden;
    display: block;
}

.ct-map__frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .ct-body {
        grid-template-columns: 1fr;
    }

    .ct-info {
        order: 2;
    }

    .ct-form-panel {
        order: 1;
    }

    .ct-form__grid {
        grid-template-columns: 1fr;
    }

    .ct-form__group--full {
        grid-column: 1;
    }
}

@media (max-width: 600px) {
    .ct-header {
        padding: 2rem 1.25rem 1.5rem;
    }

    .ct-body {
        padding: 0 1.25rem 2rem;
    }

    .ct-map {
        padding: 0 1.25rem;
    }

    .ct-map__frame {
        height: 320px;
    }
}
