/*
 * MIRA GROUP shared site styles.
 * Source of truth for universal chrome, typography, shared components,
 * theme variables, and shared layout primitives.
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: only light;
    --mira-gold: #d9a963;
    --mira-gold-light: #fbf6ef;
    --mira-gold-hover: #c99a55;
    --mira-gold-rgb: 217, 169, 99;
    --mira-green: #16341e;
    --mira-green-light: #e8ebe9;
    --mira-green-hover: #0f2615;
    --white: #ffffff;
    --black: #1a1a1a;
    --gray-light: #f8f8f8;
    --gray-medium: #e0e0e0;
    --gray-text: #666666;
    --radius-control: 6px;
    --radius-card: 2px 32px 2px 2px;
    --radius-property-card: 2px 24px 2px 2px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.12);
}

body.theme-hr {
    --mira-gold: #16341e;
    --mira-gold-light: #e8ebe9;
    --mira-gold-hover: #0f2615;
    --mira-gold-rgb: 22, 52, 30;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        "Montserrat",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

button,
input,
textarea,
select {
    font-family: inherit;
}


/* Navigation */
.navbar {
    position: fixed;
    top: 12px;
    left: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    transition: all 0.4s ease;
    transform: translateY(0);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.navbar.compact {
    top: 0;
    left: 12px;
    right: 12px;
    padding: 4px 20px;
    border-radius: 0 0 16px 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar.compact .logo-mg {
    height: 22px;
}

.navbar.compact .logo-text {
    font-size: 12px;
}

.navbar.compact .logo-subtext {
    font-size: 9px;
}

.navbar.compact .logo-divider {
    height: 18px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
}

.logo:visited,
.logo:hover,
.logo:active,
.logo:focus {
    text-decoration: none;
    outline: none;
}

.logo-mg {
    height: 28px;
    width: auto;
    transition: height 0.3s ease;
}

.logo-divider {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transition: height 0.3s ease;
}

.logo-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    letter-spacing: 0.12em;
    font-family: "Montserrat", sans-serif;
    line-height: 1;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: font-size 0.3s ease;
}

.logo-subtext {
    font-size: 11px;
    font-weight: 600;
    color: var(--black);
    letter-spacing: 0.15em;
    font-family: "Montserrat", sans-serif;
    transition: font-size 0.3s ease;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    align-items: flex-start;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-contact {
    font-size: 13px;
    font-weight: 500;
    color: var(--black);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-contact:hover {
    color: var(--mira-gold);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    color: var(--black);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--mira-gold);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--mira-gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 999px;
    padding: 2px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-height: 24px;
    line-height: 1;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    color: var(--gray-text);
    font-family: "Montserrat", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.lang-btn.active {
    background: var(--mira-gold);
    color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.lang-btn:hover:not(.active) {
    color: var(--black);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 1.5px;
    background-color: var(--black);
    transition: all 0.3s ease;
}

/* Shared mobile chrome */
@media (max-width: 768px) {
    .navbar {
        top: 10px;
        left: 12px;
        right: 12px;
        padding: 8px 14px;
    }

    .navbar.compact {
        left: 8px;
        right: 8px;
        padding: 3px 16px;
        border-radius: 0 0 14px 14px;
    }

    .logo-mg {
        height: 24px;
    }

    .logo-text {
        font-size: 12px;
    }

    .logo-subtext {
        font-size: 9px;
    }

    .navbar.compact .logo-mg {
        height: 20px;
    }

    .navbar.compact .logo-text {
        font-size: 11px;
    }

    .navbar.compact .logo-subtext {
        font-size: 8px;
    }

    .nav-right {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
        background: #ffffff;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    .navbar.menu-open .nav-right {
        display: flex;
    }

    .nav-links {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nav-contact {
        font-size: 14px;
    }

    .lang-toggle {
        align-self: flex-start;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .footer {
        padding: 32px 24px 20px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .footer-right {
        align-items: center;
        margin-left: 0;
    }

    .footer-social {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .footer-social-group,
    .footer-contact,
    .footer-links {
        align-items: center;
    }

    .footer-social-divider {
        display: none;
    }
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 48px 24px 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.footer-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.footer-brand-link:hover .footer-brand-name {
    color: var(--mira-gold);
}

.footer-brand-logo {
    height: 36px;
    width: auto;
}

.footer-brand-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-brand-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.12em;
    line-height: 1;
    transition: color 0.2s ease;
}

.footer-brand-sub {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.15em;
    line-height: 1;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--mira-gold);
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    margin-left: auto;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-size: 14px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--mira-gold);
}

.footer-social {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-social-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.footer-social-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}

.footer-social-icons {
    display: flex;
    gap: 10px;
}

.footer-social-divider {
    width: 1px;
    height: 48px;
    background: rgba(255, 255, 255, 0.18);
    align-self: center;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--mira-gold);
    transform: translateY(-2px);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.footer-copyright {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.08em;
    margin: 0;
}

.social-link svg {
    width: 18px;
    height: 18px;
    color: var(--white);
}

.icon-svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(58%) sepia(23%) saturate(1005%) hue-rotate(353deg)
        brightness(90%) contrast(86%);
}

.form-status,
.contact-popup-status {
    min-height: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--gray-text);
}

.form-status.is-success,
.contact-popup-status.is-success {
    color: #137333;
}

.form-status.is-error,
.contact-popup-status.is-error {
    color: #b42318;
}

.form-status.is-pending,
.contact-popup-status.is-pending {
    color: var(--gray-text);
}

.form-status a,
.contact-popup-status a {
    color: currentColor;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.service-card-icon .icon-svg,
.property-feature .icon-svg {
    width: 22px;
    height: 22px;
}

.service-card-btn .icon-svg {
    width: 16px;
    height: 16px;
}

.contact-item .icon-svg {
    width: 15px;
    height: 15px;
    filter: none;
}

.social-link .icon-svg {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.social-link:hover .icon-svg {
    filter: none;
}

/* Contact CTA Section */
.contact-cta-section {
    padding: 56px 24px;
    background: #1a1a1a;
    text-align: center;
}

.contact-cta-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-cta-icon {
    width: 64px;
    height: 64px;
    background: var(--mira-gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.contact-cta-icon .icon-svg {
    width: 30px;
    height: 30px;
}

.contact-cta-title {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    font-family: "Montserrat", sans-serif;
}

.contact-cta-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    line-height: 1.7;
    font-family: "Montserrat", sans-serif;
}

.contact-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--mira-gold);
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.contact-cta-btn:hover {
    background: var(--mira-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(217, 169, 99, 0.3);
}

.contact-cta-btn .icon-svg {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
    .contact-cta-section {
        padding: 44px 20px;
    }

    .contact-cta-title {
        font-size: 24px;
    }

    .contact-cta-icon {
        width: 56px;
        height: 56px;
    }

    .contact-cta-icon .icon-svg {
        width: 26px;
        height: 26px;
    }
}

/* System consolidation overrides */
body.theme-group .logo-subtext {
    color: var(--black);
}

body.theme-re .logo-subtext,
body.theme-hr .logo-subtext {
    color: var(--mira-gold);
}

button,
input,
textarea,
select,
.nav-contact,
.cta-button,
.primary-btn,
.secondary-btn,
.search-btn,
.filter-btn,
.city-tab,
.location-tab,
.category-tab,
.service-link,
.explore-link,
.view-role-btn,
.submit-button,
.contact-button {
    border-radius: var(--radius-control);
}

.lang-toggle,
.lang-btn {
    border-radius: 999px;
}

.property-badge,
.status-badge,
.badge {
    border-radius: 4px;
}

.service-card,
.division-card,
.value-card,
.team-card,
.why-card,
.model-card,
.commitment-card,
.explore-card,
.position-card,
.process-step,
.testimonial-card,
.location-card,
.stat-card {
    border-radius: var(--radius-card);
}

.service-card,
.division-card,
.value-card,
.why-card,
.model-card,
.commitment-card,
.explore-card,
.position-card,
.process-step,
.testimonial-card,
.location-card,
.stat-card {
    position: relative;
    overflow: hidden;
}

.service-card:hover,
.division-card:hover,
.value-card:hover,
.team-card:hover,
.why-card:hover,
.model-card:hover,
.commitment-card:hover,
.explore-card:hover,
.position-card:hover,
.process-step:hover,
.testimonial-card:hover,
.location-card:hover,
.stat-card:hover {
    transform: translateY(-4px);
}

.nav-contact,
.cta-button,
.primary-btn,
.secondary-btn,
.search-btn,
.submit-button {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-card-header,
.division-card,
.value-card,
.why-card,
.model-card,
.commitment-card,
.explore-card,
.position-card,
.process-step,
.testimonial-card,
.location-card,
.stat-card {
    background-image: none;
}

.service-icon,
.service-card-icon,
.value-icon,
.why-icon,
.model-icon,
.commitment-icon,
.explore-icon,
.process-icon,
.stat-icon,
.location-marker,
.map-marker {
    border-radius: var(--radius-control);
}

.nav-link .icon-svg.nav-link-icon,
.nav-link-icon {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    display: block;
}

@media (max-width: 768px) {
    .services-grid {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .service-card {
        width: 100%;
        flex: 0 0 auto;
    }
}

/* Final source cleanup for migrated icon blocks */
.service-icon,
.service-card-icon,
.value-icon,
.why-icon,
.model-icon,
.commitment-icon,
.explore-icon,
.process-icon,
.stat-icon,
.advantage-icon,
.contact-method-icon,
.qr-icon,
.filter-icon,
.feature-icon {
    border-radius: var(--radius-control);
}

/* Shared design convergence */
.nav-right {
    gap: 20px;
}

.navbar .nav-contact {
    position: relative;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--black);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    text-decoration: none;
    text-transform: none;
    transition: color 0.2s ease;
}

.navbar .nav-contact::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--mira-gold);
    transition: width 0.3s ease;
}

.navbar .nav-contact:hover,
.navbar .nav-contact.active {
    background: transparent;
    color: var(--mira-gold);
    transform: none;
    box-shadow: none;
}

.navbar .nav-contact:hover::after,
.navbar .nav-contact.active::after {
    width: 100%;
}

.service-card,
.value-card,
.why-card,
.model-card,
.commitment-card,
.explore-card,
.position-card,
.testimonial-card,
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-medium);
    box-shadow: var(--shadow-soft);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.service-card:hover,
.value-card:hover,
.why-card:hover,
.model-card:hover,
.commitment-card:hover,
.explore-card:hover,
.position-card:hover,
.testimonial-card:hover,
.stat-card:hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

.team-card:hover {
    transform: none;
}

.team-card:nth-child(3n + 2):hover {
    transform: translateY(48px);
}

.ops-panel:hover {
    transform: none;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.12);
}

.ops-panel::before {
    top: 18px;
    left: 18px;
}


.service-icon,
.value-icon,
.why-icon,
.model-icon,
.commitment-icon,
.explore-icon,
.position-icon,
.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-control);
}

.service-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-control);
}

