/* assets/css/public-layout.css - shared layout for public pages (header, mobile navigation,
 * footer, floating buttons, chat). Generated from index.php and linked after each page's <style>. */

body.dark-mode .header {
    background: #0f1f30;
    border-bottom-color: #1a3348;
}

body.dark-mode .logo {
    color: #e8edf2;
}

body.dark-mode .nav a {
    color: #b0c8db;
}

body.dark-mode .nav a:hover {
    color: white;
}

body.dark-mode .nav .btn-nav {
    background: #1a7ab5;
    border-color: #1a7ab5;
}

body.dark-mode .footer {
    background: #060f1a;
}

body.dark-mode .sidebar-nav {
    background: #0f1f30;
}

body.dark-mode .sidebar-nav a {
    color: #b0c8db;
    border-bottom-color: #1a3348;
}

body.dark-mode .sidebar-nav .logo-side {
    color: #e8edf2;
}

body.dark-mode .sidebar-nav .close-btn {
    color: #e8edf2;
}

body.dark-mode .fab-btn {
    background: #1a2a3f;
    color: #e8edf2;
}

body.dark-mode .fab-btn .tooltip {
    background: #1a2a3f;
    color: #e8edf2;
    border-color: #1a3348;
}

body.dark-mode .fab-btn .tooltip::after {
    border-left-color: #1a2a3f;
}

body.dark-mode .fab-btn-primary {
    background: #1a7ab5;
    color: white;
}

body.dark-mode .fab-popup {
    background: #0f1f30;
    border-color: #1a3348;
}

body.dark-mode .fab-popup h4 {
    color: #e8edf2;
}

body.dark-mode .fab-popup .phone-item {
    border-bottom-color: #1a3348;
}

body.dark-mode .fab-popup .phone-item a {
    color: #4a9fd8;
}

body.dark-mode .fab-popup .copy-btn {
    color: #b0c8db;
}

body.dark-mode .fab-popup .copy-btn:hover {
    background: #1a3348;
    color: white;
}

body.dark-mode .chat-modal {
    background: #0f1f30;
    border-color: #1a3348;
}

body.dark-mode .chat-header {
    background: #0a1628;
    border-bottom-color: #1a3348;
}

body.dark-mode .chat-header h3 {
    color: #e8edf2;
}

body.dark-mode .chat-messages {
    background: #0f1f30;
}

body.dark-mode .chat-message.bot {
    background: #1a2a3f;
    color: #e8edf2;
}

body.dark-mode .chat-message.user {
    background: #1a7ab5;
    color: white;
}

body.dark-mode .chat-input {
    background: #0f1f30;
    border-top-color: #1a3348;
}

body.dark-mode .chat-input input {
    background: #1a2a3f;
    color: #e8edf2;
    border-color: #1a3348;
}

body.dark-mode .chat-input input::placeholder {
    color: #6a8aa0;
}

body.dark-mode .chat-input button {
    background: #1a7ab5;
    color: white;
}

.header {
    background: #ffffff;
    border-bottom: 1px solid #e4eef8;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: background 0.3s, border-color 0.3s;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 800;
    color: #082433;
    text-decoration: none;
    transition: color 0.3s;
}

.logo i {
    color: #1a7ab5;
    font-size: 2rem;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: #082433;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 200;
}

body.dark-mode .hamburger {
    color: #e8edf2;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sidebar-nav {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: #ffffff;
    z-index: 200;
    padding: 2rem 1.5rem;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}

.sidebar-nav.open {
    left: 0;
}

.sidebar-nav .close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #082433;
    cursor: pointer;
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    transition: color 0.3s;
}

.sidebar-nav .logo-side {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: #082433;
    margin-bottom: 2rem;
    transition: color 0.3s;
}

.sidebar-nav .logo-side i {
    color: #1a7ab5;
}

.sidebar-nav a {
    display: block;
    padding: 0.8rem 0;
    color: #1d4a6b;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    border-bottom: 1px solid #eef4f9;
    transition: 0.15s;
}

.sidebar-nav a:hover {
    color: #082433;
    padding-left: 8px;
}

