/*
 * Site footer on a white background with the history/timeline accents:
 * brown text, gold headings. Shared look first, then the phone
 * layout (Blocksy's mobile breakpoint), then the tablet/desktop layout.
 */

/* =====================================================================
 * Shared (all screen sizes)
 * ================================================================== */

[data-footer*="type-1"] .ct-footer {
    --obd-f-bg: #ffffff;
    --obd-f-bg-2: #F5EFE4; /* hover tint */
    --obd-f-text: #3d2000;
    --obd-f-muted: #7A6A54;
    --obd-f-gold: #A8802F;
    --obd-f-line: #E2D6BF;
    /* Loaded site-wide by the Custom Fonts plugin. */
    --obd-f-font: "kohinoor bongla", "Kohinoor Bangla", system-ui, sans-serif;

    position: relative;
    font-family: var(--obd-f-font);
    --theme-font-family: var(--obd-f-font);
    overflow: hidden;
    border-radius: 40px 40px 0 0;
    background: var(--obd-f-bg);
    box-shadow: 0 -6px 28px rgba(61, 32, 0, 0.08);
    color: var(--obd-f-text);
    --theme-text-color: var(--obd-f-text);
    --theme-link-initial-color: var(--obd-f-text);
    --theme-link-hover-color: var(--obd-f-gold);
    --theme-heading-color: var(--obd-f-gold);
}

/* ---- Logo + tagline ---- */
/* The logo file is white; the mask lets us paint it in the brand brown. */
[data-footer*="type-1"] .ct-footer [data-column="widget-area-1"]::before {
    content: "";
    display: block;
    width: 116px;
    aspect-ratio: 650 / 578;
    margin: 0 0 18px;
    background: var(--obd-f-text);
    -webkit-mask: var(--obd-footer-logo) center / contain no-repeat;
    mask: var(--obd-footer-logo) center / contain no-repeat;
}

[data-footer*="type-1"] .ct-footer [data-column="widget-area-1"] p {
    max-width: 32ch;
    margin: 0;
    font-size: 17px;
    line-height: 1.55;
    color: var(--obd-f-muted);
}

/* ---- Social icons ---- */
[data-footer*="type-1"] .ct-footer .ct-block-wrapper > h3:empty { display: none; }
[data-footer*="type-1"] .ct-footer [data-column="widget-area-1"] .ct-block-wrapper { margin-top: 22px; }
[data-footer*="type-1"] .ct-footer .ct-social-box {
    --theme-icon-size: 18px;
    --theme-icon-color: var(--obd-f-gold);
    --theme-icon-hover-color: #fff;
    gap: 14px;
}
[data-footer*="type-1"] .ct-footer .ct-social-box .ct-icon-container {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(168, 128, 47, 0.45);
    border-radius: 50%;
    background: #fff;
    transition: background 0.2s ease, border-color 0.2s ease;
}
[data-footer*="type-1"] .ct-footer .ct-social-box a:hover .ct-icon-container,
[data-footer*="type-1"] .ct-footer .ct-social-box a:focus-visible .ct-icon-container {
    background: var(--obd-f-gold);
    border-color: var(--obd-f-gold);
}

/* ---- Widget headings ---- */
[data-footer*="type-1"] .ct-footer .widget-title {
    /* Same as the page headings: Arial, bold, normal case, no tracking. */
    --theme-font-family: Arial, sans-serif;
    font-family: Arial, sans-serif;
    margin-bottom: 14px;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    color: var(--obd-f-gold);
}

