:root {
    --primary: #f7f7f7;
    --secondary: #ffffff;
    --darker: #f7f7f7;
    --backGround: #ffffff;
    --banner: #000000;
    --accent: #1b7eff;
    --accent2: #000000;
    --hover: #f1f1f1;
    --textColor: #000000;
    --dimText: #595959;
    --noteText: #9e9e9e;
    --borderColor: #e7e7e7;
    --textHilight: #cee1f8;
    --blurColor: #ffffff77;
    --boxShadow: rgba(65, 65, 65, 0.1);
    --href-color: #4154ff;
    --active-color: #4154ff;
    --codeFontWeight: 400;
    --font-family-Sans: "DM Sans", sans-serif;
    --shadow-card: rgba(0, 0, 0, 0.1) 0px 4px 12px;

}

/* Dark theme variables */
.dark-theme {
    --primary: #0e0e0e;
    --secondary: #181818;
    --darker: #121213;
    --backGround: #070707;
    --banner: #1b7eff;
    --accent: #1b7eff;
    --accent2: #f3f3f3;
    --hover: #131212;
    --textColor: #f3f3f3;
    --dimText: #d8dddf;
    --noteText: #767676;
    --borderColor: #2c2c2c;
    --textHilight: #1a4a7d75;
    --blurColor: #2020206c;
    --boxShadow: rgba(0, 0, 0, 0.8);
    --href-color: #4154ff;
    --active-color: #4154ff;
    --codeFontWeight: 400;
    --font-family-Sans: "DM Sans", sans-serif;
    --shadow-card: rgba(255, 255, 255, 0) 0px 0px 0px 1px inset, var(--borderColor) 0px 0px 0px 1px;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-Sans);
    color: var(--textColor);
    background: var(--backGround);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.banner {
    width: 100%;
    background: var(--banner);
    color: var(--backGround);
    padding: 10px 20px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transition: transform 0.3s ease;
    z-index: 1000;
    transform: translateY(0);
    font-weight: bold;
    white-space: nowrap;
}

.banner.hidden {
    transform: translateY(-100%);
}

header {
    background: var(--backGround);
    color: var(--textColor);
    padding: 5px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* box-shadow: 0 2px 5px var(--boxShadow); */
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999;
    transition: top 0.3s ease;
    top: 0px;
    max-height: 50px;
    /* border-bottom: thin solid var(--borderColor); */

}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    width: 100%;
}

.nav-links li {
    margin: 0 8px;
    position: relative;
    cursor: pointer;
}

.nav-links a {
    color: var(--textColor);
    text-decoration: none;
    padding: 5px 10px;
    display: block;
    transition: background 0.3s ease;
    white-space: nowrap;
    border-radius: 8px;
    font-weight: 400;
}

.nav-links a.account-link {
    padding-right: 40px;
    margin-right: -50px;
    z-index: 1;
}

.nav-links a.explore-link::after,
.nav-links a.account-link::after {
    font-family: "NerdFontSymbols";
    background-color: transparent;
    padding-left: 10px;
    font-size: 10px;
    line-height: 1;
    content: "\f107";
    position: relative;
    top: -2px;
    font-weight: 600;
    color: var(--dimText);
}

.nav-links a:hover {
    background: var(--hover);
}

.dropdown-button::before,
.nav-links li a::before {
    font-family: "NerdFontSymbols";
    background-color: transparent;
    padding: 0px;
    font-size: 0.75rem;
    margin-right: 8px;
    position: relative;
    top: -2px;
    color: var(--dimText);
    opacity: 0.5;
}


.nav-links li:nth-child(2) a::before {
    content: "\f44f";
}

.nav-links li:nth-child(3) a::before {
    content: "\f502";
}

.nav-links li:nth-child(3) a:nth-child(1)::before {
    content: "\f502";
}

.nav-links li:nth-child(3) a:nth-child(4)::before {
    content: "\f4a5";
}

.nav-links li:nth-child(3) a:nth-child(2)::before {
    content: "\f44f";
}

.nav-links li:nth-child(3) a:nth-child(3)::before {
    content: "\f0ae2";
}

