/* ============================================================
   Vision CMS - Professional Accounting Firm Theme
   ============================================================ */

/* --- CSS Custom Properties (Defaults - overridden by tenant) --- */
:root {
    --primary-color: #1d3f94;
    --secondary-color: #19367f;
    --accent-color: #e74c3c;
    --header-bg: #ffffff;
    --footer-bg: #19367f;

    --primary-light: #2555b0;
    --primary-dark: #142d6b;
    --text-color: #333333;
    --text-muted: #6c757d;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

/* --- Base --- */
html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Top Bar --- */
.top-bar {
    background-color: var(--white);
    color: var(--text-color);
    padding: 12px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.top-bar a {
    color: var(--text-color);
    text-decoration: none;
}

.top-bar a:hover {
    color: var(--primary-color);
}

.top-bar-logo {
    display: inline-block;
}

.top-bar-contact span {
    margin-right: 1.5rem;
}

.top-bar-contact i {
    margin-right: 5px;
    color: var(--primary-color);
}

.top-bar-search .search-toggle {
    color: var(--text-color);
    font-size: 1rem;
    text-decoration: none;
}

.top-bar-search .search-toggle:hover {
    color: var(--primary-color);
}

.top-bar-search .search-input {
    width: 0;
    padding: 0;
    border: none;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    font-size: 0.85rem;
}

.top-bar-search .search-form.open .search-input {
    width: 200px;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    opacity: 1;
}

.top-bar-search .search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.15rem rgba(29, 63, 148, 0.15);
}

/* --- Header / Navigation --- */
.site-header {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.main-navigation {
    padding: 0;
    background-color: var(--primary-color);
}

.site-logo {
    height: 55px;
    width: auto;
    max-width: 300px;
}

.brand-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.main-navigation .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.9rem 1rem !important;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.main-navigation .nav-link:hover,
.main-navigation .nav-link:focus {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
}

.main-navigation .dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-top: 3px solid var(--accent-color);
    border-radius: 0 0 4px 4px;
    padding: 0.5rem 0;
    min-width: 220px;
}

.main-navigation .dropdown-item {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.main-navigation .dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding-left: 1.5rem;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.4rem 0.7rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
}

.hero-section .btn {
    padding: 0.7rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Page Header / Banner --- */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* --- Breadcrumbs --- */
.breadcrumb-wrapper {
    background-color: var(--light-bg);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    margin-bottom: 0;
    background: none;
    padding: 0;
    font-size: 0.85rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Section Titles --- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 0.7rem auto 0;
}

.text-start .section-title::after,
.section-title.text-start::after {
    margin-left: 0;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto 2rem;
}

/* --- Service Cards --- */
.service-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.service-card .service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    color: var(--white);
    font-size: 1.6rem;
}

.service-card h4 {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.service-card .btn-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

.service-card .btn-link:hover {
    color: var(--accent-color);
}

/* --- News / Blog Cards --- */
.news-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.news-card-image {
    height: 200px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 1.5rem;
}

.news-card-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.news-card-date i {
    margin-right: 5px;
    color: var(--primary-color);
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-card-title a {
    color: var(--secondary-color);
}

.news-card-title a:hover {
    color: var(--primary-color);
}

.news-card-summary {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.read-more-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more-link:hover i {
    transform: translateX(5px);
}

/* --- Team Member Cards --- */
.team-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.team-card-photo {
    height: 250px;
    overflow: hidden;
    background-color: var(--light-bg);
}

.team-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card-body {
    padding: 1.5rem;
}

.team-card-body h5 {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
}

.team-card-body .team-role {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.team-card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Partner Logos --- */
.partner-logos-section {
    padding: 3rem 0;
    background-color: var(--light-bg);
}

.partner-logos-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.partner-logo-item {
    flex: 0 0 auto;
    max-width: 150px;
}

.partner-logo-item img {
    max-height: 60px;
    width: auto;
    transition: var(--transition);
}

.partner-logo-item:hover img {
    opacity: 0.8;
}

/* --- Partner Logo (Homepage featured + row layout) --- */
.partner-logo-featured {
    max-height: 100px;
    width: auto;
    transition: var(--transition);
}

.partner-logo-featured:hover {
    opacity: 0.8;
}

img.partner-logo-item {
    max-height: 50px;
    width: auto;
    transition: var(--transition);
}

img.partner-logo-item:hover {
    opacity: 0.8;
}

/* --- Service Cards (Dark Blue Background) --- */
.services-section {
    background-color: var(--primary-color);
}

.service-card-dark {
    background: transparent;
    border-radius: 8px;
    transition: var(--transition);
}

.service-card-dark:hover {
    background: rgba(255, 255, 255, 0.05);
}

.service-illustration {
    max-height: 120px;
    width: auto;
}

/* --- Team / CTA Section --- */
.team-cta-section {
    overflow: hidden;
}

.team-cta-section h2 {
    line-height: 1.3;
}

.team-cta-section img {
    max-height: 400px;
    object-fit: cover;
}

/* --- Social Icon Images --- */
.social-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: var(--transition);
}

.social-link:hover .social-icon-img {
    opacity: 0.8;
    transform: scale(1.1);
}

.footer-social .social-link .social-icon-img {
    width: 20px;
    height: 20px;
}

/* --- Footer Description --- */
.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--footer-bg);
    color: rgba(255, 255, 255, 0.8);
    padding: 3.5rem 0 0;
}

.footer-heading {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.7rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-contact p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--accent-color);
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact a:hover {
    color: var(--white);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-social .social-links {
    margin-top: 0.5rem;
}

.footer-social .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    margin-right: 8px;
    transition: var(--transition);
}

.footer-social .social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    margin-top: 2.5rem;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin-bottom: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a:hover {
    color: var(--white);
}

/* --- Contact Form --- */
.contact-form .form-control,
.contact-form .form-select {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.7rem 1rem;
    transition: var(--transition);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 82, 118, 0.15);
}

.contact-form label {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
}

.contact-form .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.7rem 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-form .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
}

