/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&display=swap');

:root {
    --primary-color: #333;
    --secondary-color: #666;
    --accent-color: #d4af37; /* Gold-ish for wedding vibe */
    --bg-color: #ffffff;
    --light-gray: #f9f9f9;
    --border-color: #eee;
    --font-family: 'Outfit', sans-serif;
    --spacing: 20px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--primary-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-weight: 300;
    margin: 0 0 1rem 0;
    text-align: center;
}

h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: var(--spacing);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing);
    flex: 1;
}

/* Header */
header {
    text-align: center;
    padding: var(--spacing) 0;
    border-bottom: 1px solid var(--light-gray);
}

header img.logo {
    max-height: 80px;
    margin-bottom: 10px;
}

/* Form Styles */
.upload-card {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    margin: 2rem auto;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--secondary-color);
}

input[type="text"], 
input[type="file"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    box-sizing: border-box;
}

button.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
}

/* Gallery - Masonry */
.gallery-grid {
    column-count: 3;
    column-gap: var(--spacing);
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: var(--spacing);
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-gray);
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 2rem 0;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.pagination a.active {
    background: var(--primary-color);
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing);
    font-size: 0.9rem;
    color: var(--secondary-color);
    border-top: 1px solid var(--light-gray);
    margin-top: auto;
}

/* Admin Dashboard */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing);
}

.admin-img-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.admin-img-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slider */
.slider-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.slide {
    max-width: 100%;
    max-height: 100%;
    display: none;
}

.slide.active {
    display: block;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    text-align: center;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