.nav-links li:nth-child(3) a:nth-child(5)::before {
    content: "\f4a5";
}

.nav-links li:nth-child(3) a:nth-child(6)::before {
    content: "\f4a5";
}
.nav-links li:nth-child(3) a:nth-child(7)::before {
    content: "\f004";
}
.nav-links li:nth-child(4) a::before {
    content: "\f2c0";
}

.dropdown-button[data-action="login"]::before {
    content: "\f05fd";
}

.dropdown-button[data-action="signout"]::before {
    content: "\f000d";
}

.dropdown-button[data-action="signup"]::before {
    content: "\f0014";
}

.dropdown-button[data-action="account"]::before {
    content: "\eb99";
}

.nav-menu-btn {
    margin-left: 15px;
    border-radius: 8px;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-family: var(--font-family-Sans);
    font-size: 1rem;
    background-color: var(--backGround);
    transition: background 0.3s ease;
    color: var(--textColor);
}

.nav-menu-btn::before {
    font-family: "NerdFontSymbols";
    background-color: transparent;
    padding: 0px;
    font-size: 21px;
    line-height: 1;
    content: "\f035c";
}

.nav-menu-btn:hover {
    background-color: var(--hover);
}

.nav-menu {
    display: none;
    position: fixed;
    top: 50px;
    right: 0px;
    width: 100%;
    height: 100vh;
    background-color: var(--backGround);
    z-index: 10000;
    transition: transform 0.3s ease;
    transform: translateX(100%);
}

.nav-menu.open {
    display: block;
    transform: translateX(0);
}

.nav-menu .dropdown-button,
.nav-menu a {
    border-radius: 0px;
    padding-left: 25px;
    cursor: pointer;
    font-size: 1.1rem;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--backGround);
    min-width: 150px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--boxShadow);
    z-index: 1000;
    border: 1px solid var(--borderColor);
    padding: 10px;
}

.dropdown-button,
.dropdown a {
    padding: 10px 15px;
    color: var(--textColor);
    display: block;
    border-radius: 11px;
}

.dropdown-button:hover,
.dropdown a:hover {
    background: var(--hover);
    color: var(--textColor);
}

.home-btn {
    max-height: 54px;
    text-decoration: none;
    padding: 1px 10px;
    background: var(--backGround);
    border: none;
    color: var(--accent);
    cursor: pointer;
    border-radius: 8px;
    font-family: var(--font-family-Sans);
    font-size: 1.8rem;
    font-weight: 600;
    margin: -40px 0px;
    transition: all 0.2s ease;
    background: linear-gradient(90deg, #ffae00, #df0748, #1752f5, #00b377);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    animation: gradientAnimation 8s ease infinite;
    position: relative;
    padding-left: 40px;
    color: var(--textColor);
    font-size: 1.35rem;
    font-weight: 800;
    /* text-transform: uppercase; */
    content: 'IJS'
}

/* .home-btn {
    text-indent: -9999px;
    line-height: 0; 
  }
  
.home-btn::after {
    font-family: var(--font-family-Sans);
    content: "ijs";
    text-indent: 0;
    display: block;
    line-height: initial; 
  } */
.home-btn::before {
    content: "";
    width: 20px;
    height: 20px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    left: 10px;
    top: calc(50% - 0px);
    transform: translateY(-50%);
    background-color: var(--hover);
    border-radius: 6px;
    box-shadow: 0 0 0 6px var(--hover)
}

.home-btn::before {
    background-image: url('/images/blockLogo.png');
    scale: 0.95
}


.home-btn:hover {
    color: var(--accent);
}

.theme-toggle-btn {
    padding: 5px 10px;
    border: none;
    background: var(--backGround);
    color: var(--textColor);
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 8px;
    font-family: var(--font-family-Sans);
    font-size: 0.9rem;
    margin-left: 15px;
    max-height: 41px;
}

.theme-toggle-btn {
    margin-right: 15px;
    top: -2px;
    padding: 0px;
}

.theme-toggle-btn:hover {
    background: var(--hover);
    color: var(--accent);
}

.theme-toggle-btn::before {
    font-family: "NerdFontSymbols";
    background-color: transparent;
    padding: 0px;
    font-size: 21px;
    line-height: 1;
}

.theme-toggle-btn.light-theme::before {
    content: "\f522";
}

.theme-toggle-btn.dark-theme::before {
    content: "\f4ee";
}

.hero {
    width: 100%;
    color: var(--backGround);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 10%;
    margin-top: 60px;
    transition: margin-top 0.3s ease;
    height: calc(100vh - 60px);

}


.hero-text {
    flex: 1;
    padding: 10px;
    text-align: left;
    /* background-color: var(--blurColor); */
    border-radius: 16px;
    /* backdrop-filter: blur(8px); */
    /* max-width: 990px; */
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    color: var(--textColor);
    /* backdrop-filter: blur(8px);
    background-color: #ffffff10; */
    margin-top: 20px;
    border-radius: 16px;
    padding: 3px 14px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--textColor);
    margin-bottom: 40px;
    background-color: #ffffff18;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    /* backdrop-filter: blur(8px); */
}

