/* =========================================
   1. VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
    /* Colors */
    --color-primary: #004d61;
    /* Prestige Teal */
    --color-secondary: #002b36;
    /* Darker Teal */
    --color-accent-cyan: #e2b13c;
    /* Prestige Gold */
    --color-accent-green: #e2b13c;
    /* Gold (Secondary) */
    --color-accent-pink: #cca035;
    /* Gold (Highlight) */
    --color-text-body: #54595F;
    /* Dark Grey */
    --color-text-light: #7A7A7A;
    /* Light Grey */
    --color-white: #ffffff;
    --color-light-bg: #f5f8f9;

    /* Typography */
    --font-heading: 'Inter Tight', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-secondary: 'Roboto Slab', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Borders & Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-float: 0 12px 40px rgba(17, 29, 94, 0.15);
    /* Tinted subtle shadow */
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-body);
    line-height: 1.6;
    background-color: var(--color-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   3. UTILITY CLASSES
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--color-accent-pink);
    color: var(--color-white);
    border: 2px solid var(--color-accent-pink);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-accent-pink);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* Section Padding */
.section {
    padding: var(--spacing-lg) 0;
}

/* Glassmorphism Utility */
.glass {
    background-color: var(--color-secondary);
    /* Match Footer Color */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    /* Ensure z-index works */
    z-index: 1000;
    color: white;
}

.glass a {
    color: white;
}

/* Fix Dropdown Colors (return to dark text on white bg) */
.glass .dropdown-menu {
    background: white;
    color: var(--color-text-body);
}

.glass .dropdown-menu a {
    color: var(--color-primary);
}

.glass .dropdown-menu a:hover {
    color: var(--color-accent-pink);
}

/* =========================================
   4. RESPONSIVE & MOBILE NAV
   ========================================= */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .desktop-nav {
        display: none;
        /* Hide regular nav on mobile */
    }

    /* Mobile Nav Active State (toggled via JS) */
    nav.active {
        display: block;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid #eee;
        animation: slideDown 0.3s ease;
    }

    nav.active ul {
        flex-direction: column;
        gap: 1rem !important;
    }

    #menu-toggle {
        display: block !important;
        cursor: pointer;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Carousel Scroller */
.scroller {
    overflow-x: auto;
    display: flex;
    gap: var(--spacing-sm);
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
}

.scroller::-webkit-scrollbar {
    display: none;
}

.scroller-item {
    flex: 0 0 300px;
    /* Fixed width cards */
    scroll-snap-align: start;
}

/* =========================================
   5. DROPDOWN MENU
   ========================================= */
.dropdown {
    position: relative;
    padding-bottom: 20px;
    /* Bridge the gap for hover */
    margin-bottom: -20px;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Level 3: Nested Dropdown */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -5px;
    margin-left: 2px;
    display: none;
    transform: none;
}

.dropdown-submenu:hover>.dropdown-menu {
    display: block;
    /* Show on hover */
    animation: fadeInRight 0.2s ease-out;
}

/* Chevron alignment for parent items */
.dropdown-item.has-submenu {
    justify-content: space-between;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dropdown:hover>.dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--color-primary);
    font-weight: 500;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--color-accent-pink);
    /* Gold highlight */
}

.dropdown-item:hover {
    background-color: var(--color-light-bg);
    color: var(--color-accent-pink);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* =========================================
   6. CORE SERVICES CARDS
   ========================================= */
.service-card {
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    color: white;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card .icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: white !important;
    /* Force white icons */
}

.service-card h3 {
    color: white !important;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Specific Card Colors - Blue & Gold Theme */
.bg-data {
    background-color: var(--color-primary);
    /* Prestige Teal/Blue */
}

.bg-strategy {
    background-color: var(--color-accent-cyan);
    /* Gold */
    color: var(--color-secondary) !important;
}

.bg-strategy .icon,
.bg-strategy h3 {
    color: var(--color-secondary) !important;
}

.bg-acquisition {
    background-color: var(--color-secondary);
    /* Darker Teal/Blue */
}

.bg-web {
    background-color: #cca035;
    /* Darker Gold */
    color: var(--color-secondary) !important;
}

.bg-web .icon,
.bg-web h3 {
    color: var(--color-secondary) !important;
}

/* =========================================
   7. BLOG GRID & CARDS
   ========================================= */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

.blog-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.blog-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card__image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: #e8e8e8;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.05);
}

.blog-card__badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--color-accent-cyan);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__date {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.blog-card__date i {
    margin-right: 5px;
}

.blog-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__excerpt {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.blog-card__link i {
    transition: transform 0.2s ease;
}

.blog-card:hover .blog-card__link i {
    transform: translateX(4px);
}

.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
}

.blog-empty i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
    display: block;
}

/* =========================================
   8. BLOG POST ARTICLE STYLES
   ========================================= */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-content h1 {
    font-size: 2.2rem;
    margin: 2.5rem 0 1rem;
}

.article-content h2 {
    font-size: 1.6rem;
    margin: 2rem 0 0.75rem;
    color: var(--color-secondary);
}

.article-content h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content img {
    width: 100%;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    color: var(--color-accent-pink);
}

.article-content blockquote {
    border-left: 4px solid var(--color-accent-cyan);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--color-light-bg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: normal;
    color: #555;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.article-content th,
.article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.article-content th {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

.article-content tr:nth-child(even) {
    background: var(--color-light-bg);
}

.article-content hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2rem 0;
}