.sidebar-nav .btn-nav-side {
    display: inline-block;
    background: #082433;
    color: white;
    padding: 0.7rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    text-align: center;
    margin-top: 1.5rem;
    width: 100%;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

.sidebar-nav .btn-nav-side:hover {
    background: #13415b;
}

body.dark-mode .sidebar-nav .btn-nav-side {
    background: #1a7ab5;
}

.sidebar-nav .btn-nav-side-signin {
    display: block;
    border: 1.5px solid #1a7ab5;
    color: #1a7ab5;
    padding: 0.65rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    margin-top: 1.5rem;
    width: 100%;
}

.sidebar-nav .btn-nav-side-signin + .btn-nav-side {
    margin-top: 0.7rem;
}

.sidebar-nav .btn-nav-side-signin:hover {
    padding-left: 2rem;
    background: #e6f2fc;
}

body.dark-mode .sidebar-nav .btn-nav-side-signin {
    color: #7cc0ef;
    border-color: #7cc0ef;
}

body.dark-mode .sidebar-nav .btn-nav-side-signin:hover {
    background: #1a3348;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #1d4a6b;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.15s;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1a7ab5;
    transition: 0.25s;
}

.nav a:hover::after {
    width: 100%;
}

.nav a:hover {
    color: #082433;
}

.nav .btn-nav {
    background: #082433;
    color: white;
    padding: 0.5rem 1.8rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.15s;
    border: 1px solid #1a3f59;
}

.nav .btn-nav::after {
    display: none;
}

.nav .btn-nav-signin {
    color: #1a7ab5;
    font-weight: 600;
}

body.dark-mode .nav .btn-nav-signin {
    color: #7cc0ef;
}

.nav .btn-nav:hover {
    background: #13415b;
    transform: scale(1.03);
}

body.dark-mode .nav .btn-nav {
    background: #1a7ab5;
    border-color: #1a7ab5;
}

.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 999;
}

.fab-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: auto;
}

.fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #082433;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.fab-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.fab-btn .tooltip {
    position: absolute;
    right: 62px;
    background: #082433;
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fab-btn .tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #082433;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.fab-btn:hover .tooltip {
    opacity: 1;
}

.fab-btn-primary {
    background: #1a7ab5;
    color: white;
    width: 58px;
    height: 58px;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px rgba(26, 122, 181, 0.4);
}

.fab-btn-primary:hover {
    background: #0f5f92;
    transform: scale(1.1);
}

