/* Stinas Hemhjälp - Custom Styles */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
}

/* Remove block gap between full-width sections */
.entry-content > .wp-block-group > .wp-block-group.alignfull + .wp-block-group.alignfull {
    margin-top: 0 !important;
}

/* Ensure entry-content allows full-width children */
.entry-content.wp-block-post-content {
    max-width: 100% !important;
}

/* Remove top margin on main */
main.wp-block-group {
    margin-top: 0 !important;
}

/* Site logo sizing */
.wp-block-site-logo {
    min-width: 160px;
}
.wp-block-site-logo img {
    width: 160px !important;
    height: auto !important;
    max-height: 56px;
}

/* Hero image sizing - contain within hero section */
.wp-block-group.alignfull .wp-block-columns .wp-block-image img {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
}

/* Responsive columns on mobile */
@media (max-width: 781px) {
    .services-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Header sticky styling */
.site-header,
header .wp-block-group.site-header,
.wp-block-template-part header .wp-block-group {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* background sätts transparent här — frostat glas hanteras av ::before */
    background: transparent !important;
}

/* Frostat glas via ::before så att backdrop-filter INTE skapar ett containing block
   för navigationens position:fixed overlay (bug i Chrome sedan v86). */
.site-header::before,
header .wp-block-group.site-header::before,
.wp-block-template-part header .wp-block-group::before {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.95);
    z-index: -1;
    pointer-events: none;
}

/* Header phone link */
.header-phone a {
    color: var(--wp--preset--color--slate-600);
    text-decoration: none;
    transition: color 0.3s;
}
.header-phone a:hover {
    color: var(--wp--preset--color--brand);
}
.header-phone i {
    margin-right: 0.5rem;
}

/* Header actions på mobil: visa telefon-ikon, dölj Fri offert-knapp */
@media (max-width: 781px) {
    .header-actions {
        display: flex !important;
    }
    /* Dölj Fri offert-knappen på mobil */
    .header-actions .wp-block-buttons {
        display: none !important;
    }
    /* Visa bara telefon-ikonen, dölj numret för att spara plats */
    .header-phone a {
        font-size: 0 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--wp--preset--color--brand-light);
        border-radius: 50%;
        transition: background 0.3s;
    }
    .header-phone a:hover {
        background: var(--wp--preset--color--brand);
    }
    .header-phone a i {
        font-size: 1rem !important;
        margin: 0 !important;
        color: var(--wp--preset--color--brand);
    }
    .header-phone a:hover i {
        color: #fff;
    }
}

/* Hero sections */
.hero-section {
    padding: 5rem 1rem;
    text-align: center;
    color: #fff;
}

.hero-section-large {
    padding: 5rem 1rem 5rem;
}

/* Service cards */
.service-card {
    background: var(--wp--preset--color--slate-50);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--wp--preset--color--slate-100);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}
.service-card:hover {
    background: var(--wp--preset--color--brand);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(51, 153, 204, 0.2);
}
.service-card:hover h3,
.service-card:hover p,
.service-card:hover .service-tag {
    color: #fff;
}
.service-card:hover .service-icon {
    background: #fff;
    color: var(--wp--preset--color--brand);
}

.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--wp--preset--color--brand-light);
    color: var(--wp--preset--color--brand);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.service-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp--preset--color--brand);
    margin-top: 1rem;
    transition: color 0.3s;
}

/* Value cards */
.value-card {
    background: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
}
.value-icon {
    width: 4rem;
    height: 4rem;
    background: var(--wp--preset--color--brand-light);
    color: var(--wp--preset--color--brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

/* Contact info items */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.contact-info-icon {
    width: 3rem;
    height: 3rem;
    background: var(--wp--preset--color--brand-light);
    color: var(--wp--preset--color--brand);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}

/* FAQ styling */
.faq-item {
    background: var(--wp--preset--color--slate-50);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}
.faq-item h3 {
    margin-bottom: 0.5rem;
}

.faq-category {
    border-bottom: 2px solid var(--wp--preset--color--brand-light);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--wp--preset--color--brand-dark);
}

/* CTA banner */
.cta-banner {
    background: var(--wp--preset--color--brand-light);
    padding: 2rem;
    border-radius: 1.5rem;
    text-align: center;
}

/* RUT banner */
.rut-banner {
    background: var(--wp--preset--color--brand-light);
    border-top: 1px solid var(--wp--preset--color--brand-light);
    border-bottom: 1px solid var(--wp--preset--color--brand-light);
    padding: 3rem 1rem;
    text-align: center;
}

/* Info box with left border */
.info-box {
    background: var(--wp--preset--color--brand-light);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--wp--preset--color--brand);
    margin-bottom: 1.5rem;
}
.info-box p {
    color: var(--wp--preset--color--brand-dark);
}