.btn-accent:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    color: var(--white);
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1040;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* --- Social Links (general) --- */
.social-links .social-link {
    color: var(--text-muted);
    margin-right: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

.social-links .social-link:hover {
    color: var(--primary-color);
}

/* --- Content Sections --- */
.content-section {
    padding: 4rem 0;
}

.content-section.bg-light {
    background-color: var(--light-bg);
}

/* --- Resource / Factsheet Cards --- */
.resource-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition);
    height: 100%;
}

.resource-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.resource-card h5 {
    font-weight: 600;
    color: var(--secondary-color);
}

.resource-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.resource-card .badge {
    background-color: var(--primary-color);
}

/* --- Blog Detail --- */
.blog-detail-header {
    margin-bottom: 2rem;
}

.blog-detail-header .blog-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.blog-detail-header .blog-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.blog-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.blog-content img {
    border-radius: 8px;
    margin: 1rem 0;
}

/* --- AOS Animation Support --- */
[data-aos] {
    transition-property: transform, opacity;
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .main-navigation .navbar-collapse {
        background-color: var(--primary-color);
        padding: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-navigation .nav-link {
        padding: 0.6rem 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-navigation .dropdown-menu {
        box-shadow: none;
        border-top: none;
        padding-left: 1rem;
        background-color: rgba(0, 0, 0, 0.15);
    }

    .main-navigation .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
    }

    .main-navigation .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--white);
    }

    .hero-section {
        padding: 3rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 767.98px) {
    .top-bar-contact span {
        display: block;
        margin-bottom: 2px;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .hero-section h1 {
        font-size: 1.7rem;
    }

    .content-section {
        padding: 2.5rem 0;
    }
}

/* ============================================================
   Admin Panel Styles
   ============================================================ */

.admin-body {
    background-color: #f0f2f5;
    overflow-x: hidden;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Admin Sidebar --- */
.admin-sidebar {
    width: 260px;
    background-color: var(--secondary-color);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1050;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.sidebar-brand:hover {
    color: var(--white);
}

.sidebar-brand i {
    margin-right: 8px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.sidebar-item {
    margin: 1px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.2rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-link i {
    width: 22px;
    margin-right: 10px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.sidebar-link[aria-expanded="true"] .sidebar-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.15);
}

.sidebar-submenu .sidebar-link {
    padding-left: 3rem;
    font-size: 0.85rem;
}

/* --- Admin Content --- */
.admin-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.admin-page-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-tenant-name {
    font-size: 0.85rem;
    opacity: 0.9;
}

.admin-page-content {
    padding: 1.5rem;
    flex: 1;
}

/* Admin Cards */
.admin-page-content .card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

.admin-page-content .card-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.admin-page-content .table {
    margin-bottom: 0;
}

.admin-page-content .table th {
    border-top: none;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Admin Responsive */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
    }
}

/* --- Utility --- */
.text-primary-color {
    color: var(--primary-color) !important;
}

.bg-primary-color {
    background-color: var(--primary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}
