html {
    scroll-behavior: smooth;
    overscroll-behavior: none;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F8F8F8;
    color: #333;
    overscroll-behavior: none;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
}

.site-header {
    width: 100%;
    max-width: 100vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 15px 20px;
    background-color: white;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 10;
    box-sizing: border-box;
}

.site-header .logo {
    height: 40px;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
}

.site-header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.site-header nav ul li {
    display: inline;
}

.site-header nav ul li a {
    color: #545454;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav.burger {
    display: none;
}


nav.burger.active {
    display: block;
}


.site-header nav ul li a:hover {
    color: black;
    transform: scale(1.05);
}

.cart-btn {
    background-color: black;
    color: white;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
}

/* Hero Section */
.hero {
    background-color: #444;
    color: white;
    padding: 60px 0px;
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 300px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    top: 0;
    left: 0;
    z-index: 0;
    position: absolute;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.5) 10%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    margin: auto;
    height: 100%;
    text-align: center;
    z-index: 2;
    padding-top: 0px;
    position: relative;
}

.hero-content-img {
    height: 140px;
    width: auto;
    object-fit: cover;
    position: relative;
    left: auto;
    right: auto;
    transform: none;
    display: block;
    margin: 0 auto 20px auto;
}

.hero h2 {
    font-size: 26px;
    font-weight: bold;
    z-index: 1;
}

.hero p {
    margin-top: 10px;
    z-index: 1;
}

.hero-btn {
    background-color: white;
    color: black;
    border: none;
    padding: 0px 20px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    z-index: 1;
}

/* PORTFOLIO SECTION */
.projects {
    padding: 60px 20px;
    max-width: 1200px;
    margin: auto;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.project-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 15px;
}

.project-card {
    width: 430px;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.15);
}

