/**
 * James Memorial Tribute Website - Custom Styles
 * A beautiful, respectful design for honoring James
 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #8b7355;
    --accent-color: #d4af37;
    --light-bg: #f8f6f3;
    --dark-bg: #1a1a2e;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --gold: #d4af37;
    --soft-gold: #f4e4c1;
    --border-color: #e0d5c7;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.8;
    min-height: 100vh;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

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

.hero-icon {
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--soft-gold);
    margin-bottom: 10px;
}

.hero-dates {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.hero-quote {
    font-size: 1.2rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 30px auto 0;
    padding: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

/* ===== ANNOUNCEMENT SECTION ===== */
.announcement-section {
    background: linear-gradient(135deg, var(--soft-gold) 0%, #fff8e7 100%);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

.announcement-card {
    background: var(--white);
    border-radius: 15px;
    padding: 35px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--gold);
}

.announcement-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.announcement-title i {
    color: var(--gold);
}

.announcement-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 10px;
}

.announcement-item:last-child {
    margin-bottom: 0;
}

.announcement-item i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 3px;
}

.announcement-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 3px;
}

.announcement-item span {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== TRIBUTE FORM SECTION ===== */
.tribute-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 400;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tribute-form-card {
    background: var(--white);
    border-radius: 20px;
    padding: 50px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: block;
}

.form-label .required {
    color: #dc3545;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--light-bg);
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
    background: var(--white);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
}

textarea.form-control {
    min-height: 200px;
    resize: vertical;
}

/* Rich Text Editor Styling */
.rich-text-toolbar {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.rich-text-toolbar button {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary-color);
}

.rich-text-toolbar button:hover {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.rich-text-editor {
    border: 2px solid var(--border-color);
    border-radius: 0 0 10px 10px;
    min-height: 200px;
    padding: 15px;
    background: var(--white);
    overflow-y: auto;
}

.rich-text-editor:focus {
    outline: none;
    border-color: var(--gold);
}

/* ===== SUBMIT BUTTON ===== */
.btn-tribute {
    background: linear-gradient(135deg, var(--gold) 0%, #b8941f 100%);
    color: var(--white);
    border: none;
    padding: 18px 50px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-tribute:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    color: var(--white);
}

.btn-tribute:active {
    transform: translateY(-1px);
}

.btn-tribute i {
    font-size: 1.2rem;
}

/* ===== SUPPORT SECTION ===== */
.support-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-bg) 100%);
    padding: 80px 0;
    color: var(--white);
}

.support-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.support-icon {
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 25px;
}

.support-title {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.support-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.btn-support {
    background: var(--gold);
    color: var(--primary-color);
    border: none;
    padding: 18px 45px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    text-decoration: none;
}

.btn-support:hover {
    background: var(--soft-gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    color: var(--primary-color);
    text-decoration: none;
}

.bank-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
    display: none;
}

.bank-details.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bank-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bank-detail-item:last-child {
    border-bottom: none;
}

.bank-detail-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.bank-detail-value {
    color: var(--white);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: var(--gold);
    color: var(--primary-color);
}

/* ===== ALERT NOTIFICATIONS ===== */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert {
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    animation: slideIn 0.4s ease;
    border: none;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 5px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 5px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 5px solid #17a2b8;
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.alert-message {
    font-size: 0.95rem;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-bg);
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 0;
    text-align: center;
}

.footer-text {
    font-size: 0.95rem;
}

.footer-heart {
    color: #dc3545;
}

/* ===== ADMIN LOGIN ===== */
.admin-login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-color) 100%);
    padding: 20px;
}

.admin-login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 50px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.admin-login-icon {
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 25px;
}

.admin-login-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.admin-login-subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-header {
    background: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 500;
}

.admin-logo i {
    color: var(--gold);
    margin-right: 10px;
}

.admin-nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.admin-nav-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.admin-nav-links a:hover {
    color: var(--primary-color);
}

.btn-logout {
    background: #dc3545;
    color: var(--white);
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #c82333;
}

.admin-content {
    padding: 40px 0;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 15px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
}

.admin-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-admin {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-admin:hover {
    background: var(--dark-bg);
    color: var(--white);
    text-decoration: none;
}

.btn-admin-secondary {
    background: var(--secondary-color);
}

.btn-admin-secondary:hover {
    background: #6b5a45;
}

.tributes-table-container {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tributes-table {
    width: 100%;
    border-collapse: collapse;
}

.tributes-table th {
    background: var(--light-bg);
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
}

.tributes-table td {
    padding: 20px 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.tributes-table tr:hover {
    background: var(--light-bg);
}

.tribute-message-cell {
    max-width: 300px;
}

.tribute-message-preview {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.tribute-message-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(transparent, var(--white));
}

.btn-view-message {
    background: var(--gold);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-view-message:hover {
    background: #b8941f;
}

.no-tributes {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-tributes i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    background: var(--light-bg);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .tribute-form-card {
        padding: 30px 20px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .support-card {
        padding: 30px 20px;
    }
    
    .admin-login-card {
        padding: 30px 20px;
    }
    
    .tributes-table-container {
        overflow-x: auto;
    }
    
    .tributes-table {
        min-width: 800px;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .btn-admin {
        width: 100%;
        justify-content: center;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .alert-container,
    .admin-header,
    .admin-actions,
    .btn-view-message,
    .modal-overlay {
        display: none !important;
    }
    
    .tributes-table-container {
        box-shadow: none;
    }
    
    .tributes-table tr {
        page-break-inside: avoid;
    }
}