.fab-btn-scroll {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.fab-btn-scroll.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.fab-popup {
    position: absolute;
    right: 62px;
    bottom: 0;
    background: white;
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    border: 1px solid #e4eef8;
    display: none;
    z-index: 1000;
}

.fab-popup.open {
    display: block;
    animation: slideInRight 0.3s ease;
}

.fab-popup h4 {
    font-size: 0.85rem;
    color: #6a8aa0;
    margin-bottom: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fab-popup .phone-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eef4f9;
}

.fab-popup .phone-item:last-child {
    border-bottom: none;
}

.fab-popup .phone-item .icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.fab-popup .phone-item .icon-wrap.whatsapp {
    background: #25D366;
    color: white;
}

.fab-popup .phone-item .icon-wrap.call {
    background: #1a7ab5;
    color: white;
}

.fab-popup .phone-item .phone-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fab-popup .phone-item .phone-info .label {
    font-size: 0.7rem;
    color: #6a8aa0;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.fab-popup .phone-item .phone-info .number {
    font-size: 0.95rem;
    font-weight: 600;
    color: #082433;
    text-decoration: none;
}

.fab-popup .phone-item .phone-info .number:hover {
    color: #1a7ab5;
}

.fab-popup .copy-btn {
    background: none;
    border: none;
    color: #6a8aa0;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.15s;
    flex-shrink: 0;
}

.fab-popup .copy-btn:hover {
    background: #e6f2fc;
    color: #1a7ab5;
}

.chat-modal {
    position: absolute;
    right: 62px;
    bottom: 0;
    width: 360px;
    height: 450px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e4eef8;
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    animation: slideInRight 0.3s ease;
}

.chat-modal.open {
    display: flex;
}

.chat-header {
    background: #f8fafc;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #e4eef8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #082433;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-header h3 i {
    color: #1a7ab5;
}

.chat-header .close-chat {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6a8aa0;
    cursor: pointer;
    padding: 4px;
}

.chat-header .close-chat:hover {
    color: #082433;
}

/* New chat (left of the close button) */
.chat-header .new-chat {
    background: none;
    border: none;
    font-size: 0.95rem;
    color: #6a8aa0;
    cursor: pointer;
    padding: 4px 6px;
    margin-left: auto;
    margin-right: 0.4rem;
}

.chat-header .new-chat:hover {
    color: #1a7ab5;
}

/* "Was this helpful?" under an answer */
.chat-feedback {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(106, 138, 160, 0.2);
    font-size: 0.75rem;
    color: #6a8aa0;
}

.chat-feedback button {
    background: none;
    border: none;
    color: #6a8aa0;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.chat-feedback button:hover {
    color: #1a7ab5;
    background: rgba(26, 122, 181, 0.1);
}

body.dark-mode .chat-header .new-chat,
body.dark-mode .chat-feedback,
body.dark-mode .chat-feedback button {
    color: #8aa4ba;
}

body.dark-mode .chat-header .new-chat:hover,
body.dark-mode .chat-feedback button:hover {
    color: #4a9fd8;
}

.chat-messages {
    flex: 1;
    padding: 1rem 1.2rem;
    overflow-y: auto;
    background: #fafcff;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-message {
    max-width: 80%;
    padding: 0.7rem 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-message.bot {
    background: #eef4f9;
    color: #082433;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: #1a7ab5;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.bot a {
    color: #1a7ab5;
    word-break: break-all;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.chat-suggestions button {
    background: #ffffff;
    border: 1px solid #c8dced;
    color: #1a7ab5;
    border-radius: 60px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.chat-suggestions button:hover {
    background: #e6f2fc;
}

body.dark-mode .chat-message.bot a {
    color: #4a9fd8;
}

body.dark-mode .chat-suggestions button {
    background: #0f1f30;
    border-color: #1a3348;
    color: #4a9fd8;
}

.chat-message .typing {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.chat-message .typing span {
    width: 8px;
    height: 8px;
    background: #6a8aa0;
    border-radius: 50%;
    animation: typing 1.2s infinite;
}

.chat-message .typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-message .typing span:nth-child(3) {
    animation-delay: 0.4s;
}

.chat-input {
    padding: 0.8rem 1.2rem;
    border-top: 1px solid #e4eef8;
    display: flex;
    gap: 0.5rem;
    background: white;
    flex-shrink: 0;
}

.chat-input input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid #dce8f2;
    border-radius: 60px;
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
    transition: 0.15s;
}

.chat-input input:focus {
    border-color: #1a7ab5;
}

.chat-input button {
    background: #1a7ab5;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 60px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.15s;
}

.chat-input button:hover {
    background: #0f5f92;
}

.footer {
    background: #082433;
    color: #c8dcec;
    margin-top: 4rem;
    padding: 3.5rem 2rem 1.5rem;
    transition: background 0.3s;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.footer-brand h3 i {
    color: #4a9fd8;
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.8;
    max-width: 350px;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.2rem;
}

.footer-socials a {
    color: #c8dcec;
    background: rgba(255, 255, 255, 0.06);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    text-decoration: none;
    font-size: 1.1rem;
}

.footer-socials a:hover {
    background: #1a7ab5;
    color: white;
    transform: translateY(-3px);
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    letter-spacing: 0.3px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul a {
    color: #a8c4db;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.15s;
}

.footer-col ul a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: #a8c4db;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    .hamburger {
        display: block;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }
    .header {
        padding: 0 1rem;
    }
    .sidebar-nav {
        width: 280px;
        left: -300px;
    }
    .fab-container {
        bottom: 20px;
        right: 20px;
        gap: 8px;
    }
    .fab-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    .fab-btn-primary {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    .fab-btn .tooltip {
        display: none;
    }
    .chat-modal {
        position: fixed;
        right: 10px;
        bottom: 80px;
        width: calc(100% - 20px);
        max-width: 380px;
        height: 70vh;
        max-height: 500px;
        border-radius: 16px;
        animation: slideUp 0.3s ease;
    }
    .fab-popup {
        position: fixed;
        right: 10px;
        bottom: 80px;
        min-width: 200px;
        padding: 1rem 1.2rem;
        animation: slideUp 0.3s ease;
    }
    .sidebar-nav {
        width: 280px;
        left: -300px;
    }
}

@media (max-width: 480px) {
    .fab-container {
        bottom: 15px;
        right: 15px;
        gap: 6px;
    }
    .fab-btn {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
    .fab-btn-primary {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    .chat-modal {
        right: 8px;
        bottom: 70px;
        width: calc(100% - 16px);
        max-width: 340px;
        height: 65vh;
        max-height: 450px;
        border-radius: 14px;
    }
    .chat-header {
        padding: 0.6rem 1rem;
    }
    .chat-header h3 {
        font-size: 0.85rem;
    }
    .chat-messages {
        padding: 0.8rem;
    }
    .chat-message {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    .chat-input {
        padding: 0.5rem 0.8rem;
    }
    .chat-input input {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    .chat-input button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    .fab-popup {
        right: 8px;
        bottom: 70px;
        min-width: 160px;
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 360px) {
    .chat-modal {
        right: 5px;
        bottom: 65px;
        width: calc(100% - 10px);
        max-width: 300px;
        height: 60vh;
        max-height: 400px;
    }
    .fab-popup {
        right: 5px;
        bottom: 65px;
        min-width: 140px;
        padding: 0.6rem 0.8rem;
    }
    .fab-popup h4 {
        font-size: 0.7rem;
    }
}

@keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(10px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

@keyframes slideUp {
                from {
                    opacity: 0;
                    transform: translateY(20px);
                }
                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }

@keyframes typing {
            0%,
            60%,
            100% {
                transform: translateY(0);
                opacity: 0.4;
            }
            30% {
                transform: translateY(-6px);
                opacity: 1;
            }
        }

/* Current page in the header and mobile navigation */
.nav a.active {
    color: #1a7ab5;
}
.nav a.active::after {
    width: 100%;
}
body.dark-mode .nav a.active {
    color: #4a9fd8;
}
.sidebar-nav a.active {
    color: #1a7ab5;
    font-weight: 600;
}

/* The Get Started button stays readable on its own page */
.nav a.btn-nav.active,
.sidebar-nav a.btn-nav-side.active {
    color: #ffffff;
}
