/* =====================================================
   GLOBAL STYLES — BETTERMACRO 2025 FIXED
   ===================================================== */
:root {
    --primary: #6c63ff;
    --primary-dark: #5751d1;
    --bg-dark: #222;
    --text-light: #fff;
    --text-dark: #333;
    --transition: 0.3s ease;
    --radius: 10px;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #fafafa;
    color: var(--text-dark);
    line-height: 1.6;
}

/* =====================================================
   HEADER & NAV
   ===================================================== */
header {
    background-color: var(--bg-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 1000;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 18px;
    padding: 15px 25px;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-menu li { position: relative; }

.nav-menu li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: var(--transition);
}

.nav-menu li a:hover,
.nav-menu li a.active { background-color: var(--primary-dark); }

/* Dropdown */
.dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #333;
    border-radius: var(--radius);
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    overflow: hidden;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 14px;
    color: #fff;
    font-weight: normal;
}

.dropdown-menu li a:hover { background-color: var(--primary); }

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
    position: relative;
    height: 85vh;
    background: url('../images/home-hero.jpg') center/cover no-repeat;
    border-radius: 0 0 var(--radius) var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    overflow: hidden;
    text-align: center;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.hero * { position: relative; z-index: 1; }

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeUp 1s forwards;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s forwards 0.3s;
}

.hero .btn-update {
    font-size: 1rem;
    padding: 0.7rem 1.4rem;
    margin: 0.3rem;
    border-radius: var(--radius);
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Ken Burns Animation */
.hero { animation: kenburns 20s ease-in-out infinite alternate; }
@keyframes kenburns { 0% { transform: scale(1) translate(0,0); } 100% { transform: scale(1.1) translate(-10px,-10px); } }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-update {
    display: inline-block;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-update:hover { 
    background-color: var(--primary-dark); 
    transform: translateY(-2px); 
    box-shadow: 0 0 12px rgba(108,99,255,0.5);
}
.btn-update:active { transform: translateY(0); }
.btn-delete { background-color: #dc3545; }
.btn-delete:hover { background-color: #b52b36; }

/* =====================================================
   GALLERY
   ===================================================== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    justify-items: center;
    padding: 2rem 0;
}

.gallery-item {
    background-color: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
    max-width: 250px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    display: block;
    transition: transform 0.3s ease;
    background: none !important;
    filter: none !important;
}

.gallery-item:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.gallery-item:hover img { transform: scale(1.05); }

.gallery-actions { display: flex; justify-content: center; gap: 10px; margin-top: 8px; }

/* Privacy toggle */
.privacy-switch { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; }
.switch { position: relative; display: inline-block; width: 50px; height: 24px; }
.switch.small-switch { width: 36px; height: 18px; }
.switch.small-switch .slider:before { height: 14px; width: 14px; left: 2px; bottom: 2px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: 0.4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; background-color: white; transition: 0.4s; border-radius: 50%; }
input:checked + .slider { background-color: #4cd964; }
input:checked + .slider:before { transform: translateX(18px); }
.status-text { font-size: 0.8rem; font-weight: 600; }

/* =====================================================
   LIGHTBOX
   ===================================================== */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    padding: 20px;
    overflow: auto;
}

#lightbox .lb-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 95%;
    max-height: 90vh;
}

#lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.3s ease, opacity 0.6s ease;
    cursor: zoom-in;
}

#lightbox-title {
    margin-top: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

#lightbox-desc {
    margin-top: 6px;
    font-size: 0.95rem;
    color: #ccc;
    text-align: center;
}

#thumb-strip {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
    justify-content: center;
}

#thumb-strip img {
    height: 60px;
    width: auto;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

#thumb-strip img.active {
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Controls */
.lb-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
}

.lb-controls button {
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    pointer-events: all;
    transition: background 0.2s ease;
}

.lb-controls button:hover { background: rgba(108,99,255,0.7); }

#close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0,0,0,0.5);
    font-size: 1.5rem;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    pointer-events: all;
    transition: background 0.2s ease;
}
#close:hover { background: rgba(108,99,255,0.7); }

/* =====================================================
   PROFILE PAGE
   ===================================================== */
.profile-page { max-width: 750px; margin: 50px auto; background: #fff; border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,0.08); padding: 2rem 2.5rem; animation: fadeUp 0.7s ease; }
.profile-title { text-align: center; font-size: 2rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.avatar-img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); transition: transform 0.3s ease; }
.avatar-img:hover { transform: scale(1.05); }

/* Alerts */
.alert { text-align: center; font-weight: 600; margin-bottom: 1rem; padding: 0.6rem 1rem; border-radius: var(--radius); }
.alert.success { background-color: #e6f9e6; color: #2e7d32; }
.alert.error { background-color: #fde7e9; color: #c62828; }

/* =====================================================
   FOOTER
   ===================================================== */
footer { background-color: #111; color: #fff; padding: 3rem 1rem; margin-top: 3rem; border-radius: var(--radius) var(--radius) 0 0; text-align: center; }
footer a { color: var(--primary); text-decoration: none; transition: var(--transition); }
footer a:hover { color: var(--primary-dark); }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) { .hero h1 { font-size: 2.5rem; } }
@media (max-width: 768px) { 
    .hero { height: 70vh; } 
    .hero h1 { font-size: 2rem; } 
    .hero p { font-size: 1rem; } 
    .gallery { grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); } 
    .profile-page { padding: 1.5rem; }
}
@media (max-width: 480px) { 
    .hero { height: 60vh; } 
    .hero h1 { font-size: 1.6rem; } 
    .gallery { grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); } 
    #lightbox-img { max-height: 40vh; }
    #thumb-strip img { height: 35px; }
    .lb-controls button { font-size: 1.2rem; padding: 4px 8px; }
}