.service-icon .icon-svg,
.service-card-icon .icon-svg,
.value-icon .icon-svg,
.why-icon .icon-svg,
.model-icon .icon-svg,
.commitment-icon .icon-svg,
.explore-icon .icon-svg,
.position-icon .icon-svg,
.stat-icon .icon-svg {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.contact-cta-icon,
.about-cta-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

.contact-cta-icon .icon-svg {
    width: 36px;
    height: 36px;
}

.about-cta-icon .icon-svg {
    width: 32px;
    height: 32px;
}

.service-card-btn .icon-svg,
.cta-btn .icon-svg,
.about-cta-btn .icon-svg,
.division-link .icon-svg,
.explore-card-cta .icon-svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.contact-cta-btn .icon-svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.cta-btn-primary .icon-svg,
.cta-btn-secondary .icon-svg,
.contact-cta-btn .icon-svg,
.about-cta-btn .icon-svg,
.calc-cta-btn .icon-svg,
.nofit-cta .icon-svg {
    filter: brightness(0) invert(1);
}

/* Shared mobile chrome convergence */
@media (max-width: 768px) {
    html body .navbar .nav-right {
        align-items: flex-end;
        gap: 10px;
        padding: 18px;
        text-align: right;
    }

    html body .navbar .nav-links {
        align-items: flex-end;
        gap: 8px;
    }

    html body .navbar .nav-link,
    html body .navbar .nav-contact {
        display: inline-flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        min-height: 44px;
        padding: 0;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.2;
        text-align: right;
    }

    html body .navbar .nav-link::after,
    html body .navbar .nav-contact::after {
        left: auto;
        right: 0;
    }

    html body .navbar .nav-link::after {
        bottom: 2px;
        width: 28px;
        opacity: 0;
        transform: scaleX(0);
        transform-origin: right center;
    }

    html body .navbar .nav-link:hover::after,
    html body .navbar .nav-link.active::after {
        width: 28px;
        opacity: 1;
        transform: scaleX(1);
    }

    html body .navbar .nav-contact {
        background: transparent;
        border: 0;
        box-shadow: none;
        color: var(--black);
        letter-spacing: 0;
        text-transform: none;
        transform: none;
    }

    html body .navbar .lang-toggle {
        align-self: flex-end;
        min-height: 40px;
        padding: 3px;
        cursor: pointer;
    }

    html body .navbar .lang-btn {
        min-width: 42px;
        min-height: 34px;
        padding: 8px 12px;
        pointer-events: none;
    }

    html body .navbar .mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    html body .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    html body .footer-right {
        width: 100%;
        align-items: center;
        margin-left: 0;
    }

    html body .footer-social {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
    }

    html body .footer-social-group,
    html body .footer-contact,
    html body .footer-links {
        align-items: center;
    }

    html body .footer-social-divider {
        display: none;
    }
}
