/* ==========================================================================
   Modern CSS Variables and Improvements
   ========================================================================== */

:root {
    --primary-color: #2E8AE3;
    --secondary-color: #52A1EB;
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-white: #ffffff;
    --bg-grey: #4D4D4D;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Improved focus states for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Certification badges styling */
.certification-grid .col-md-4,
.certification-grid .col-sm-6 {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
}

.cert-badge {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem 1rem 0 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    height: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
    line-height: 1.2;
}

.cert-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.cert-icon {
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-badge h5 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
    line-height: 1.1;
}

.cert-date {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-radius: 0 0 12px 12px;
    font-weight: 500;
    display: block;
    width: calc(100% + 2rem);
    margin: 0.5rem -1rem 0 -1rem;
    text-align: center;
    background: #f8f9fa;
    color: #666;
}

.cert-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cert-status.latest {
    background: #e8f5e8;
    color: #2e7d32;
}

.cert-status.recent {
    background: #e3f2fd;
    color: #1976d2;
}

/* Platform-specific styling */
.aws-cert:hover {
    border-color: #FF9900;
}

.azure-cert:hover {
    border-color: #0078D4;
}

.gcp-cert:hover {
    border-color: #EA4335;
}

.hashicorp-cert:hover {
    border-color: #7B42BC;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Skills grid mobile fixes */
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.8rem;
    }
    
    .skill-card {
        padding: 0.8rem 0.8rem 0 0.8rem;
        line-height: 1.1;
    }
    
    .skill-logo {
        width: 40px;
        height: 40px;
        margin: 0 auto 0.2rem;
    }
    
    .skill-name {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
        line-height: 1.0;
    }
    
    .skill-level {
        font-size: 0.9rem;
        padding: 0.4rem 0;
        margin: 0.3rem -0.8rem 0 -0.8rem;
        width: calc(100% + 1.6rem);
    }

    /* Certification cards mobile fixes */
    .certification-grid .col-md-4,
    .certification-grid .col-sm-6 {
        padding-left: 5px;
        padding-right: 5px;
        margin-bottom: 15px;
    }
    
    .cert-badge {
        padding: 0.8rem 0.8rem 0 0.8rem;
        line-height: 1.1;
    }
    
    .cert-icon {
        margin: 0 auto 0.4rem;
    }
    
    .cert-icon img {
        width: 80px !important;
        height: 80px !important;
    }
    
    .cert-badge h5 {
        font-size: 1.1rem;
        margin: 0 0 0.3rem 0;
        line-height: 1.0;
    }
    
    .cert-date {
        font-size: 0.9rem;
        padding: 0.4rem 0;
        margin: 0.3rem -0.8rem 0 -0.8rem;
        width: calc(100% + 1.6rem);
    }

    /* Blog cards mobile fixes */
    .blog-post-card {
        min-height: 180px;
        margin-bottom: 20px;
    }
    
    .blog-post-header {
        height: 120px;
    }
    
    .blog-post-title {
        font-size: 1.3rem;
        line-height: 1.1;
        margin: 0.8rem;
        margin-top: 0;
    }
    
    .blog-post-date {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    .blog-post-content {
        padding: 0.8rem;
    }
    
    .blog-post-excerpt {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }
    
    .blog-post-tags .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    /* Skills grid for very small screens */
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.6rem;
    }
    
    .skill-name {
        font-size: 1rem;
    }
    
    .skill-level {
        font-size: 0.8rem;
    }

    /* Certification cards for very small screens */
    .cert-icon img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .cert-badge h5 {
        font-size: 1rem;
    }
    
    .cert-date {
        font-size: 0.8rem;
    }

    /* Blog cards for very small screens */
    .blog-post-card {
        min-height: 160px;
    }
    
    .blog-post-header {
        height: 100px;
    }
    
    .blog-post-title {
        font-size: 1.1rem;
        margin: 0.6rem;
        margin-top: 0;
    }
    
    .blog-post-excerpt {
        font-size: 0.9rem;
    }
}

/* Recent blog posts styling */
.blog-posts-grid {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
}

.blog-posts-grid .col-md-4,
.blog-posts-grid .col-sm-6 {
    display: flex;
}

.blog-post-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 220px;
}

.blog-post-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.blog-post-header {
    position: relative;
    height: 140px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    flex-shrink: 0;
}

