/* Base styles and resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2e2e2e;
    --accent-color: #585858;
    --text-color: #333;
    --light-color: #f8f8f8;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: linear-gradient(to left, #000000, #2e2e2e, #585858, #878787, #b9b9b9, #b9b9b9, #b9b9b9, #b9b9b9, #878787, #585858, #2e2e2e, #000000);
    background-attachment: fixed;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

section {
    padding: 5rem 0;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 50vh;
    display: flex;
    align-items: center;
    text-align: center;
    margin-top: 4rem;
    position: relative;
    color: var(--light-color);
    padding: 2rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Section */
.gallery {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 5rem 0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin: 0 10px;
}

.gallery h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.filter-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    background: none;
    border: none;
    padding: 0.5rem 1.5rem;
    margin: 0 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 25px;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--accent-color);
    color: white;
}

/* Photo Grid and Frame Styles */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 4rem;
    padding: 4rem 0;
    margin: 0 auto;
}

.photo-grid li {
    position: relative;
    display: block;
    width: 300px;
    margin: 0 auto 2rem;
    perspective: 1000px;
    cursor: pointer;
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
    will-change: transform, opacity;
    transition: margin 0.3s ease;
}

.image,
.shadow {
    transform: rotateX(45deg) rotateZ(-25deg);
    transform-style: preserve-3d;
    transition: all 0.3s ease;
    will-change: transform;
}

.image {
    position: relative;
    height: 220px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s;
    will-change: filter;
}

.image::before,
.image::after {
    content: '';
    position: absolute;
    background-color: #bbb;
    transform-origin: 0 0;
}

.image::before {
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    transform: rotateX(90deg);
}

.image::after {
    top: 0;
    left: -5px;
    width: 5px;
    height: 100%;
    transform: rotateY(90deg);
}

.shadow {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    box-shadow: -25px 35px 10px rgba(0, 0, 0, .1);
}

/* Style for frame in normal state */
.photo-grid li .image {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* Style for frame after hover animation completes */
.photo-grid li:hover .image {
    transform: rotate(0);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

.photo-grid li:hover {
    margin-top: 15px;
}

.photo-grid li:hover .shadow {
    transform: rotate(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-shadow: 0 5px 40px rgba(0, 0, 0, .5);
}

/* Completely hide the 3D frame edges after hover */
.photo-grid li:hover .image::before {
    display: none; /* Remove the top 3D edge */
}

.photo-grid li:hover .image::after {
    /* Reset the side edge and position it as a bottom border */
    transform: none;
    left: 0;
    top: auto;
    bottom: -1px;
    width: 100%;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

.photo-grid li:hover .image img {
    filter: grayscale(0);
}

/* Caption styles */
.caption {
    text-align: center;
    padding: 8px;
    color: #333;
    background-color: rgba(255, 255, 255, 0.8);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    opacity: 0;
    z-index: 10;
}

.photo-grid li:hover .caption {
    transform: translateY(0);
    opacity: 1;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border: 2px solid white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 1rem;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-prev, 
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-prev:hover, 
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: -50px;
    border-radius: 0 5px 5px 0;
}

.lightbox-next {
    right: -50px;
    border-radius: 5px 0 0 5px;
}

@media (max-width: 768px) {
    .lightbox-prev, 
    .lightbox-next {
        padding: 10px 8px;
        font-size: 20px;
    }
    
    .lightbox-prev {
        left: -30px;
    }
    
    .lightbox-next {
        right: -30px;
    }
}

/* About Section */
.about {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 5rem 0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin: 0 10px;
}

.about h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.about-text {
    flex: 2;
}

.about-text p {
    margin-bottom: 1rem;
}

/* Contact Section */
.contact {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 5rem 0;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin: 0 10px;
}

.contact h2 {
    margin-bottom: 1rem;
}

.contact p {
    margin-bottom: 3rem;
}

.contact-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.contact-item {
    flex: 1;
    min-width: 250px;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-5px);
    background-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--accent-color);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

footer p {
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: white;
    font-size: 1.25rem;
    transition: transform 0.3s, opacity 0.3s;
    opacity: 0.85;
}

.footer-social a:hover {
    transform: translateY(-3px);
    opacity: 1;
}

@media (max-width: 768px) {
    footer .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* Animation for images */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: #333;
}

.pagination-btn:hover, .pagination-btn:focus {
    background-color: #e0e0e0;
    border-color: #ccc;
}

.pagination-btn.active {
    background-color: #4a89dc;
    color: white;
    border-color: #4a89dc;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
    margin: 0 0.5rem;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    margin: 0 0.25rem;
}

.mobile-indicator {
    display: none;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .page-numbers {
        display: none;
    }
    
    .mobile-indicator {
        display: block;
    }
    
    .pagination {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .pagination-btn {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Adjust responsive styling for image frames */
@media (max-width: 992px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 3rem;
    }
    
    .photo-grid li {
        margin: 2rem auto;
        padding: 15px;
    }
    
    .image {
        height: 200px;
        margin-bottom: 25px;
    }
    
    .about-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 2rem;
    }
    
    .photo-grid li {
        margin: 1.5rem auto;
        padding: 10px;
    }
    
    .image {
        height: 180px;
        margin-bottom: 20px;
    }
    
    .hero {
        height: 40vh;
        padding: 1.5rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 1rem;
    }
    
    nav ul li {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .page-numbers {
        display: none; /* Hide page numbers on smaller screens */
    }
    
    .mobile-indicator {
        display: block; /* Show mobile indicator on smaller screens */
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .photo-grid li {
        margin: 1rem auto;
        padding: 10px;
    }
    
    .image {
        height: 160px;
        margin-bottom: 15px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pagination-btn {
        width: 100%;
    }
}

/* Add font display swap for better font loading */
@font-face {
  font-family: 'Montserrat';
  font-display: swap;
} 