.hero p.hero-intro {
    margin-bottom: 0px;

}

.hero-btns {
    display: flex;
    gap: 10px;
    padding: 10px;
    flex-wrap: wrap;
}

.hero-footer {
    justify-content: center;
    margin-bottom: 100px;
}

.hero-btn {
    padding: 12px 24px;
    background-color: var(--backGround);
    color: white;
    border: 2px solid var(--backGround);
    width: 200px;
    font-family: var(--font-family-Sans);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    white-space: nowrap;
    padding: 10px 17px;
}

.hero-btn:last-child {
    background-color: var(--backGround);
    color: var(--textColor);
    border: 2px solid var(--accent2);
}

.hero-btn:first-child {
    background: linear-gradient(45deg, #00b377, #1752f5, #df0748, #ffae00);
    background-size: 300% 300%;
    border: 2px solid transparent;
    animation: heroAnimation 12s ease infinite;
}

.hero-other-btn {
    border: none;
    font-size: 1.1rem;
    background: linear-gradient(to right, var(--accent), var(--accent) 100%);
    color: white;
    border-radius: 30px;
    padding: 5px 17px;
    padding-left: 10px;
    background-size: 250%;
    /* Ensure the gradient is large enough for movement */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    font-family: var(--font-family-Sans);
    position: relative;

    white-space: nowrap;
}

.hero-other-btn:hover {
    animation: moveGradient 0.2s forwards;
    /* No looping and retain final state */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    filter: brightness(1.1)
}

.hero-other-btn::before {
    font-family: "NerdFontSymbols";
    font-size: 16px;
    content: "\f502";
    position: relative;
    margin-right: 10px;
    top:-1px;
}

.docs-other-btn::before {
    content: "\f4a5";
}

.other-editor::before {
    content: "\f44f";
}

.other-ai::before {
    content: "\f0ae2";
}

.other-oc-btn,
.other-discord-btn {
    padding-left: 36px;
}

.other-oc-btn::before,
.other-discord-btn::before {
    content: "";
    width: 20px;
    height: 20px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    left: 5px;
    top: calc(50% - 3px);
    transform: translateY(-50%);
    background-color: var(--backGround);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--backGround);
    border: 1px solid var(--backGround);
}

.other-discord-btn::before {
    background-image: url('/images/icons/discord-mark-blue.png');
    scale: 0.75
}

.other-oc-btn::before {
    background-image: url('/images/icons/oc-logo.png');
    scale: 0.75
}

/* Animation for moving the gradient */
@keyframes moveGradient {
    0% {
        background-position: 0% 50%;

    }

    100% {
        background-position: 100% 50%;
        /* color: black; */
    }
}



@keyframes heroAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-btn:hover {
    background-color: var(--accent2);
    color: var(--backGround);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    transform: translateY(-5px);
}

.hero-btn:first-child:hover {
    color: white;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 30%;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 0px;
    /* box-shadow: 0 4px 8px var(--boxShadow); */
}