.blog-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.blog-post-date {
    position: relative;
    z-index: 2;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 0.75rem;
    backdrop-filter: blur(10px);
    align-self: flex-start;
    margin: 0;
    border-radius: 0 0 12px 0;
}

.blog-post-title {
    position: relative;
    z-index: 2;
    margin: 1rem;
    margin-top: 0;
    font-size: 2rem;
    line-height: 1.2;
}

.blog-post-title a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.blog-post-title a:hover {
    color: white;
    text-decoration: none;
}

.blog-post-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-post-excerpt {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    flex-shrink: 0;
}

.blog-post-tags .tag {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.blog-post-tags .tag {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Remove old blog post styles that are no longer needed */
.recent-posts-container,
.loading-posts,
.blog-post-item,
.error-posts {
    display: none;
}

/* Improved button and link hover states */
a, button {
    transition: var(--transition);
}

a:hover, button:hover {
    transform: translateY(-1px);
}

/* Modern card-like styling for sections */
.modern-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 2rem;
    margin-bottom: 2rem;
}

.modern-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Improved loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
    transition: var(--transition);
}

/* ==========================================================================
   Original Custom Styles (Enhanced)
   ========================================================================== */

.exp-description {
    padding: 0 40px 20px 40px;
}

/* Reduce spacing between paragraphs within experience descriptions */
.exp-description + .exp-description {
    padding-top: 0;
    margin-top: -10px;
}

/* White background for ALL accordion items (experience AND education) - like skill cards */
#experience-accordion .sq-item,
#education-accordion .sq-item {
    background: var(--bg-white) !important;
    border-radius: 0 !important;
    box-shadow: var(--shadow) !important;
    margin-bottom: 0 !important;
    transition: var(--transition) !important;
    border: 1px solid #e0e0e0 !important;
    border-bottom: none !important;
}

#experience-accordion .sq-item:last-child,
#education-accordion .sq-item:last-child {
    border-bottom: 1px solid #e0e0e0 !important;
}

#experience-accordion .sq-item:hover,
#education-accordion .sq-item:hover {
    box-shadow: var(--shadow-hover) !important;
    transform: translateY(-1px) !important;
}

/* Skills section - modern card-based layout */
.skills-category {
    margin-bottom: 2.5rem;
}

.skills-category-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.skill-card {
    background: var(--bg-white);
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 1rem 1rem 0 1rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    line-height: 1.2;
}

.skill-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.skill-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
}

.skill-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: var(--text-color);
}

.skill-level {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    font-weight: 500;
    display: block;
    width: calc(100% + 2rem);
    margin: 0.5rem -1rem 0 -1rem;
    text-align: center;
}

.skill-level.expert { 
    background: #0a1e3d; 
    color: white; 
}

.skill-level.advanced { 
    background: #0b3d91; 
    color: white; 
}

.skill-level.intermediate { 
    background: #1976d2; 
    color: white; 
}

.skill-level.beginner { 
    background: #64b5f6; 
    color: white; 
}

