/* =========================================================
   RM ENTERPRISE SOLUTIONS - MASTER CSS (CLEANED & OPTIMIZED)
   Theme: Microsoft Azure / Enterprise Professional
========================================================= */

/* 1. GLOBAL STYLES */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    color: #201f1e; /* Microsoft default text color */
    line-height: 1.6;
}

.main-content {
    min-height: 75vh;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

/* 2. TOP BAR (Mobile Responsive) */
.top-bar {
    background: #0b0e11 !important;
    color: #ffffff;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

    .top-bar a {
        color: #ffffff;
        display: inline-block;
    }

    .top-bar i {
        font-size: 14px;
        vertical-align: middle;
    }

    .top-bar a:hover {
        color: #00a4ef !important;
        transform: translateY(-1px);
    }
/* 4. MEGA MENU (DESKTOP) */
@media (min-width: 992px) {
    .mega-menu {
        min-width: 850px;
        border-radius: 8px;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

.nav-item-link {
    text-decoration: none;
    display: block;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    color: inherit;
}

    .nav-item-link:hover {
        background-color: rgba(0, 120, 212, 0.05);
        transform: translateX(5px);
        color: #0078d4;
    }

.nav-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #323130;
}

.nav-item-desc {
    font-size: 0.8rem;
    color: #605e5c;
}

.mega-title {
    letter-spacing: 1px;
    border-bottom: 2px solid #0078d4;
    display: inline-block;
    padding-bottom: 4px;
    text-transform: uppercase;
    font-weight: bold;
    color: #605e5c !important;
}

/* Mobile & Tablet Style */
/* --- MOBILE ONLY FIXES --- */
/* 5. MOBILE & TABLET NAVIGATION FIX (CRITICAL) */
@media (max-width: 991px) {
    /* Reset Mega Menu to be a vertical stack */
    .mega-menu {
        min-width: 100% !important;
        width: 100% !important;
        position: relative !important; /* Pushes following menu items down */
        transform: none !important;
        left: 0 !important;
        max-height: none !important; /* Removes clipping */
        overflow: visible !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0;
        background-color: #ffffff !important;
    }

        /* Force columns to stack */
        .mega-menu .row {
            display: flex !important;
            flex-direction: column !important;
            margin: 0 !important;
        }

        .mega-menu .col-md-4 {
            width: 100% !important;
            padding: 20px !important;
            border-bottom: 1px solid #eee;
        }

    /* Hide descriptions to save space */
    .nav-item-desc {
        display: none !important;
    }

    /* Adjust Contact Button spacing */
    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-nav .btn-primary {
        margin: 15px 0 !important;
        width: 100%;
        display: block;
        text-align: center;
    }

    /* Fix overlapping Insights dropdown */
    .dropdown-menu[style*="min-width: 280px"],
    .dropdown-menu {
        min-width: 100% !important;
        position: relative !important;
        box-shadow: none !important;
        border-left: 3px solid #0078d4 !important;
        margin-left: 10px;
    }
}

/* Small Menu Icon Styling */
.icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-item-link:hover .icon-box {
    background-color: #0078d4 !important; /* Turn blue on hover */
}

    .nav-item-link:hover .icon-box i {
        color: white !important; /* Turn icon white on hover */
    }

/* Mobile fix for small menus */
@media (max-width: 991px) {
    .dropdown-menu[style*="min-width: 280px"] {
        min-width: 100% !important;
        box-shadow: none !important;
        border-left: 2px solid #eee !important;
        margin-left: 1rem;
    }
}
/* =========================================================
   6. HERO SECTION (HOME PAGE)
========================================================= */
.hero-section {
    background: linear-gradient(90deg, #0d47a1, #1976d2);
    color: white;
    padding: 120px 20px;
    text-align: center;
}

.hero-title {
    animation: fadeDown 1.2s ease-in-out forwards;
    opacity: 0; /* Starts invisible */
}

.hero-subtitle {
    animation: fadeUp 1.5s ease-in-out forwards;
    opacity: 0; /* Starts invisible */
}

.hero-buttons {
    animation: fadeUp 1.8s ease-in-out;
}
/* Fix for the underline in section-title to animate with the text */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px; /* Adjusted spacing */
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #0078d4;
    border-radius: 2px;
}

/* 3. NAVBAR */
.main-navbar {
    background: #ffffff;
    padding: 12px 0;
    border-bottom: 1px solid #edebe9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.logo-img {
    height: 50px;
    width: auto;
}

.brand-text {
    font-weight: 600;
    font-size: 1.1rem;
    color: #0078d4;
}

.navbar-nav .nav-link {
    color: #323130 !important;
    font-size: 14px;
    font-weight: 500;
    margin-right: 15px;
    position: relative;
}

    .navbar-nav .nav-link::after {
        content: "";
        position: absolute;
        width: 0;
        height: 2px;
        background: #0078d4;
        left: 0;
        bottom: -5px;
        transition: 0.3s;
    }

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

    .navbar-nav .nav-link:hover {
        color: #0078d4 !important;
    }

/* 4. CARDS & SECTIONS */
.section {
    padding: 60px 0;
}

.service-card, .portfolio-card, .blog-card, .contact-info-box {
    background: #ffffff;
    border-radius: 4px; /* MS style is more angular/subtle */
    padding: 25px;
    border: 1px solid #edebe9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .service-card:hover, .blog-card:hover {
        box-shadow: 0 12px 24px rgba(0,0,0,0.06);
        transform: translateY(-4px);
        border-color: #0078d4;
    }

/* 5. FOOTER (Optimized for Mobile) */
.footer {
    background-color: #0b0e11 !important;
    color: #cbd5e0;
    font-size: 0.85rem;
}

.text-azure {
    color: #00a4ef !important;
}

.footer-links {
    list-style: none;
    padding-left: 0;
}

    .footer-links li {
        margin-bottom: 8px;
        color: #a0aec0;
    }

    .footer-links a {
        color: #a0aec0;
    }

        .footer-links a:hover {
            color: #00a4ef;
            text-decoration: underline;
        }

/* 6. CERTIFICATION BOX (Fixed sizing) */
.certification-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 4px;
    max-width: 260px;
    display: inline-block;
}

.certification-img-small {
    height: 50px;
    width: auto;
    filter: brightness(1.1);
}

/* 7. FAQ ACCORDION */
.accordion-item {
    border: 1px solid #edebe9 !important;
    margin-bottom: 10px;
}

.accordion-button:not(.collapsed) {
    background-color: #f3f9ff;
    color: #0078d4;
}

/* 8. RESPONSIVE BREAKPOINTS (Consolidated) */

/* Large Desktop */
@media (min-width: 1200px) {
    .certification-box {
        float: right;
    }
}

/* Tablets and Mobile */
@media (max-width: 991px) {
    .hero-title {
        font-size: 32px;
    }

    .brand-text {
        font-size: 0.9rem;
    }
}

/* Mobile Devices Only */
@media (max-width: 767px) {
    .top-bar {
        font-size: 11px;
    }

        .top-bar .container-fluid {
            flex-direction: column;
            gap: 5px;
        }

    .section {
        padding: 40px 0;
    }
    /*
    .hero-section {
        padding: 60px 20px;
    }*/

    .footer {
        text-align: center;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

        .footer-links li {
            background: rgba(255,255,255,0.05);
            padding: 5px 12px;
            border-radius: 20px;
        }

    .certification-box {
        margin: 20px auto !important;
        float: none;
        display: block;
    }

    .social-link-ms {
        font-size: 1.5rem;
        margin: 0 10px;
    }
}

/* =========================================================
   13. ANIMATIONS
========================================================= */

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* FAQ Specific Styles START */
.accordion-button {
    font-weight: 600;
    color: #323130;
    padding: 1.2rem;
    font-size: 1.05rem;
    border: none !important;
}

    .accordion-button:not(.collapsed) {
        background-color: #f3f9ff;
        color: #0078d4;
        box-shadow: none;
    }

.accordion-item {
    border: 1px solid #edebe9 !important;
    margin-bottom: 10px;
    border-radius: 4px !important;
    overflow: hidden;
}

.accordion-body {
    line-height: 1.8;
    color: #495057;
    font-size: 0.95rem;
}

/* live search styling */
#faqSearch:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 120, 212, 0.25);
    outline: none;
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .page-header {
        padding: 40px 15px;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    .accordion-button {
        font-size: 0.95rem;
        padding: 1rem;
    }

    .faq-category-wrapper h4 {
        text-align: center;
        font-size: 1.2rem;
    }
}
/* FAQ Specific Styles END */
/* Blog Specific Styles START */
/* 1. Category Badge System */
.blog-card .badge {
    font-size: 0.72rem;
    padding: 6px 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

/* Custom Category Colors */
.bg-ai {
    background-color: #00a4ef !important;
    color: white;
}

.bg-devops {
    background-color: #002050 !important;
    color: white;
}

.bg-success {
    background-color: #107c10 !important;
    color: white;
}
/* MS Green */
.bg-azure-cloud {
    background-color: #0078d4 !important;
    color: white;
}

.text-azure {
    color: #0078d4;
}

/* 2. Blog Card Layout & Hover Effects */
.blog-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #edebe9 !important;
    border-radius: 8px !important;
    background: #fff;
    cursor: pointer;
    overflow: hidden; /* Ensures image zoom stays in bounds */
}

    .blog-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important;
        border-color: #0078d4 !important;
    }

    .blog-card .card-img-top {
        height: 220px;
        object-fit: cover;
        transition: transform 0.6s ease;
    }

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

    /* 3. Typography & Text Clamping */
    .blog-card .card-title {
        color: #1a1a1a;
        font-weight: 700;
        line-height: 1.4;
        /* Changed from fixed height to min-height to allow breathing room */
        min-height: 3rem;
        margin-bottom: 0.75rem;
        /* Clamping logic: ensures text stays within 2 lines without overlapping */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .blog-card .card-text {
        color: #605e5c;
        line-height: 1.6;
        /* Use min-height to keep the 'Read More' links aligned across cards */
        min-height: 4.8rem;
        margin-bottom: 1.5rem;
        /* Clamping logic: max 3 lines */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    /* Ensure the card body uses flex to push the link to the bottom */
    .blog-card .card-body {
        display: flex;
        flex-direction: column;
    }

    .blog-card .stretched-link {
        margin-top: auto; /* Pushes the 'Read More' link to the bottom of the card */
    }
    /* 4. Link & Interaction */
    .blog-card .stretched-link {
        color: #0078d4;
        font-size: 0.9rem;
        transition: color 0.3s;
    }

    .blog-card:hover .stretched-link {
        color: #005a9e;
        text-decoration: underline;
    }

    .blog-card .stretched-link i {
        transition: transform 0.3s ease;
    }

    .blog-card:hover .stretched-link i {
        transform: translateX(5px);
    }

/* 5. Search Bar & Filter UI Refinements */
#blogSearch {
    box-shadow: none !important; /* Removes default bootstrap blue glow on focus */
}

.input-group:focus-within {
    outline: 2px solid #0078d4;
    border-radius: 30px;
}

.filter-btn {
    transition: all 0.3s ease;
}

.btn-primary.filter-btn {
    background-color: #0078d4;
    border-color: #0078d4;
}

/* 6. Mobile & Tablet Optimization */
@media (max-width: 991px) {
    .blog-card .card-img-top {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .blog-card .card-title, .blog-card .card-text {
        height: auto;
        -webkit-line-clamp: unset;
    }

    .blog-card .card-text {
        margin-bottom: 1.5rem;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}
/* Blog Specific Styles END */

/* --- Subscription Message Styling START --- */
.sub-message-success {
    background: rgba(0, 164, 239, 0.15); /* Azure Cyan tint */
    border: 1px solid #00a4ef;
    color: #00a4ef;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(0, 164, 239, 0.5);
    display: block !important;
}

/* Error Message: Soft Coral red */
.sub-message-error {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid #ff4757;
    color: #ff4757;
    font-weight: 500;
    display: block !important;
}

/* Ensure the spinner is white and visible on the blue button */
#btnSpinner {
    color: white !important;
}

/* Animation for the message appearance */
#subMessage {
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
}
/* --- Subscription Message Styling END --- */
/* =========================================================
   11. CTA SECTION
========================================================= */

.cta-section {
    background: #0d1b2a;
    color: white;
    padding: 80px 20px;
    text-align: center;
}