.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px 0px;
    background: var(--backGround);
}

.content {
    max-width: 1480px;
    width: 100%;
    padding: 0px 5%;
    background: var(--backGround);
    text-align: center;

}

.section {
    display: flex;
    padding: 40px 0;
    text-align: left;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;

}

.section .sub-section {
    flex: 1;
    min-width: 300px;
    padding: 40px;
    /* background-color: var(--darker); */
    border-radius: 16px;
}

.section .sub-section h2 {
    /* display: flex;
    justify-content: center; */
}

.centered-div {
    margin-top: -20px;
}

.centered-div h2 {
    font-size: 2.5rem !important;
}

.centered-div p,
.centered-div h2 {
    display: flex;
    justify-content: center;
}

.section h2 {
    color: var(--textColor);
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 600;
    font-family: var(--font-family-Sans) !important;
}

.section h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--textColor);
    font-weight: 600;
}

.section p {
    color: var(--dimText);
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.2s;
}

.centered-p {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    font-size: 1.2rem;
    color: var(--dimText);
}

.section p:hover {
    /* background-color: var(--accent);
    color: white; */
}

section img:not(.button-grid img) {
    flex: 1;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    border-radius: 14px;
    box-shadow: 0 2px 5px var(--boxShadow);
    min-width: 300px;
}

.skew-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 2px 5px var(--boxShadow);
    width: 100%;
    height: auto;
    flex: 1;
}

.skew-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: skew(37deg, -11deg);
    transition: transform 0.3s ease;
    display: block;
    position: relative;
    scale: 1.3;
    max-height: 400px;

}

.skew-right img {
    transform: skew(-37deg, 11deg);
}

.skew-image-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(140deg, rgba(0, 0, 0, 0.007), rgba(115, 120, 141, 0.258));
    pointer-events: none;
    z-index: 1;
}

.skew-right::after {
    background: linear-gradient(220deg, rgba(0, 0, 0, 0.007), rgba(115, 120, 141, 0.258));

}

.highlight {
    background: linear-gradient(90deg, #ffae00, #df0748, #1752f5, #00b377);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    animation: gradientAnimation 8s ease infinite;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 0px;
    margin-top: 40px;
    margin-bottom: -100px;
}

.grid-item {
    background: var(--backGround);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.grid-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.grid-item img {
    max-width: 70px;
    max-height: 60px;
    margin: 0 auto;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    /* filter: grayscale(100%); */
    transition: filter 0.3s ease;
}

.grid-item:hover .template-link {
    opacity: 1;
}


.grid-item h1 {
    font-size: 1.3rem;
    color: var(--textColor);
    font-weight: 600;
}

.grid-item p {
    font-size: 1rem;
    color: var(--dimText);
    line-height: 1.5;
    flex-grow: 1;
}

.grid-item:hover.grid-item h1 {
    color: var(--textColor);
}

.grid-item:hover.grid-item p {
    color: var(--dimText);
}

.template-link {
    display: inline-block;
    background-color: var(--hover);
    color: var(--textColor);
    text-decoration: none;
    padding: 7px 14px;
    font-size: 14px;
    border-radius: 11px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: center;
    margin-top: 0px;
    opacity: 0;
}

.grid-item:hover .template-link {
    background-color: var(--hover);
    color: var(--textColor);
}

.grid-item:hover .template-link:hover {
    background-color: var(--accent2);
    color: var(--backGround);
    transform: scale(1.05);
}


footer {
    background: var(--backGround);
    color: var(--dimText);
    text-align: center;
    padding: 30px 30px;
    font-size: 1.2rem;
}

footer p {
    margin-top: 20px;
}

#iframeWrapper {}

#bannerIframe {
    position: absolute;
    top: 52px;
    left: 0;
    width: calc(100% - 40px);
    height: calc(100% - 71px);
    border: none;
    z-index: -2;
    margin: 20px;
    border-radius: 16px;
    border: thin solid var(--borderColor);
    margin-bottom: 30px;
    margin-top: 0px;
}

#viewSketchBtn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 1;
    /* Ensure it appears above the iframe */
    background: var(--accent2);
    color: var(--backGround);
    padding: 10px 15px;
    border: none;
    border-radius: 11px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

#viewSketchBtn:hover {
    background: var(--accent);
    color: white;

}


