@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(to bottom, #1a1a1a, #2c3e50);
    color: #f8f9fa;
    margin: 0;
    padding: 0;
}

/* Header Section */
header {
    background: url('https://example.com/twilight-background.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    font-family: 'Playfair Display', serif;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

header h1, header p {
    position: relative;
    z-index: 2;
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    text-shadow: 3px 3px 7px #000;
    margin: 0;
    animation: fadeInDown 1.5s;
}

header p {
    font-size: 24px;
    margin: 20px 0 0;
    animation: fadeInUp 1.5s;
}

/* Navbar */
nav {
    background-color: rgba(52, 73, 94, 0.8);
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
    clip-path: polygon(0 25%, 100% 0, 100% 100%, 0 75%);
}

nav a {
    color: #f8f9fa;
    text-decoration: none;
    margin: 0 20px;
    font-weight: bold;
    font-size: 18px;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: #e74c3c;
}

nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #e74c3c;
    bottom: -5px;
    left: 0;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

nav a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Main Content */
.main-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background-color: #2c3e50;
}

.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.gallery-item {
    flex: 1 1 calc(20% - 20px);
    box-sizing: border-box;
    padding: 5px;
    border: 2px solid #ddd;
    margin: 10px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border-radius: 8px;
    transition: opacity 0.3s;
}

.gallery-item img:hover {
    opacity: 0.8;
}

.gallery-item::after {
    content: 'Click to view';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover::after {
    opacity: 1;
}

@media (max-width: 1024px) {
    .gallery-item {
        flex: 1 1 calc(25% - 20px);
    }
}

@media (max-width: 768px) {
    .gallery-item {
        flex: 1 1 calc(33.333% - 20px);
    }

    header {
        padding: 70px 20px;
    }

    header h1 {
        font-size: 48px;
    }

    header p {
        font-size: 18px;
    }

    nav a {
        font-size: 16px;
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        flex: 1 1 calc(50% - 20px);
    }

    header {
        padding: 50px 20px;
    }

    header h1 {
        font-size: 36px;
    }

    header p {
        font-size: 16px;
    }

    nav a {
        font-size: 14px;
        margin: 0 5px;
    }
}

@media (max-width: 320px) {
    .gallery-item {
        flex: 1 1 100%;
    }
}

/* Footer */
footer {
    background-color: #000;
    color: #f8f9fa;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 75%);
}

footer p {
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.social-icons {
    margin-top: 10px;
}

.social-icons a {
    color: #f8f9fa;
    margin: 0 10px;
    font-size: 24px;
    transition: color 0.3s;
    position: relative;
}

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

.social-icons a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #e74c3c;
    bottom: -5px;
    left: 0;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

social-icons a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}
