:root {
    --hub-primary: #0d6efd;
    --hub-dark: #212529;
    --hub-text: #334155;
    --hub-heading: #0f172a;
    --hub-footer-bg: #0f172a;
    --hub-section-pad: clamp(3rem, 6vw, 5rem);
    --hub-container-max: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    color: var(--hub-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    top: 0 !important;
}

img,
picture,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

.hub-content-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.hub-media-frame {
    overflow: hidden;
    border-radius: 1rem;
    background: #f1f5f9;
}

.hub-media-frame .hub-content-image {
    aspect-ratio: 16 / 10;
}

.content-block-narrow {
    max-width: 900px;
}

/* Navbar */
.site-navbar {
    transition: padding 0.25s ease, box-shadow 0.25s ease;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    min-height: 72px;
}

.site-navbar .navbar-brand {
    font-weight: 800;
    font-size: clamp(1.15rem, 2.8vw, 1.55rem);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: calc(100% - 3.5rem);
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

.site-navbar .brand-logo {
    height: clamp(44px, 6.5vw, 56px);
    width: auto;
    max-width: none;
    flex-shrink: 0;
    object-fit: contain;
}

.site-navbar .brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-navbar .nav-link {
    font-weight: 600;
    color: var(--hub-dark) !important;
    position: relative;
    padding: 0.5rem 0.75rem !important;
}

.site-navbar .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0.25rem;
    left: 0.75rem;
    background: var(--hub-primary);
    transition: width 0.25s ease;
}

.site-navbar .nav-link:hover::after {
    width: calc(100% - 1.5rem);
}

.site-navbar .navbar-actions {
    gap: 0.5rem;
}

.site-navbar .btn {
    font-weight: 700;
    white-space: nowrap;
}

/* Hero */
.hero-section {
    position: relative;
    min-height: clamp(420px, 72vh, 760px);
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.45) 55%, rgba(15, 23, 42, 0.55) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-row {
    min-height: clamp(320px, 58vh, 620px);
}

.hero-content {
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.hero-content h1,
.hero-content h2,
.hero-content h3 {
    font-weight: 800;
    font-size: clamp(1.85rem, 4.5vw, 3.25rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    color: #fff;
}

.hero-content p {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    margin-bottom: 1.75rem;
    opacity: 0.95;
    max-width: 42rem;
}

.hero-content .text-center p {
    margin-left: auto;
    margin-right: auto;
}

.hero-content .text-end p {
    margin-left: auto;
}

.hero-content .d-flex,
.hero-content .btn-group {
    flex-wrap: wrap;
    gap: 0.75rem !important;
}

/* Sections */
.block-section {
    padding: var(--hub-section-pad) 0;
}

.block-section h2,
.section-header h2 {
    font-weight: 800;
    color: var(--hub-heading);
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.section-header p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.content p,
.content li {
    line-height: 1.75;
    font-size: clamp(1rem, 1.8vw, 1.08rem);
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

.content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.content a.btn,
.hero-content a.btn {
    text-decoration: none !important;
    color: #fff !important;
}

.content a:not(.btn),
.hero-content a:not(.btn) {
    color: var(--hub-primary);
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    border-radius: 999px;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.38);
}

.btn-outline-light,
.btn-outline-primary {
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    border-radius: 999px;
    border-width: 2px;
}

/* Cards */
.feature-card {
    border-radius: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1) !important;
}

.feature-icon {
    font-size: clamp(2rem, 4vw, 2.5rem);
    line-height: 1;
}

.card h4 {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 700;
}

/* Footer */
.site-footer {
    background: var(--hub-footer-bg);
    color: #fff;
    padding: clamp(3rem, 6vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
}

.site-footer h5,
.site-footer h6 {
    color: #fff !important;
    font-weight: 700;
}

.site-footer h6 {
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.72) !important;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer a:hover {
    color: #fff !important;
    padding-left: 4px;
}

.site-footer .text-muted,
.site-footer .text-white-50 {
    color: rgba(255, 255, 255, 0.72) !important;
}

.site-footer hr {
    border-top-color: rgba(255, 255, 255, 0.12) !important;
}

/* WhatsApp widget */
.whatsapp-widget {
    position: fixed;
    bottom: clamp(1rem, 3vw, 1.75rem);
    right: clamp(1rem, 3vw, 1.75rem);
    background-color: #25d366;
    color: #fff;
    width: clamp(52px, 12vw, 60px);
    height: clamp(52px, 12vw, 60px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    z-index: 9999;
    transition: transform 0.25s ease;
}

.whatsapp-widget:hover {
    transform: scale(1.08);
    color: #fff;
}

/* Google Translate — keep widget fully visible; fix layout only */
.hub-translate-widget,
#google_translate_element {
    display: inline-flex;
    align-items: center;
    line-height: normal;
    vertical-align: middle;
    max-width: 100%;
}

#google_translate_element .goog-te-gadget {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
    color: var(--hub-dark) !important;
    font-size: 0.875rem !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap;
    gap: 0.4rem;
    white-space: nowrap;
}

#google_translate_element .goog-te-gadget-simple {
    background: #fff !important;
    border: 1px solid rgba(15, 23, 42, 0.14) !important;
    border-radius: 0.5rem !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 1.3 !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap;
    gap: 0.35rem;
    height: auto !important;
    min-height: 40px;
    box-shadow: none !important;
    vertical-align: middle;
}

#google_translate_element .goog-te-gadget-simple .goog-te-menu-value {
    margin: 0 0 0 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap;
}

#google_translate_element .goog-te-gadget-simple .goog-te-menu-value span {
    color: var(--hub-dark) !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    line-height: 1.3 !important;
    white-space: nowrap;
}