/* ---- "Saites": plain text links ---- */
[data-footer*="type-1"] .ct-footer .textwidget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
[data-footer*="type-1"] .ct-footer .textwidget li {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
}
[data-footer*="type-1"] .ct-footer .textwidget li a {
    display: inline-block;
    padding: 7px 0; /* comfortable tap height without looking like a button */
    color: var(--obd-f-text);
    text-decoration: none;
}
[data-footer*="type-1"] .ct-footer .textwidget li a:hover,
[data-footer*="type-1"] .ct-footer .textwidget li a:focus-visible {
    color: var(--obd-f-gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---- "Sazinies ar mums": phone / email buttons ---- */
[data-footer*="type-1"] .ct-footer .textwidget p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--obd-f-muted);
}
[data-footer*="type-1"] .ct-footer .textwidget strong { color: var(--obd-f-text); }
[data-footer*="type-1"] .ct-footer a[href^="tel:"],
[data-footer*="type-1"] .ct-footer a[href^="mailto:"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    min-height: 52px;
    margin: 6px 0 18px;
    padding: 0 20px;
    border: 1px solid var(--obd-f-text);
    border-radius: 999px;
    background: var(--obd-f-text);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(61, 32, 0, 0.18);
    transition: background 0.2s ease, color 0.2s ease;
}
[data-footer*="type-1"] .ct-footer a[href^="mailto:"] {
    background: #fff;
    color: var(--obd-f-text);
    box-shadow: none;
    font-size: 16px;
    overflow-wrap: anywhere;
}
[data-footer*="type-1"] .ct-footer a[href^="tel:"]:hover { background: #2f2005; }
[data-footer*="type-1"] .ct-footer a[href^="mailto:"]:hover { background: var(--obd-f-bg-2); }
[data-footer*="type-1"] .ct-footer a[href^="tel:"]::before,
[data-footer*="type-1"] .ct-footer a[href^="mailto:"]::before {
    content: "";
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: var(--obd-f-icon) center / contain no-repeat;
    mask: var(--obd-f-icon) center / contain no-repeat;
}
[data-footer*="type-1"] .ct-footer a[href^="tel:"] {
    --obd-f-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1L6.6 10.8z'/%3E%3C/svg%3E");
}
[data-footer*="type-1"] .ct-footer a[href^="mailto:"] {
    --obd-f-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm0 2v.5l8 5 8-5V6H4zm16 2.85-7.47 4.67a1 1 0 0 1-1.06 0L4 8.85V18h16V8.85z'/%3E%3C/svg%3E");
}

/* A line break right after a button would leave an empty line below it. */
[data-footer*="type-1"] .ct-footer a[href^="tel:"] + br,
[data-footer*="type-1"] .ct-footer a[href^="mailto:"] + br { display: none; }

/* ---- Copyright ---- */
[data-footer*="type-1"] .ct-footer [data-row*="bottom"] {
    background: transparent;
}
[data-footer*="type-1"] .ct-footer [data-row*="bottom"] > div {
    --theme-border-top: 1px solid var(--obd-f-line);
}
[data-footer*="type-1"] .ct-footer .ct-footer-copyright {
    font-size: 13px;
    color: var(--obd-f-muted);
}

/* =====================================================================
 * Phone: one centred column, each widget its own band
 * ================================================================== */
@media (max-width: 689.98px) {

    [data-footer*="type-1"] .ct-footer { border-radius: 28px 28px 0 0; }

    [data-footer*="type-1"] .ct-footer [data-row*="middle"] > div {
        --container-spacing: 48px;
        --columns-gap: 0px;
    }

    [data-footer*="type-1"] .ct-footer [data-row*="middle"] [data-column^="widget-area"] {
        padding: 28px 4px;
        border-top: 1px solid var(--obd-f-line);
    }
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] [data-column="widget-area-1"] {
        padding-top: 0;
        border-top: 0;
    }
    [data-footer*="type-1"] .ct-footer [data-column="ghost"] { display: none; }

    [data-footer*="type-1"] .ct-footer [data-column="widget-area-1"]::before { margin: 0 auto 18px; }
    [data-footer*="type-1"] .ct-footer [data-column="widget-area-1"] p { margin: 0 auto; }
    [data-footer*="type-1"] .ct-footer .ct-social-box { justify-content: center; }

    [data-footer*="type-1"] .ct-footer a[href^="tel:"],
    [data-footer*="type-1"] .ct-footer a[href^="mailto:"] { margin: 6px auto 18px; }

    [data-footer*="type-1"] .ct-footer [data-row*="bottom"] > div {
        /* Leaves room for the floating "Jaunumi" button so it never covers the text. */
        padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
    }
}

/* =====================================================================
 * Tablet and desktop: Blocksy's columns, left-aligned
 * ================================================================== */
@media (min-width: 690px) {

    [data-footer*="type-1"] .ct-footer [data-row*="middle"] > div {
        --container-spacing: 72px;
    }
    [data-footer*="type-1"] .ct-footer [data-column="ghost"] { display: none; }

    [data-footer*="type-1"] .ct-footer [data-column^="widget-area"] {
        --text-horizontal-alignment: left;
        --horizontal-alignment: flex-start;
        text-align: left;
    }

    /* Line the column headings up with the top of the logo. */
    [data-footer*="type-1"] .ct-footer .widget_text { padding-top: 6px; }

    [data-footer*="type-1"] .ct-footer a[href^="tel:"],
    [data-footer*="type-1"] .ct-footer a[href^="mailto:"] {
        width: fit-content;
        max-width: 100%;
        min-height: 48px;
        padding: 0 24px;
        font-size: 16px;
        white-space: nowrap;
    }

    [data-footer*="type-1"] .ct-footer [data-row*="bottom"] > div {
        --container-spacing: 22px;
    }
}

/* Tablet: the centred copyright sits where the floating "Jaunumi" button is. */
@media (min-width: 690px) and (max-width: 999.98px) {
    [data-footer*="type-1"] .ct-footer [data-row*="bottom"] > div {
        padding-bottom: 110px;
    }
}

/* Desktop: three columns now that the empty spacer column is hidden. */
@media (min-width: 1000px) {
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] > div {
        --grid-template-columns: 1.5fr 1fr 1.3fr;
    }
}
