@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,300;0,400;0,500;1,100;1,200;1,300;1,400;1,500&display=swap');

:root{
    --color:#780819;
    --gray_color:rgb(236, 233, 233);

}

*{
    font-family: 'Poppins', sans-serif;
    margin: 0; padding: 0;
    box-sizing: border-box;
    text-transform: capitalize;
    transition: all .2s linear;
    text-decoration: none;
}


html{
    font-size:  62.5%;
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: gray;
}

body{
    overflow-x: hidden;
}

.heading{
    margin: 2rem auto;  
    padding-top: 7rem;
    display: block;     
    font-size: 3.8rem;
    color: var(--color);
    position: relative;
    letter-spacing: .2rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.heading::before, .heading::after {
    content: '';
    position: absolute;
    height: 2.5rem;
    width: 2.5rem;
    border-top: .4rem solid var(--color);
    border-left: .4rem solid var(--color);
}

.heading::before {
    top: 7rem; /* Adjusted to match the padding-top value */
    left: 50%;
    transform: translateX(-20rem); /* Position relative to center */
}

.heading::after {
    bottom: -1rem;
    right: 50%;
    transform: translateX(20rem) rotate(180deg); /* Position relative to center and rotate */
}

.btn{
    outline: none;
    border: none;
    border-radius: 5rem;
    background: var(--color);
    color: white;
    cursor: pointer;
    height: 5rem;
    width: 20rem;
    font-size: 1.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover{
    letter-spacing: 0.2rem;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 1rem 4rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: var(--gray_color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    height: 80px;
    padding: 1rem 2.5rem;
}

.header .logo {
    display: flex;
    align-items: center;
    max-width: 200px;
    border-radius: 8px;
}

.header .logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.header .logo:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.header .navbar {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
}

.header .navbar ul {
    list-style-type: none;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.header .navbar ul li {
    position: relative;
}

.header .navbar ul li a {
    font-size: 1.6rem;
    color: var(--color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}


.header .navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.header .navbar ul li a:hover::after {
    width: 100%;
}

.header .fa-bars {
    color: var(--gray_color);
    font-size: 2.8rem; /* Increased size */
    cursor: pointer;
    display: none;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent background */
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-left: auto;
}

.header .fa-bars:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.header .fa-bars:active {
    transform: scale(0.95);
}

.back.button {
    margin-bottom: 20px;
}

.back.button button {
    padding: 8px 20px;
    background-color: #800000;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.back.button button:hover {
    background-color: #5a0000;
}

.back.button a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card .img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .img img {
    transform: scale(1.05);
}

.card .card_body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: linear-gradient(to bottom, #fff 0%, #f9f9f9 100%);
}

.card .card_title {
    color: var(--color);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.4;
}

.card .card_text {
    color: #666;
    font-size: 1.4rem;
    line-height: 1.6;
    flex-grow: 1;
}

.card .upload_date {
    color: #888;
    font-size: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Filter buttons styling */
.filter-btn {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
}

.filter-btn button {
    padding: 1rem 2.5rem;
    border: 2px solid var(--color);
    background: transparent;
    color: var(--color);
    font-size: 1.6rem;
    font-weight: 500;
    border-radius: 5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn button.active,
.filter-btn button:hover {
    background: var(--color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(120, 8, 25, 0.2);
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    background-color: white;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1010;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.close-modal:hover {
    transform: scale(1.1);
    color: #f1f1f1;
}

.modal-image {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 6px;
    cursor: pointer;
}

/* Add animation for the modal */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.image-modal {
    animation: fadeIn 0.3s;
}

.footer {
    width: 100%;
    background: linear-gradient(135deg, var(--color) 0%, #560410 100%);
    padding: 3rem 4rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer h1, 
.footer h2 {
    color: #fff;
    letter-spacing: 0.1rem;
    font-weight: 400;
    font-size: 1.4rem !important;
    margin: 0;
}

.footer h2 {  /* Specific rule for h2 */
    color: #fff;
    letter-spacing: .1rem;
    font-weight: 400;
    font-size: 1.2rem;
}

.footer h1 a {
    color: #fff;
    transition: color 0.3s ease;
}

.footer h1 a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer .icon a {
    color: #fff;
    font-size: 2rem;
    padding: 0 1.5rem;
    transition: all 0.3s ease;
}

footer .icon a:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
}

/* Responsive Styles */
@media(max-width:768px){
   html{
        font-size: 50%;
    }

    .heading {
        font-size: 3rem;
        margin: 1rem;
    }

    .header {
        justify-content: space-between;
    }

    .header .fa-bars.active {
        background: rgba(255, 255, 255, 0.2);
    }

    .header .navbar.active {
        top: 80px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .header .fa-bars{
        display: block;
        position: relative;
        z-index: 200;
        color: var(--color); /* Fixed color */
        background: var(--gray_color); /* Fixed background */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .header .navbar{
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        background: rgba(120, 8, 25, 0.95); /* More opaque background */
        padding: 2rem 0;
        transition: 0.3s ease;
        z-index: 99; /* Ensure proper stacking */
    }

    .header .navbar.active {
        top: 80px;
    }

    .header .navbar ul {
        flex-direction: column;
        gap: 2rem;
    }

    .header .navbar ul li{
        margin: 1rem 0;
    }

    .header .navbar ul li a {
        display: block;
        font-size: 2rem;
        text-align: center;
        color: #ffffff; /* Ensure text is white for better contrast */
        font-weight: 500;
    }

    .header .navbar ul li a::after {
        background: #ffffff; /* White underline for better visibility */
    }


    .header .fa-times{
        transform: rotate(180deg);
    }

    .header .nav-toggle{
        top: 5.8rem;
    }

    .header .logo {
        max-width: 150px;  /* Smaller on mobile */
        padding: 0.3rem;
    }

    .header .logo {
        max-width: 130px;
        margin-right: 1rem;
    }

    .back.button {
        margin-bottom: 20px;
    }
    
    .back.button button {
        padding: 8px 20px;
        background-color: #800000;
        border: none;
        border-radius: 5px;
        transition: background-color 0.3s;
    }
    
    .back.button button:hover {
        background-color: #5a0000;
    }
    
    .back.button a {
        color: white;
        text-decoration: none;
        font-weight: 600;
    }
    
    .container {
        max-width: 1200px;
        margin: 2rem auto;
        padding: 0 2rem;
    }
    
    .filter {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2.5rem;
        padding: 2rem 0;
    }
    
    .card {
        background: #fff;
        border-radius: 1rem;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
    }
    
    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .card .img {
        width: 100%;
        height: 200px;
        overflow: hidden;
    }
    
    .card .img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }
    
    .card:hover .img img {
        transform: scale(1.05);
    }
    
    .card .card_body {
        padding: 2rem;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        background: linear-gradient(to bottom, #fff 0%, #f9f9f9 100%);
    }
    
    .card .card_title {
        color: var(--color);
        font-size: 2rem;
        font-weight: 600;
        line-height: 1.4;
    }
    
    .card .card_text {
        color: #666;
        font-size: 1.4rem;
        line-height: 1.6;
        flex-grow: 1;
    }
    
    .card .upload_date {
        color: #888;
        font-size: 1.2rem;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    .close-modal {
        top: 0.8rem;
        right: 1.2rem;
        font-size: 2.5rem;
    }

    /* Filter buttons styling */
    .filter-btn {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .filter-btn button {
        padding: 1rem 2.5rem;
        border: 2px solid var(--color);
        background: transparent;
        color: var(--color);
        font-size: 1.6rem;
        font-weight: 500;
        border-radius: 5rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .filter-btn button.active,
    .filter-btn button:hover {
        background: var(--color);
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(120, 8, 25, 0.2);
    }

    .footer{
        padding: 2rem;
        text-align: center;
        justify-content: center;
    }

    .footer h1,
    .footer h2 {
        font-size: 1.2rem !important;
    }

    .footer .icon{
        padding: 1rem 0;
    }
}

@media(max-width:1500px){
    .footer{
        flex-flow: column;
    }

    .footer h1{
        text-align: center;
    }

    .footer .icon{
        padding: 2rem 0;
    }
}