/*
 * Main Stylesheet
 * Photo Gallery Application
 */

/* ---------- Reset & Base Styles ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    color: #333;
    background-color: #f9f9f9;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    margin-top: 0;
    line-height: 1.2;
    color: #222;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
}

a {
    color: #3e7cb1;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #2a5478;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
    background-color: rgba(255, 255, 255, 0.7); /* 70% white background */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Lighter shadow */
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 1.5rem;
}

.logo img {
    height: 120px;
    width: 120px; /* Set equal height/width for a circle */
    border-radius: 50%; /* Makes it a perfect circle */
    object-fit: cover; /* Ensures the image covers the area properly */
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin-left: 1.5rem;
    position: relative;
}

.nav-menu a {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dropdown menu */
.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 10;
    padding: 0.5rem 0;
    border-radius: 4px;
}

.dropdown li {
    margin: 0;
}

.dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.dropdown a:hover {
    background-color: #f5f5f5;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.bar {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.3s;
}

/* ---------- Main Content ---------- */
main {
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 500px;
    background-image: url('../img/hero.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Section styling */
section {
    margin-bottom: 4rem;
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #3e7cb1;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Photo grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.photo-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.photo-item:hover .photo-info {
    transform: translateY(0);
}

.photo-info h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

/* Collection grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.collection-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.collection-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.collection-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.collection-info {
    padding: 1rem;
    background-color: #fff;
}

.collection-info h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.collection-info p {
    margin-bottom: 0;
    color: #666;
    font-size: 0.9rem;
}

.no-image {
    height: 250px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-style: italic;
}

/* About section */
.about {
    background-color: #f2f2f2;
    padding: 3rem 0;
}

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

.about-image {
    flex: 0 0 40%;
}

.about-image img {
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.about-text {
    flex: 1;
}

.btn {
    display: inline-block;
    background-color: #3e7cb1;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.btn:hover {
    background-color: #2a5478;
    color: #fff;
}

/* Gallery page */
.gallery-container {
    padding: 0 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.collection-header {
    margin-bottom: 2rem;
    text-align: center;
}

.breadcrumbs {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.collection-description {
    max-width: 800px;
    margin: 0 auto;
}

.sub-collections {
    margin-bottom: 3rem;
}

/* Photo detail page */
.photo-detail-container {
    padding: 0 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.photo-detail {
    margin-bottom: 3rem;
}

.photo-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.prev-photo,
.next-photo {
    font-weight: 600;
}

.photo-showcase {
    margin-bottom: 2rem;
    text-align: center;
}

.main-photo {
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.photo-metadata {
    margin-top: 2rem;
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 4px;
}

.photo-description {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.metadata-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.metadata-column {
    flex: 1;
    min-width: 200px;
}

.metadata-item {
    margin-bottom: 0.5rem;
}

.metadata-label {
    font-weight: 600;
    color: #666;
}

.photo-tags {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.tags-label {
    font-weight: 600;
    margin-right: 0.5rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    background-color: #e9f0f7;
    color: #3e7cb1;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.tag:hover {
    background-color: #d0e0f0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    background-color: #f2f2f2;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.pagination a:hover {
    background-color: #e0e0e0;
}

.pagination .current {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.2rem;
    background-color: #3e7cb1;
    color: #fff;
    border-radius: 4px;
}

.pagination .prev,
.pagination .next {
    font-weight: 600;
}

.pagination .ellipsis {
    padding: 0.5rem;
    color: #999;
}

/* Error messages */
.no-content {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
    font-style: italic;
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: #222;
    color: #f5f5f5;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 150px;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer-nav h3,
.footer-social h3,
.footer-contact h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.5rem;
}

.footer-nav a {
    color: #ccc;
}

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

.social-icons a {
    color: #ccc;
    transition: color 0.2s;
}

.social-icons a:hover {
    color: #fff;
}

.footer-contact a {
    color: #ccc;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #999;
}

.footer-bottom a {
    color: #ccc;
}

/* ---------- Responsive Styles ---------- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
        z-index: 99;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.8rem 1.5rem;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: #f5f5f5;
        padding: 0;
        display: none;
    }
    
    .dropdown.active {
        display: block;
    }
    
    .dropdown a {
        padding-left: 3rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        flex: 0 0 100%;
    }
    
    .metadata-columns {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .photo-grid,
    .collection-grid {
        grid-template-columns: 1fr;
    }
}

.smart-collection-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.smart-collection-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #3498db;
}

