/* RnD Custom Styles with Bootstrap Overrides */

:root {
    --bs-primary: #0ea5e9;
    --bs-primary-rgb: 14, 165, 233;
    --bs-secondary: #0f172a;
    --bs-secondary-rgb: 15, 23, 42;
    --accent: #22d3ee;
    --bs-body-bg: #f6f7fb;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --text-body: #0b1220;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    padding-top: 76px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bs-body-bg);
    background-image: radial-gradient(#e4e7ec 1px, transparent 0);
    background-size: 28px 28px;
    color: var(--text-body);
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

/* SVG Wave Divider */
.custom-shape-divider-bottom-1 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.custom-shape-divider-bottom-1 svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
    transform: rotateY(180deg);
}

.custom-shape-divider-bottom-1 .shape-fill {
    fill: #f8f9fa;
    /* Match body bg */
}

.custom-shape-divider-top-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.custom-shape-divider-top-1 svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.custom-shape-divider-top-1 .shape-fill {
    fill: #f8f9fa;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* Navbar Customization */
.glass-effect {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    width: clamp(48px, 7vw, 72px);
    height: auto;
    display: block;
    object-fit: contain;
}

.nav-link {
    font-weight: 600;
    color: var(--text-body) !important;
    position: relative;
    padding-bottom: 6px;
    letter-spacing: 0.2px;
}

.nav-link.active,
.nav-link:hover {
    color: var(--bs-primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--bs-primary), var(--accent));
    transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Custom Buttons */
.btn-primary {
    background: linear-gradient(120deg, var(--bs-primary), var(--accent));
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(120deg, var(--accent), var(--bs-primary));
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
}

.btn-outline-primary {
    color: var(--bs-primary);
    border-color: rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.06);
}

.btn-outline-primary:hover {
    background: linear-gradient(120deg, rgba(14, 165, 233, 0.1), rgba(34, 211, 238, 0.12));
    border-color: rgba(14, 165, 233, 0.4);
    color: var(--bs-secondary);
}

/* Hero Section */
.hero-section {
    background: radial-gradient(circle at 25% 20%, rgba(34, 211, 238, 0.16), transparent 35%), linear-gradient(120deg, #0f172a 0%, #0b1b32 50%, #0a223c 100%);
    color: white;
    padding: 7rem 0 9rem;
    position: relative;
    margin-bottom: 0;
}

.page-hero {
    background: linear-gradient(120deg, #0f172a 0%, #0b1b32 50%, #0a223c 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
}

.page-hero .badge-pill {
    background: rgba(255, 255, 255, 0.12);
    color: #e8f5ff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.section-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    padding: 2.5rem;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

/* Card Styling */
.card {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.post-img-wrapper {
    height: 220px;
    width: 100%;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
    padding: 10px;
}

.card:hover .post-img-wrapper img {
    transform: scale(1.08);
}

/* Media Collage (Home) */
.media-collage {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.media-tile {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.media-tile.large {
    min-height: 260px;
}

.media-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.media-tile:hover img {
    transform: scale(1.05);
}

.media-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 12px;
    background: rgba(10, 34, 60, 0.72);
    color: #e8eefc;
    border-radius: 999px;
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

/* Social Icons */
.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icon:hover {
    background: white;
    color: var(--bs-primary);
    transform: translateY(-3px);
}

/* Social Cards (Contact Page) */
.social-card {
    padding: 1.8rem;
    text-align: center;
    background: linear-gradient(145deg, #ffffff, #f4f7fb);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: all 0.3s;
    text-decoration: none !important;
    display: block;
    color: var(--bs-secondary);
    border: 1px solid rgba(14, 165, 233, 0.12);
}

.social-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 18px 46px rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.4);
    color: var(--bs-primary);
}

.social-card i {
    font-size: 2.6rem;
    margin-bottom: 0.75rem;
    color: var(--bs-primary);
}

/* Footer override */
.footer-custom {
    background: #0a223c;
    background-image: linear-gradient(135deg, #0a223c 0%, #0d2a4a 100%);
    background-size: 100% 3px;
    background-repeat: no-repeat;
    padding-top: 3rem;
    padding-bottom: 2.5rem;
    color: #e8eefc;
    font-family: 'Outfit', sans-serif;
}

.footer-widgets {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.footer-widget {
    color: #e8eefc;
}

.footer-widget-title {
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #8fb7ff;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 0.65rem;
}

.footer-list a {
    color: #e8eefc;
    opacity: 0.84;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-list a:hover {
    opacity: 1;
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    color: rgba(232, 238, 252, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Navbar Scrolled State */
.navbar {
    transition: all 0.3s ease;
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding-top: 5px;
    padding-bottom: 5px;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 52px;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(20px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.25);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background-color: var(--bs-secondary);
    transform: translateY(-6px);
}

/* Single Post */
.post-meta-pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #e6f6ff;
    letter-spacing: 0.08em;
}

.post-meta-pill.subtle {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.1);
    color: #0b1220;
}

.single-post-layout {
    align-items: flex-start;
}

.single-post-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    padding: 2rem;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.single-post-title {
    font-size: clamp(1.8rem, 2.6vw, 2.6rem);
    line-height: 1.2;
    color: #0b1220;
}

.single-post-card .post-body {
    color: #0b1220;
    font-size: 1rem;
    line-height: 1.8;
}

.single-post-card img {
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.single-post-sidebar {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-section {
    background: linear-gradient(180deg, #0f172a 0%, #12253f 100%);
    color: #e8eefc;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-section.highlight {
    background: linear-gradient(120deg, #0ea5e9, #22d3ee);
    box-shadow: 0 16px 40px rgba(14, 165, 233, 0.3);
}

.sidebar-post-list {
    margin: 0;
    padding: 0;
}

.sidebar-post-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-post-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-post-link {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: #e8eefc;
}

.sidebar-post-link:hover .sidebar-post-title {
    color: #22d3ee;
}

.sidebar-post-date {
    font-size: 0.85rem;
    color: rgba(232, 238, 252, 0.8);
}

.sidebar-post-title {
    font-weight: 600;
    transition: color 0.2s ease;
}

@media (max-width: 991.98px) {
    body {
        padding-top: 68px;
    }

    .navbar-toggler {
        border: 0;
        padding: 0.35rem 0.5rem;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 16px;
        padding: 1rem 1.25rem;
        margin-top: 0.75rem;
        box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }

    .navbar-nav {
        gap: 0.25rem !important;
        align-items: flex-start;
    }

    .navbar-nav .nav-link {
        width: 100%;
        padding: 0.5rem 0;
    }

    .hero-section {
        padding: 5.5rem 0 7rem;
    }

    .hero-section .d-flex {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-section .btn {
        width: 100%;
        max-width: 320px;
    }

    .page-hero {
        padding: 4rem 0;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }

    .single-post-sidebar {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        padding: 4.5rem 0 6rem;
    }

    .page-hero {
        padding: 3.5rem 0;
    }

    .single-post-card {
        padding: 1.5rem;
    }

    .section-card {
        padding: 1.5rem;
    }

    .custom-shape-divider-bottom-1 svg {
        width: 100%;
    }
}
