/**
 * Theme Name: Astra Child
 * Author: Brainstorm Force
 * Author URI: http://wpastra.com/about/
 * Description: Astra Child Theme
 * Version: 1.0.0
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: astra-child
 * Template: astra
 */


/* ============================================
   BODY - FONT RENDERING
   ============================================ */
body {
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
}


/* ============================================
   GLOBAL FLUID TYPOGRAPHY - CSS VARIABLES
   Uses clamp(min, preferred, max) for smooth
   scaling between screen sizes.
   ============================================ */
:root {
    --text-body:         clamp(16px, 15.5px + 0.15vw, 18px);
    --text-hero-intro:   clamp(24px, 23px + 0.3vw, 26px);
    --text-section-intro:clamp(18px, 16.5px + 0.4vw, 22px);

    --text-h1: clamp(42px, 35px + 2vw, 60px);
    --text-h2: clamp(32px, 28px + 1vw, 40px);
    --text-h3: clamp(26px, 24px + 0.5vw, 30px);
    --text-h4: clamp(20px, 19.5px + 0.2vw, 22px);
    --text-h5: clamp(17px, 16.5px + 0.1vw, 18px);
    --text-h6: clamp(15px, 14.5px + 0.1vw, 16px);
}

/* Hero intro paragraph */
p.hero-intro {
    font-size: var(--text-hero-intro) !important;
    line-height: 1.5 !important;
}


/* ============================================
   HEADINGS
   h1.entry-title is sized down to H2 so that
   blog/page titles don't compete with hero H1s.
   ============================================ */
h1 {
    font-size: var(--text-h1) !important;
    line-height: 1.1 !important;
    margin-bottom: 0.5em !important;
}

h1.entry-title {
    font-size: var(--text-h2) !important;
    line-height: 1.2 !important;
}

h2 {
    font-size: var(--text-h2) !important;
    line-height: 1.2 !important;
}

h3 {
    font-size: var(--text-h3) !important;
    line-height: 1.3 !important;
}


/* ============================================
   MOBILE SPACING FIX
   Adds top margin on mobile ONLY when the page
   does not use a transparent header (e.g. homepage).
   ============================================ */
@media (max-width: 921px) {
    .ast-header-break-point:not(.ast-theme-transparent-header) #content {
        margin-top: 45px !important;
        display: block !important;
    }

    .ast-theme-transparent-header #content {
        margin-top: 0 !important;
    }
}


/* ============================================
   CONTACT FORM 7 - FORM STYLES
   ============================================ */

/* Remove extra line breaks CF7 adds between fields */
.wpcf7 br {
    display: none !important;
}

/* Space between fields */
.wpcf7-form-control-wrap {
    display: block !important;
    margin-bottom: 20px !important;
}

/* Text inputs, dropdowns, and textareas */
.wpcf7-form input:not([type="submit"]),
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    padding: 12px 15px !important;
    border: 1px solid #FBB14D !important;
    border-radius: 0 !important;
    background: #fff !important;
    font-family: 'Google Sans', sans-serif !important;
}

/* Custom dropdown arrow — removes native browser arrow */
select.wpcf7-form-control {
    height: auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: calc(100% - 15px) center !important;
}