/* Check list items */
.check-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    list-style: none;
}
.check-list li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--wp--preset--color--brand);
    flex-shrink: 0;
}

/* Checklist with icon */
.checklist-section h4 {
    color: var(--wp--preset--color--brand-dark);
    margin-bottom: 0.75rem;
}

/* Footer link lists */
.footer-links {
    list-style: none;
    padding: 0;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links li a {
    color: var(--wp--preset--color--slate-600);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links li a:hover {
    color: var(--wp--preset--color--brand);
}

/* Round image */
.rounded-image img {
    border-radius: 1rem;
}

/* Button styles */
.wp-block-button__link {
    transition: all 0.3s ease;
}

.btn-outline {
    background: transparent !important;
    border: 2px solid var(--wp--preset--color--brand) !important;
    color: var(--wp--preset--color--brand) !important;
}
.btn-outline:hover {
    background: var(--wp--preset--color--brand-light) !important;
}

.btn-white-outline {
    background: transparent !important;
    border: 2px solid #fff !important;
    color: #fff !important;
}
.btn-white-outline:hover {
    background: #fff !important;
    color: var(--wp--preset--color--brand) !important;
}

/* Contact form styling (CF7 + generic) */
.contact-form input,
.contact-form select,
.contact-form textarea,
.wpcf7-form input:not([type="hidden"]):not([type="submit"]),
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
    color: #1a1a1a;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus,
.wpcf7-form input:not([type="hidden"]):not([type="submit"]):focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
    border-color: var(--wp--preset--color--brand);
    box-shadow: 0 0 0 3px rgba(51, 153, 204, 0.1);
}
.contact-form label,
.wpcf7-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #333;
}
.contact-form textarea,
.wpcf7-form textarea {
    min-height: 8rem;
    resize: vertical;
}

/* CF7 form layout */
.wpcf7-form p {
    margin-bottom: 1rem;
}

/* CF7 submit button */
.wpcf7-form input[type="submit"] {
    width: 100%;
    padding: 0.875rem 2rem;
    background: var(--wp--preset--color--brand);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(51, 153, 204, 0.3);
    -webkit-appearance: none;
    appearance: none;
}
.wpcf7-form input[type="submit"]:hover {
    background: var(--wp--preset--color--brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(51, 153, 204, 0.4);
}
.wpcf7-form input[type="submit"]:active {
    transform: translateY(0);
}

/* CF7 select dropdown arrow */
.wpcf7-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* CF7 validation messages */
.wpcf7-not-valid-tip {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}
.wpcf7-response-output {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}
.wpcf7-mail-sent-ok {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #166534;
}
.wpcf7-validation-errors {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

/* CF7 acceptance/consent checkbox */
.wpcf7-form .wpcf7-acceptance {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1.25rem 0;
}
.wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
    width: 18px !important;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--wp--preset--color--brand);
    cursor: pointer;
    -webkit-appearance: auto;
    appearance: auto;
    padding: 0;
    border-radius: 4px;
}
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item-label {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item-label a {
    color: var(--wp--preset--color--brand);
    text-decoration: none;
    font-weight: 500;
}
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item-label a:hover {
    text-decoration: underline;
}

/* CF7 spinner */
.wpcf7-spinner {
    margin-left: 0.5rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--wp--preset--color--brand);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.back-to-top:hover {
    background: var(--wp--preset--color--brand-dark);
}
.back-to-top.visible {
    opacity: 1;
}

/* Service detail pages - two column layout */
.service-detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}
.service-detail-row.reverse {
    flex-direction: row-reverse;
}
.service-detail-image,
.service-detail-content {
    flex: 1;
    min-width: 300px;
}
.service-detail-image img {
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Location page cards */
.location-service-card {
    background: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.location-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Success page */
.success-icon {
    width: 5rem;
    height: 5rem;
    background: var(--wp--preset--color--green-100);
    color: var(--wp--preset--color--green-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
}

/* Responsive grid utilities */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Two column flex layout */
.two-col {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
}
.two-col > * {
    flex: 1;
    min-width: 300px;
}

/* Hide honeypot */
.honeypot-field {
    display: none !important;
}

/* Tjänstsidor – responsiva grids för mobil */
@media (max-width: 781px) {
    /* 4-kolumns statistikrad → 2×2 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .stats-grid > div {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    /* 3-kolumns "Vad ingår" → 1 kolumn */
    .included-grid {
        grid-template-columns: 1fr !important;
    }

    /* 3-kolumns processsteg → 1 kolumn */
    .process-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* Footer copyright - förhindra textöverspill på smala skärmar */
@media (max-width: 600px) {
    .wp-block-group .has-text-align-center.has-small-font-size {
        word-break: break-word;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        font-size: 0.75rem;
    }
}