.account-area {
    display: flex;
    align-items: center;
    background-color: var(--pageHeader);
    padding: 2px 10px;

    margin-left: 0px;
    /* padding-left: 5px; */
    height: 40px;
}

.account-area:hover {
    /* background-color: var(--secondary); */

}

.profile-picture-profile {
    width: 23px;
    height: 23px;
    background-color: var(--backGround);
    border-radius: 50%;
    background-size: cover;
    z-index: 2;
    pointer-events: none;

}

.profile-picture-profile::before {
    border-radius: 4px;
    font-family: 'NerdFontSymbols';
    padding: 2px;
    border: none;
    background: transparent;
    content: "\f2bd";
    font-size: 24px;
    position: relative;
    left: -2px;
    top: -1px;
    color: var(--hover);

}

@-moz-document url-prefix() {
    .profile-picture-profile::before {
        left: -3px;
        top: -3px;
    }
}

.profile-picture-profile.logged-in::before {
    display: none;
}

.user-info {
    display: flex;
    flex-direction: column;
    font-size: var(--font-med);
    color: var(--textColor);
}

.user-info span {
    margin: 0px 0;
    padding-right: 20px;
    padding-left: 5px;
    display: none;
}

.dialog-login-box {
    background: var(--backGround);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    border-radius: 13px !important;
    border: 3px solid var(--accent) !important;
}

.dialog-box {
    background: var(--backGround);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
    border-radius: 13px;
    border: 3px solid var(--accent);
}

.dialog-body {
    padding: 15px 30px;
}

.dialog-box .dialog-header {
    border-radius: 13px 13px 0px 0px;
}


.google-sign-up-button,
.dialog-button {
    min-height: 40px;
    border: 2px solid var(--borderColor);
    font-size: 0.8rem;
    font-family: var(--font-family-Sans);
    background-color: var(--backGround);
    margin: 0px;
    margin-bottom: 15px;

}

.google-sign-up-button:hover,
.dialog-button:hover {
    min-height: 40px;
    border: 2px solid var(--accent);

}

.dialog-input {
    font-size: 0.8rem;
    margin-bottom: 5px;
    border: 2px solid var(--borderColor);
    font-family: var(--font-family-Sans);
    background-color: var(--backGround);
    padding: 10px;
    border-radius: 13px;
}

.nav-links .dialog-input {
    font-size: 0.8rem;
    margin-bottom: 5px;
    border: thin var(--borderColor);
    font-family: var(--font-family-Sans);
    background-color: var(--backGround);
    padding: 0px 10px;
    border-radius: 8px;
    background-color: var(--hover);
    color: var(--textColor);
    padding-left: 30px;
    height: 32px;
    margin-right: auto !important;
    margin-left: 0px !important;
    max-width: 385px;
}

.nav-links::before {
    font-family: "NerdFontSymbols";
    background-color: transparent;
    padding: 0px 0px;
    font-size: 16px;
    content: "\f0349";
    color: var(--dimText);
    position: relative;
    right: -25px;
    align-self: center;
    opacity: 0.5;
}

.email-sign-up-button::before {
    font-family: "NerdFontSymbols";
    background-color: transparent;
    padding: 0px 5px;
    font-size: 18px;
    line-height: 1;
    content: "\f01f0";
    color: var(--accent);
}

.email-sign-up-button:hover::before {
    color: var(--backGround);
}

/* Hide nav-links by default when width is 800px or less */
@media (max-width: 768px) {
    .nav-links li {
        display: none;
    }

    .account-area {
        display: none;
    }

    /* Show the menu button when width is 800px or less */
    .nav-menu-btn {
        display: block;
    }

    .theme-toggle-btn {
        margin-right: 0px !important;
    }

    .editor-button,
    .details-button {
        opacity: 1 !important;
    }

    .project-card {
        min-height: 350px;
    }
}