/* Architecture patterns section */
.architecture-patterns {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.arch-card {
    background: var(--bg-white);
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.arch-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.arch-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.arch-description {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.arch-tech {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .skill-card {
        padding: 1rem;
    }
    
    .skill-logo {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .skills-category-title {
        font-size: 1.5rem;
    }
    
    .skill-name {
        font-size: 1rem;
    }
    
    .skill-level {
        font-size: 0.9rem;
    }
    
    .arch-title {
        font-size: 1.1rem;
    }
    
    .arch-description {
        font-size: 1rem;
    }
    
    .arch-tech {
        font-size: 0.9rem;
    }
}

/* Community cards - 5 equal columns */
.community-cards-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.community-card-col {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
}

/* Fixed height logo container for consistent alignment */
.community-logo-container {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.community-logo-container img {
    max-height: 90px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .community-cards-row {
        justify-content: center;
    }
    
    .community-card-col {
        flex: 0 0 calc(50% - 10px);
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .community-card-col {
        flex: 0 0 100%;
        max-width: 300px;
    }
}

.testimonial-description {
    font-style: italic !important;
    color: var(--text-muted) !important;
}

blockquote span {
    display: inline;
}

.subject {
    text-align: left;
}

.mark {
    text-align: right;
}

.results-table {
    list-style: none !important;
    /*     width: 50%; */
    padding-bottom: 40px;
    padding-right: 40px;
}

.results-table li {
    justify-content: space-between;
    display: flex;
}

.results-heading {
    font-weight: bold;
    font-size: 1.6em;
}

.subject-name {
    display: block;
    font-style: italic;
}

.subject-name:before {
    content: '\A';
}

.exp-list .r2 {
    font-size: 16px;
    display: table-cell;
    width: 20%;
    padding: 30px;
    vertical-align: middle;
}

/* Make blog post cards clickable */
.clickable-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.exp-list .r2 {
    color: #999;
}

.my-face {
    margin-top: 4px;
    float: left;
    margin-right: 15px;
    height: 160px;
}

.logo,
.logo-2 {
    padding-top: 10px !important;
}

/* Modern scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(242, 242, 242, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(242, 242, 242, 0.5);
}





/* overlay at start */
.mfp-fade.mfp-bg {
    opacity: 0;

    -webkit-transition: all 0.15s ease-out;
    -moz-transition: all 0.15s ease-out;
    transition: all 0.15s ease-out;
}

/* overlay animate in */
.mfp-fade.mfp-bg.mfp-ready {
    opacity: 0.8;
}

/* overlay animate out */
.mfp-fade.mfp-bg.mfp-removing {
    opacity: 0;
}

/* content at start */
.mfp-fade.mfp-wrap .mfp-content {
    opacity: 0;

    -webkit-transition: all 0.15s ease-out;
    -moz-transition: all 0.15s ease-out;
    transition: all 0.15s ease-out;
}

/* content animate it */
.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
    opacity: 1;
}

/* content animate out */
.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
    opacity: 0;
}





.skill-bar .value {
    display: none !important;
}

#section-organisations.index-8 {
    background: url(../images/background/13.jpg) fixed;
}

.overlay-bg-org {
    width: 100%;
    height: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, .8) !important;
    top: 0;
    padding: 40px 0 40px 0;
}

p a {
    text-decoration: underline;
}


/* ==========================================================================
   Snackbar START
   ========================================================================== */

/* The snackbar - position it at the bottom and in the middle of the screen */
#snackbar {
    border-style: solid;
    border-color: #52A1EB;
    visibility: hidden;
    /* Hidden by default. Visible on click */
    min-width: 250px;
    /* Set a default minimum width */
    margin-left: -125px;
    /* Divide value of min-width by 2 */
    background-color: #333;
    /* Black background color */
    color: #fff;
    /* White text color */
    text-align: center;
    /* Centered text */
    border-radius: 2px;
    /* Rounded borders */
    padding: 16px;
    /* Padding */
    position: fixed;
    /* Sit on top of the screen */
    z-index: 1000;
    /* Add a z-index if needed */
    left: 50%;
    /* Center the snackbar */
    bottom: 30px;
    /* 30px from the bottom */
}

/* Show the snackbar when clicking on a button (class added with JavaScript) */
#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the snackbar in and out */
@-webkit-keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@-webkit-keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

.bg-grey {
    background-color: #4D4D4D !important;
}

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

.white {
    color: white !important;
}

.fg-blue {
    color: #2E8AE3 !important;
}

@media (max-width: 991.98px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .show-mobile {
        display: none !important;
    }
}




.hidden-span {
    font-size: 20px;
    font-weight: 700;
    position: relative;
    border-right: solid 1px #888;
    padding-right: 20px;
    margin-right: 20px;
    display: inline-block;
    visibility: hidden;
}



.youtube-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.youtube-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.eapps-link {
    display: none !important;
}

.experience-section .sq-item:nth-child(n+4) {
    display: none;
}

.experience-section+.show-more {
    cursor: pointer;
    /* color: #007bff; */
    /* or your theme's active link color */
    text-decoration: underline;
}

.skills .d-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    /* Ensures spacing is maintained */
}

.skills .skill-bar {
    flex-basis: 48%;
    /* Adjust based on desired width, slightly less than half to fit 2 per row */
    margin-bottom: 20px;
    /* Spacing between rows */
}

@media (max-width: 991px) {
    .skills .skill-bar {
        flex-basis: 100%;
        /* Stacks them vertically on smaller screens - was 767px max-width initially*/
    }
}