/* Modern Dark Photography Portfolio */

:root {
    --primary-color: #0f1419;
    --secondary-color: #1a1f2e;
    --accent-color: #00d4aa;
    --accent-hover: #00b894;
    --text-primary: #ffffff;
    --text-secondary: #a0a9b8;
    --text-muted: #6c7293;
    --surface-1: #161b22;
    --surface-2: #21262d;
    --surface-3: #30363d;
    --border-color: #30363d;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    background-color: var(--primary-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    padding-top: 76px; /* Account for fixed navbar height */
}

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Hero Section */
.hero-section {
    background: var(--gradient-1);
    color: var(--text-primary);
    padding: 140px 0 120px 0; /* Extra top padding to account for navbar */
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    margin-top: -76px; /* Negative margin to overlap body padding */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="1"/></g></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-weight: 700;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Cards */
.gallery-card {
    background-color: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--shadow-color);
    overflow: hidden;
}

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 212, 170, 0.15);
    border-color: var(--accent-color);
}

.gallery-card .card-body {
    background-color: var(--surface-1);
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
}

.gallery-card .card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.gallery-card .card-text {
    color: var(--text-secondary);
}

.gallery-preview {
    height: 280px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-preview {
    transform: scale(1.05);
}

.gallery-preview-placeholder {
    height: 280px;
    background: var(--gradient-3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.gallery-preview-placeholder i {
    opacity: 0.7;
}

/* Photo Gallery */
.photo-item {
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

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

/* Photo download overlay */
.photo-download-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-download-overlay {
    opacity: 1;
}

.photo-download-btn {
    background-color: rgba(13, 110, 253, 0.9);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-download-btn:hover {
    background-color: rgba(13, 110, 253, 1);
    transform: scale(1.1);
}

/* Photo selection */
.photo-selection-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.photo-checkbox {
    display: none;
}

.photo-checkbox-label {
    display: block;
    width: 30px;
    height: 30px;
    border: 2px solid #fff;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.photo-checkbox-label:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.photo-checkbox:checked + .photo-checkbox-label {
    background-color: #198754;
    border-color: #198754;
}

.photo-checkbox:checked + .photo-checkbox-label::after {
    content: '✓';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: bold;
}

/* Photo item in selection mode */
.photo-item.selection-mode {
    cursor: default;
}

.photo-item.selection-mode .photo-thumbnail {
    cursor: pointer;
}

.photo-item.selected .photo-thumbnail {
    border: 3px solid #198754;
    border-radius: 8px;
}

/* Hide modal trigger in selection mode */
.selection-active .photo-thumbnail {
    pointer-events: none;
}

.selection-active .photo-item.selection-mode .photo-thumbnail {
    pointer-events: auto;
}

.photo-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: contain;
    cursor: pointer;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* Admin Dashboard */
.thumbnail-small {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

/* Navigation */
.navbar {
    background-color: var(--surface-1) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--text-primary) !important;
    text-decoration: none !important;
}

.navbar-brand:hover {
    color: var(--text-primary) !important;
}

.navbar-logo {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.brand-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.footer-logo {
    height: 35px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    background-color: var(--surface-2);
}

/* Special Instagram styling */
.nav-link .fa-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-contact .fa-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
.card {
    background-color: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--surface-2);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.card-body {
    background-color: var(--surface-1);
}

.card-footer {
    background-color: var(--surface-2);
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--gradient-2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background-color: var(--surface-2);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline-primary {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--accent-color);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffa726 0%, #ff7043 100%);
    border: none;
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff7043 0%, #f4511e 100%);
    transform: translateY(-2px);
}

/* Forms */
.form-control,
.form-select {
    background-color: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--surface-3);
    border-color: var(--accent-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 170, 0.25);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--text-muted);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.75rem;
    border-left: 4px solid;
    background: var(--surface-2);
    color: var(--text-primary);
}

.alert-success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, var(--surface-2) 100%);
}

.alert-danger {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, var(--surface-2) 100%);
}

.alert-warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, var(--surface-2) 100%);
}

.alert-info {
    border-left-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, var(--surface-2) 100%);
}

/* Footer */
footer {
    margin-top: auto;
    background: var(--surface-1);
    border-top: 1px solid var(--border-color);
}

.footer-contact li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.footer-contact a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-contact a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.footer-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    margin: 0;
}

.footer-divider {
    border-color: var(--border-color);
    margin: 2rem 0 1rem 0;
}

/* Modal */
.modal-content {
    background-color: var(--surface-1);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-2);
    border-radius: 1rem 1rem 0 0;
}

.modal-title {
    color: var(--text-primary);
}

.modal-body {
    background-color: var(--surface-1);
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    background: var(--surface-2);
    border-radius: 0 0 1rem 1rem;
}

.modal-xl .modal-body img {
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
}

/* Photo modal navigation */
.modal-navigation {
    display: flex;
    align-items: center;
}

.photo-nav-btn {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.photo-nav-btn:hover {
    opacity: 1 !important;
}

.photo-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
}