@media (max-width: 1000px) {
    .section {
        flex-direction: column;
    }
}

/* Hide the menu button when width is greater than 800px */
@media (min-width: 768px) {
    .nav-menu-btn {
        display: none;
    }

    /* Show nav-links normally when width is greater than 800px */
    .nav-links li {
        display: block;
    }
}


@media (max-width: 768px) {
    header {

        padding: 15px 15px;
    }


    .hero {
        flex-direction: column;
        gap: 60px;
        height: 95vh;
        padding: 40px 5%;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero-text,
    .hero-image,
    .section .sub-section,
    .section img:not(.button-grid img) {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .hero-image {
        max-width: 35%;

    }

    .hero-btns {
        gap: 5px;
        justify-content: center;
        align-items: center;
    }

    .hero-btn {
        font-size: 1rem;
        width: 50%;
    }
}

@media (max-width: 1500px) {
    header {
        padding: 5px 5px;
    }

    .search-wrapper {
        padding: 5px 15px !important;
    }
}

#projects-listContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 25px;
    padding: 20px;
    max-width: 1600px;
    /* This controls the maximum width */
    margin: 100px auto 0 auto;
    /* Horizontally center the container */
    width: 100%;
    /* Ensure it doesn't overflow */
    box-sizing: border-box;
    /* Include padding and borders in width calculation */
}



.project-card {
    background-color: var(--backGround);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    will-change: transform, box-shadow;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    flex-direction: column;

    width: 100%;
    max-height: 235px;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

/* Image Container with Blurred Background */
.image-container {
    position: relative;
    width: 100%;
    height: 75%;
    /* Fixed height relative to the card */
    overflow: hidden;
    background: var(--backGround);
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 16/9;
    border-radius: 14px;
    transition: all 0.2s;
    color: var(--textColor);
}

.project-card:hover .image-container {
    border-radius: 14px 14px 0 0;
}

.image-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(to bottom right,
            var(--textColor),
            var(--backGround),
            var(--textColor));
    background-blend-mode: overlay;
    background-size: cover;
    background-position: center;
    transform: scale(5.6);
    z-index: 0;
    transition: filter 0.3s ease, transform 0.3s ease;
    opacity: 0.3;
    border-radius: 14px;
}

.project-card:hover .image-container::after {
    transform: scale(4);
    /* Zoom more on hover */
}



.project-img {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: 100%;
    height: auto;
    z-index: 1;
    scale: 1.05;
    transition: all 0.3s;
}

/* Info Section */
.project-card .info {
    padding: 15px;
    flex: 1;
    /* Ensure the info section fills the remaining space */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.profile-container {
    display: flex;
    align-items: center;
}


.profile-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.text-info {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: calc(100% - 35px) !important;
    max-width: calc(100% - 35px) !important;
}

/* Align project name and date side-by-side */
.name-and-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Styling the project name */
.name-and-date span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
    flex: 1;
    max-width: calc(100% - 80px);
}

/* Styling the created date */
.created-date {
    font-size: 0.75rem;
    color: var(--dimText);
    opacity: 0.75;
    margin-left: 10px;
    /* Optional spacing */
    white-space: nowrap;
}


.text-info small {
    font-size: .75rem;
    color: var(--dimText);
    opacity: 0.75
}


.card-overlay {
    position: absolute;
    top: 5px;
    right: 10px;
    display: flex;
    align-items: center;
    z-index: 2;
    cursor: pointer;
    padding-top: 0px;
}

.short-icon::before,
.fork-icon::before {
    font-family: "NerdFontSymbols";
    background-color: transparent;
    font-size: 0.8rem;
    color: var(--accent2);
    opacity: 1;
    content: "\f126";
    /* Example icon */
    margin-left: 5px;
    transition: all 0.3s;
    background-color: var(--backGround);
    padding: 5px;
    border-radius: 6px;
    /* border: thin solid var(--borderColor); */
    /* box-shadow: var(--shadow-card); */
    box-shadow: rgba(0, 0, 0, 0.055) 0px 4px 12px;
    ;
}

.short-icon::before {
    content: "\f0e7";
}

.short-icon::after,
.fork-icon::after {
    content: attr(data-fork-info);
    /* Display fork info from the data attribute */
    position: absolute;
    top: 27px;
    right: -5px;
    background-color: rgba(0, 0, 0, 0.8);
    background-color: var(--backGround);
    box-shadow: var(--shadow-card);
    color: var(--textColor);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 3;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;

}

.short-icon:hover::after,
.fork-icon:hover::after {
    opacity: 1;
    pointer-events: auto;
    display: none;
}

.fork-icon::before {
    background-color: var(--accent);
    color: white;
}

.short-icon::before {
    background-color: #f85149;
    color: white;
}

.like-count {
    color: var(--textColor);
}

/* Like button placeholder */
.like-button-container {

    /* background-color: rgba(0, 0, 0, 0.05); */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* display: none; */
    font-size: 0.75rem;
    color: var(--dimText);
    opacity: 1;
}

.like-button-container::after {
    font-family: "NerdFontSymbols";
    background-color: transparent;
    padding: 0px;
    font-size: 0.8rem;
    position: relative;
    top: 1px;
    margin-left: 5px;
    color: var(--noteText);
    opacity: 0.5;
    content: "\f004";
    font-weight: 400;
    transition: all 0.3s;
}

.project-card:hover .like-button-container::after {
    color: #cc3e44;
    opacity: 1;
}

.like-button-container:hover::after {
    color: var(--accent);
    opacity: 1;
}

/* Buttons container positioned at 30% from the bottom */
.button-container {
    position: absolute;
    bottom: calc(30% - 7px);
    left: 10px;
    right: 5px;
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    z-index: 2;
}

/* Styling for the buttons */
.editor-button,
.details-button {
    background-color: var(--backGround);
    color: var(--textColor);
    border: none;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.project-card:hover .editor-button,
.project-card:hover .details-button {
    opacity: 1;
}

.editor-button:hover,
.details-button:hover {
    background-color: var(--accent);
    color: white;

}







/* Optional: Add a placeholder for lazy-loaded images */
.project-img.lazy,
.profile-img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.project-img:not(.lazy),
.profile-img:not(.lazy) {
    opacity: 1;
}

.project-card.placeholder {
    height: 300px;
    background-color: var(--backGround);
    border-radius: 14px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.75;
    }

    100% {
        opacity: 0.5;
    }
}

.project-card {
    /* min-height: 500px;
    max-height: 500px;
    border-radius: 14px; */
    /* min-height: 300px;
    max-height: 300px; */

}

.image-container {
    height: 100%;
}

.image-container img {
    min-height: 100%;
    min-width: 100%;
    object-fit: cover;
    transition: all 1s;
}

.image-container::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    background: transparent;
    height: 100%;
    transform: scale(1);
    z-index: 1;
    transition: filter 0.3s ease, transform 0.3s ease;
    opacity: 0.8;
    border-radius: 14px;
    box-shadow: inset 0px -120px 120px -90px rgba(0, 0, 0, 1);
    /* Shadow effect at the bottom */
    transition: all 0.3s;
}

.project-card:hover .image-container::after {
    transform: scale(1);
    box-shadow: inset 0px -120px 120px -90px rgba(0, 0, 0, 0);
}

.project-card:hover .image-container img {
    /* object-fit: contain;   */
    /* min-height: 0;
    min-width: 0; */
}

.button-container {
    bottom: calc(33% - 9px);
}

.project-card .info {
    position: relative;
    bottom: 65px;
    z-index: 3;
    color: rgba(255, 255, 255, 1);
    transition: all 0.2s;
}

.text-info small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.like-button-container {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.name-and-date span {
    font-size: 1rem;
}

.project-card:hover.project-card .info {
    background-color: var(--backGround);
    color: var(--textColor);
}


.project-card:hover .name-and-date span {
    color: var(--textColor);
}

.project-card:hover .like-button-container,
.project-card:hover .text-info small {
    color: var(--dimText);

}

.like-button-container::after {
    opacity: 1
}

.card-overlay {
    padding-top: 3px
}