#google_translate_element .goog-te-gadget-simple .goog-te-menu-value span:first-child {
    border-left: 1px solid rgba(15, 23, 42, 0.12) !important;
    padding-left: 0.45rem !important;
    margin-left: 0.15rem !important;
}

#google_translate_element .goog-te-gadget-icon {
    float: none !important;
    margin: 0 !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
}

/* Global img { display:block } breaks the inline translate control */
#google_translate_element img {
    display: inline-block !important;
    max-width: none !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    vertical-align: middle;
}

#google_translate_element .goog-te-gadget a {
    color: var(--hub-dark) !important;
    text-decoration: none !important;
}

#google_translate_element .goog-te-gadget > span {
    color: #64748b !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
}

.site-navbar .nav-translate {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-navbar .nav-translate .skiptranslate {
    display: inline-flex !important;
    align-items: center;
}

.goog-te-menu-frame {
    z-index: 1100 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
    border-radius: 0.5rem !important;
}

/* Tablet */
@media (max-width: 991.98px) {
    .site-navbar .navbar-collapse {
        padding-top: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .site-navbar .navbar-nav {
        align-items: stretch !important;
    }

    .site-navbar .navbar-actions {
        width: 100%;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
    }

    .site-navbar .navbar-actions .nav-item {
        width: 100%;
        margin: 0 0 0.5rem !important;
    }

    .site-navbar .navbar-actions .btn,
    .site-navbar .navbar-actions .nav-link {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .site-navbar .navbar-actions .nav-link::after {
        display: none;
    }

    .site-navbar .nav-translate {
        width: auto;
        align-self: flex-start;
        margin-top: 0.35rem;
        margin-bottom: 0.35rem;
        overflow-x: auto;
        max-width: 100%;
    }

    #google_translate_element,
    .hub-translate-widget {
        width: auto;
        max-width: 100%;
    }

    #google_translate_element .goog-te-gadget {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }

    .hub-media-frame .hub-content-image {
        aspect-ratio: 4 / 3;
    }
}

/* Mobile */
@media (max-width: 575.98px) {
    .site-navbar .brand-text {
        max-width: 12.5rem;
    }

    .site-navbar .brand-logo {
        height: 46px;
    }

    .hero-content .btn,
    .hero-content a.btn {
        width: 100%;
        text-align: center;
    }

    .feature-card {
        padding: 1.25rem !important;
    }

    .site-footer .row > [class*='col-'] {
        text-align: center;
    }

    .site-footer ul {
        padding-left: 0;
    }

    .site-footer .d-flex.gap-3 {
        justify-content: center;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: var(--hub-container-max);
    }
}

/* Fonts from admin Quill editor (class-based) */
.content .ql-font-arial,
.hero-content .ql-font-arial {
    font-family: Arial, Helvetica, sans-serif;
}
.content .ql-font-georgia,
.hero-content .ql-font-georgia {
    font-family: Georgia, 'Times New Roman', serif;
}
.content .ql-font-times-new-roman,
.hero-content .ql-font-times-new-roman {
    font-family: 'Times New Roman', Times, serif;
}
.content .ql-font-verdana,
.hero-content .ql-font-verdana {
    font-family: Verdana, Geneva, sans-serif;
}
.content .ql-font-trebuchet-ms,
.hero-content .ql-font-trebuchet-ms {
    font-family: 'Trebuchet MS', Helvetica, sans-serif;
}
.content .ql-font-inter,
.hero-content .ql-font-inter {
    font-family: Inter, system-ui, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