/* Hide navigation on small screens */
@media (max-width: 768px) {
    .photo-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
    
    .modal-navigation .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .photo-thumbnail {
        height: 150px;
    }
    
    .gallery-preview {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .btn-group .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Loading animations */
.btn:disabled {
    opacity: 0.6;
}

/* Copy to clipboard feedback */
.btn-success {
    transition: all 0.3s ease;
}

/* Gallery password form */
.gallery-password-form {
    max-width: 400px;
    margin: 0 auto;
}

/* Admin specific styles */
.admin-section {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Badge styles */
.badge {
    font-size: 0.75em;
}

/* Input group styles */
.input-group-sm .form-control {
    font-size: 0.875rem;
}

/* Preview images in upload form */
#preview-images .card {
    border: 1px solid #dee2e6;
}

#preview-images .card-img-top {
    border-radius: 0.375rem 0.375rem 0 0;
}

/* Gallery header buttons */
.d-flex.gap-2 > * {
    margin-left: 0.5rem;
}

.d-flex.gap-2 > *:first-child {
    margin-left: 0;
}

/* Admin gallery controls */
.gallery-admin-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .gallery-admin-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .gallery-admin-controls .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
}

/* Error pages */
.error-page {
    padding: 3rem 1rem;
}

.error-code {
    margin-bottom: 2rem;
}

.error-code h1 {
    font-size: 8rem;
    font-weight: 900;
    opacity: 0.2;
    line-height: 1;
    margin: 0;
}

.error-content h2 {
    color: var(--primary-color);
    font-weight: 600;
}

.error-suggestions {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 2rem;
    border-left: 4px solid var(--primary-color);
}

.error-suggestions ul li {
    padding: 0.5rem 0;
}

.error-actions .btn {
    min-width: 140px;
}

@media (max-width: 576px) {
    .error-code h1 {
        font-size: 5rem;
    }
    
    .error-page {
        padding: 2rem 1rem;
    }
    
    .error-actions .btn {
        display: block;
        width: 100%;
        margin: 0.25rem 0;
    }
}

/* About Section */
.about-section {
    background: linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.02"><circle cx="30" cy="30" r="1"/></g></svg>');
    pointer-events: none;
}

.about-content {
    position: relative;
    z-index: 2;
}

.about-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.feature-item:hover {
    color: var(--text-primary);
    transform: translateX(10px);
}

.feature-item i {
    color: var(--accent-color);
}

.about-image {
    position: relative;
    z-index: 2;
    text-align: center;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-3);
    transition: all 0.3s ease;
}

.image-placeholder:hover {
    border-color: var(--accent-color);
    background: rgba(0, 212, 170, 0.1);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Slightly less padding on mobile */
    }
    
    .hero-section {
        padding: 100px 0 80px 0;
        margin-top: -70px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-logo {
        height: 32px;
        max-width: 140px;
    }
    
    .footer-logo {
        height: 28px;
        max-width: 120px;
    }
    
    .about-title {
        font-size: 2rem;
    }
    
    .about-features {
        margin-top: 2rem;
    }
    
    .feature-item {
        justify-content: center;
    }
}

/* Impersonation Mode Styles */
.nav-link-btn {
    background: none;
    border: 1px solid #ffc107;
    color: #ffc107;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link-btn:hover {
    background-color: #ffc107;
    color: #000;
    border-color: #ffc107;
}

.impersonation-alert {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    border: none;
    color: #000;
}

.impersonation-alert .btn-outline-dark {
    border-color: #000;
    color: #000;
}

.impersonation-alert .btn-outline-dark:hover {
    background-color: #000;
    color: #ffc107;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Prevent zoom on iOS when focusing inputs */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    /* Improve touch targets */
    .btn {
        min-height: 44px;
        font-size: 16px;
    }
    
    /* Better form spacing on mobile */
    .form-group,
    .mb-3 {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile-friendly card margins */
    .card {
        margin-left: 15px;
        margin-right: 15px;
        border-radius: 12px;
    }
    
    /* Improved navbar for mobile */
    .navbar-toggler {
        padding: 8px 12px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
    }
    
    /* Better modal sizing */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    /* Loading overlays responsive */
    .loading-overlay {
        border-radius: 12px;
    }
    
    /* Alert improvements */
    .alert {
        border-radius: 8px;
        font-size: 15px;
    }
    
    /* Hero section mobile adjustments */
    .hero-section {
        padding: 100px 0 80px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 992px) {
    .card {
        margin-bottom: 2rem;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
}

/* iOS specific fixes */
@supports (-webkit-appearance: none) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"] {
        -webkit-appearance: none;
        appearance: none;
        -webkit-border-radius: 8px;
        border-radius: 8px;
    }
    
    .form-control:focus {
        -webkit-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }
}

/* Android specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm) {
    .form-control {
        background-clip: padding-box;
    }
}

/* High DPI display improvements */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min--moz-device-pixel-ratio: 2),
       only screen and (-o-min-device-pixel-ratio: 2/1),
       only screen and (min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi),
       only screen and (min-resolution: 2dppx) {
    
    .navbar-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus improvements for accessibility */
.form-control:focus,
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    .gallery-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}