/* Submit button */
.wpcf7-submit {
    display: inline-block !important;
    width: auto !important;
    padding: 14px 35px !important;
    background-color: #FBB14D !important;
    color: #000 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    text-transform: none !important;
    margin-top: 10px !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

.wpcf7-submit:hover {
    background-color: #000 !important;
    color: #fff !important;
}


/* ============================================
   DRAG & DROP FILE UPLOAD
   Note: font-size: 0 hides the plugin's English
   text, and ::after injects Icelandic replacements.
   If the plugin updates its HTML, check these.
   ============================================ */
.codedropz-upload-wrapper,
.codedropz-upload-handler {
    padding: 0 !important;
    border: 0 !important;
}

.codedropz-upload-container {
    padding: 26px 20px !important;
    border: 1px dashed #d6d6d6 !important;
    border-radius: 0 !important;
    background: #fafafa !important;
    text-align: center;
    margin-bottom: 20px !important;
}

/* Hide plugin text, replace with Icelandic */
.codedropz-upload-inner h3 {
    font-size: 0 !important;
    margin: 0 0 8px !important;
    line-height: 1 !important;
}
.codedropz-upload-inner h3::after {
    content: "Dragðu skrárnar þínar hingað";
    font-size: 16px !important;
    font-weight: 600;
    color: #000;
    display: block;
}

.codedropz-upload-inner span {
    font-size: 0 !important;
    display: block;
    margin: 6px 0 12px !important;
}
.codedropz-upload-inner span::after {
    content: "eða";
    font-size: 14px !important;
    color: #666;
}

.cd-upload-btn {
    font-size: 0 !important;
    padding: 10px 18px !important;
    border: 1px solid #000 !important;
    background: #fff !important;
    display: inline-block !important;
}
.cd-upload-btn::after {
    content: "Veldu skrár";
    font-size: 14px !important;
    color: #000;
    font-weight: 600;
}

.dnd-upload-counter {
    font-size: 11px !important;
    color: #000000 !important;
    margin-top: 10px !important;
}


/* ============================================
   FOOTER - SHARED LINK STYLES
   Applies to all screen sizes
   ============================================ */
.main-footer .wp-block-navigation-item__content {
    font-size: 15px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: color 0.3s ease !important;
}

.main-footer .wp-block-navigation-item__content:hover {
    color: #FBB14D !important;
}


/* ============================================
   FOOTER - DESKTOP (1025px and up)
   ============================================ */
@media (min-width: 1025px) {

    /* Contact icons: inline row, right aligned */
    #birtuver-contact .uagb-icon-list__wrap {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        gap: 30px !important;
        width: 100% !important;
    }

    #birtuver-contact .wp-block-uagb-icon-list-child {
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    /* Navigation: inline row, right aligned */
    .main-footer .wp-block-navigation__container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        gap: 25px !important;
    }
}


/* ============================================
   FOOTER - MOBILE & TABLET (up to 1024px)
   Everything stacks and centers.
   ============================================ */
@media (max-width: 1024px) {

    /* Logo: centered */
    .main-footer .wp-block-site-logo {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto 20px !important;
    }

    .main-footer .wp-block-site-logo a {
        display: inline-block !important;
    }

    /* Paragraph text: centered, max readable width */
    .main-footer p.has-text-color {
        text-align: center !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 600px !important;
    }

    /* Contact icons: stacked and centered */
    #birtuver-contact .uagb-icon-list__wrap {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
    }

    #birtuver-contact .wp-block-uagb-icon-list-child {
        display: flex !important;
        justify-content: center !important;
        margin: 0 !important;
    }

    /* Navigation: stacked and centered */
    .main-footer .wp-block-navigation {
        justify-content: center !important;
        width: 100% !important;
    }

    .main-footer .wp-block-navigation__container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .main-footer .wp-block-navigation-item {
        margin: 0 !important;
    }
}


/* ============================================
   BELOW FOOTER - COPYRIGHT / LEGAL LINKS
   Mobile: stacked. Desktop: horizontal with | separator.
   ============================================ */

/* Base (mobile): vertical stack */
.below-main-footer ul.wp-block-list {
    display: flex !important;
    flex-direction: column !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    text-align: center;
    gap: 10px;
}

.below-main-footer ul.wp-block-list li {
    display: block !important;
    margin: 0 !important;
}

/* Desktop: horizontal row with pipe separators */
@media (min-width: 1025px) {
    .below-main-footer ul.wp-block-list {
        flex-direction: row !important;
        justify-content: center;
        gap: 0 !important;
    }

    .below-main-footer ul.wp-block-list li {
        display: inline-flex !important;
        align-items: center;
    }

    /* Pipe | separator between items (not before the first) */
    .below-main-footer ul.wp-block-list li:not(:first-child)::before {
        content: "|";
        display: inline-block !important;
        margin: 0 15px;
        opacity: 0.5;
    }
}