.project-card-img-bg {
    width: 100%;
    height: 250px;
    background-color: #f4f4f4;
    border-radius: 8px;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.project-card h4 {
    font-size: 20px;
    font-weight: bold;
    margin: 15px 0 5px;
    color: #333;
}

.project-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* View Project Button */
.project-card .view-project-btn {
    display: inline-block;
    width: 95%;
    padding: 10px;
    background-color: black;
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border-radius: 6px;
    transition: 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.project-card .view-project-btn:hover {
    background-color: #333;
}

/* PRODUCTS */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* Products Section */
.products {
    padding: 60px 0px;
    width: 97%;
    max-width: 1200px;
    height: auto;
    align-self: center;
    margin: auto;
}

.product-slider-container {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    height: auto;
    margin: 20px 0;
}

.product-slider-wrapper {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.product-slider {
    display: flex;
    transition: transform 0.8s ease;
    width: 100%;
    height: auto;
}

.product-page {
    display: flex;
    min-width: 100%;
    height: auto;
    flex-wrap: nowrap;
    gap: 20px;
    box-sizing: border-box;
    padding: 0 10px;
}

.product-card {
    display: flex;
    width: calc(25% - 20px);
    background-color: white;
    padding: 15px;
    height: 400px;
    border-radius: 8px;
    margin: 10px;
    align-items: center;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
    box-sizing: border-box;
    transition: 0.3s ease;
    flex-direction: column;
    overflow: hidden;
    overflow-x: hidden;
    overflow-y: visible;
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: #e0e0e0;
}

.product-card h4 {
    font-size: 20px;
    font-weight: bold;
    margin: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card p {
    font-size: 16px;
    margin: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view {
    background-color: white;
    color: black;
    padding: 8px 15px;
    text-align: center;
    border: 1px solid black;
    cursor: pointer;
    width: 100%;
    display: block;
    margin-top: auto;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-containers {
    display: flex;
    justify-content: center;
    gap: 0px;
    padding-top: 0px;
    position: relative;
    z-index: 2;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-550%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2;
    font-size: 20px;
}

.left {
    left: -2%;
}

.right {
    right: -2%;
}

/* Positioning the dots outside the container */
.slider-dots {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 3;
    margin-top: 20px;
}

/* Adjusted for dot visibility and active state */
.dot {
    height: 10px;
    width: 10px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #717171;
}

.view-all-btn, .load-more-btn {
    display: inline-block;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid black;
    background-color: white;
    color: black;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
    margin-top: 20px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.05);
}

.view-all-btn:hover, .load-more-btn:hover, .view:hover {
    background-color: black;
    color: white;
}

/* NEWSLETTER */
.newsletter {
    text-align: center;
    padding: 60px 20px;
    background: #f8f8f8;
    margin-top: 40px;
}

.newsletter form {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter input {
    padding: 10px;
    width: 250px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.newsletter button {
    background-color: black;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    text-transform: uppercase;
}

.submsg {
    margin-top: 10px;
}

/* FOOTER */
.site-footer {
    background-color: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
    display: flex;
    width: 100%;
    min-height: 60px;
    justify-content: center;
    align-items: center;
    height: 60px;
    position: relative;
    animation: bounceBack 0.4s ease-out;
}

.site-footer {
    background-image: url("{{ url_for('static', filename='images/finishing line.svg') }}");
    background-size: cover;
    background-position: center;
}

/* ABOUT SECTION */
.about-section {
    padding: 60px 20px;
    background-color: #f9f9f9;
    text-align: center;
}

.about-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.about-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
    text-align: left;
    min-width: 300px;
}

.about-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-top: 0;
}

.discord-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    color: black;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    font-weight: bold;
    width: 350px;
    height: 30px;
    transition: 0.3s ease;
    margin: 20px auto 0;
}

.discord-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.discord-logo-text {
    height: 16px;
    width: auto;
    margin: 0;
    position: relative;
    top: 1px;
}

.join-discord {
    display: inline-block;
    width: 20%;
    padding: 10px;
    background-color: black;
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.3s ease;
}

.join-discord:hover {
   background-color: #333;
}

.discord-logo-img {
    height: 32px;
    width: auto;
    margin: 0;
    position: relative;
    top: 5px;
}

/* ADMIN SECTION */
.admin-dashboard {
    width: 90%;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.logout-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #d9534f;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c9302c;
}

.add-portfolio-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #5bc0de;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.add-portfolio-btn:hover {
    background-color: #31b0d5;
}

/* Table Styles */
.portfolio-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    overflow-x: auto;
}

.portfolio-table th,
.portfolio-table td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.portfolio-table th {
    background-color: #f8f9fa;
}

.portfolio-table tr:hover {
    background-color: #f1f1f1;
}

.portfolio-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* Action Buttons */
.edit-btn,
.delete-btn {
    padding: 8px 12px;
    margin: 5px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}

.edit-btn {
    background-color: #f0ad4e;
    color: white;
    transition: background-color 0.3s;
}

.edit-btn:hover {
    background-color: #ec971f;
}

.delete-btn {
    background-color: #d9534f;
    color: white;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #c9302c;
}

/* LOGIN PAGE */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f4;
}

.login-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.login-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-container label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.login-container input {
    width: 94%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 10px;
}

.login-container input:focus {
    border-color: #4CAF50;
    outline: none;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

.login-btn:hover {
    background-color: #45a049;
}

.login-error-message {
    color: red;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: left;
}

@keyframes bounceBack {
    0% { transform: translateY(0); }
    50% { transform: translateY(0px); }
    100% { transform: translateY(0); }
}

.bounce {
    animation: none;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    z-index: 1000;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: all 0.3s ease;
}

/* RESPONSIVE STYLES - TABLET AND MOBILE */

/* Tablet Devices - Unified Experience with Mobile */
@media (max-width: 1024px) {
    /* Header adjustments */
    .mobile-menu-btn {
        display: block;
        top: 30%;
    }

    .site-header {
        padding: 15px;
        justify-content: center;
    }

    .site-header nav {
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 15px 0;
        z-index: 999;
    }
    
    nav.burger.active {
        display: block;
        animation: slideDown 0.3s ease forwards;
    }

    .site-header nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .site-header .cart-btn {
        position: absolute;
        right: 70px;
        top: 15px;
    }

    /* Hero section */
    .hero {
        height: 250px;
    }

    .hero-content-img {
        height: 100px;
        margin-bottom: 15px;
    }

    .hero h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .hero p {
        font-size: 16px;
        padding: 0 20px;
    }

    /* Project section */
    .projects {
        padding: 40px 15px;
    }

    .project-container {
        gap: 20px;
    }

    .project-card {
        width: calc(50% - 30px);
        min-width: 280px;
        padding: 15px;
    }

    .project-card-img-bg {
        height: 200px;
    }

    /* Products section */
    .products {
        height: fit-content;
    }

    .product-slider-container {
        margin: 20px -5px 40px;
        height: fit-content;
    }

    .product-page {
        gap: 15px;
        height: fit-content;
    }

    .product-card {
        width: calc(50% - 20px);
        flex: 0 0 calc(50% - 20px);
        height: fit-content;
    }

    .product-card img {
        height: 380px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        display: none;
        align-items: center;
        justify-content: center;
        top: 40%;
    }

    .left {
        left: 5px;
    }

    .right {
        right: 5px;
    }

    /* About section */
    .about-container {
        flex-direction: column;
        padding: 0 15px;
    }

    .about-image img {
        width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }

    .about-text {
        text-align: center;
        padding: 0 10px;
    }

    .discord-widget {
        width: 90%;
        max-width: 350px;
    }

    /* Newsletter */
    .newsletter {
        padding: 40px 20px;
    }

    .newsletter form {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .newsletter input {
        width: 90%;
        max-width: 400px;
    }

    .newsletter button {
        width: 90%;
        max-width: 400px;
    }
}

/* Mobile Devices - Even More Compact */
@media (max-width: 600px) {
    .site-header .logo {
        font-size: 20px;
        margin-top: 5px;
    }

    .hero {
        height: fit-content;
    }

    .hero-content-img {
        height: 80px;
    }

    .hero h2 {
        font-size: 20px;
    }

    /* Project cards - single column on mobile */
    .project-card {
        width: 100%;
        margin: 0 10px;
    }
    
    .products {
        height: fit-content;
    }

    .product-slider-container {
        margin: 20px 0px 40px;
        height: fit-content;
    }

    /* Product cards - single column on mobile */
    .product-page {
        flex-direction: row;
        height: fit-content;
    }

    .product-card {
        width: 100%;
        flex: 0 0 100%;
        min-width: 250px;
        height: fit-content;
    }

    .product-card img {
        height: 450px;
    }

    /* Newsletter form elements full width */
    .newsletter input,
    .newsletter button {
        width: 95%;
        max-width: none;
    }

    /* About section image smaller */
    .about-image img {
        width: 150px;
        height: 150px;
    }

    /* Discord widget */
    .discord-widget {
        padding: 15px 0px 15px 0px;
        height: fit-content;
        flex-direction: column;
        gap: 15px;
    }

    .join-discord {
        width: 80%;
    }

    /* Login container */
    .login-container {
        width: 90%;
        padding: 20px;
    }
}

/* Fix for very small screens */
@media (max-width: 400px) {
    .hero-content-img {
        height: 70px;
    }

    .hero h2 {
        font-size: 18px;
    }

    .product-card {
        height: 330px;
    }

    .product-card img {
        height: 160px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}