/* style.css */
:root {
    /* Sunset Brand Colors */
    --brand-purple: #FF66C4;
    --brand-orange: #FFDE59;
    --light-bg: #f8f5ff; /* Very subtle purple tint */
    --dark-text: #2d2d2d;
    --white: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   Header, Logo & Navigation
   ========================================= */

header {
    background-color: var(--brand-purple);
    padding: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo Breathing Animation */
@keyframes logoBreathe {
    0% { color: var(--brand-orange); text-shadow: 0 0 8px rgba(255, 140, 0, 0.4); }
    50% { color: #FFDE59; text-shadow: 0 0 15px rgba(255, 222, 89, 0.8); } /* Yellow transition */
    100% { color: var(--brand-orange); text-shadow: 0 0 8px rgba(255, 140, 0, 0.4); }
}

.logo {
    color: var(--white);
    font-size: 26px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.logo:hover {
    animation: logoBreathe 2s infinite ease-in-out;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    position: relative; /* CRITICAL: Allows the underline to position itself correctly */
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 8px 4px;
    transition: color 0.2s ease-in-out;
    display: inline-block;
}

.nav-links a:hover {
    color: var(--brand-orange);
}

/* The Animated Sliding Underline */
.nav-underline {
    position: absolute;
    bottom: -5px; 
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    pointer-events: none; /* Prevents the underline from blocking clicks */
}

/* The transition is added by JS after the page loads to prevent jumping */
.nav-underline.sliding {
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Mobile responsive adjustments for Header */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 20px;
    }
}

/* =========================================
   Main Content Area & General Layouts
   ========================================= */

main {
    flex: 1;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Clean, Professional Hero Card */
.hero-card {
    background: var(--white);
    border-radius: 12px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border-top: 5px solid var(--brand-purple);
}

.hero-card h1 {
    color: var(--brand-purple);
    font-size: 3em;
    margin-top: 0;
}

/* =========================================
   Horizontal News List Layout (news.php)
   ========================================= */

.news-page-header {
    margin-bottom: 30px;
    border-bottom: 3px solid var(--brand-purple);
    padding-bottom: 10px;
}

.news-page-header h1 {
    font-size: 2.8rem;
    color: var(--brand-purple);
    margin: 0;
}

.news-list-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.news-list-card {
    display: flex;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Left Side: Thumbnail */
.news-list-thumbnail {
    width: 280px;
    flex-shrink: 0;
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right Side: Content Area */
.news-list-content {
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-list-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.news-list-title a {
    color: var(--dark-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-list-title a:hover {
    color: var(--brand-purple);
}

.news-list-teaser {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bottom Meta Info (Author & Time) */
.news-list-meta {
    font-size: 0.9rem;
    color: #888;
    display: flex;
    align-items: center;
    margin-top: auto;
}

.news-author strong {
    color: var(--brand-purple);
}

.meta-dot {
    margin: 0 10px;
    color: #ccc;
}

.news-time {
    font-style: italic;
}

/* Mobile Responsiveness for List */
@media (max-width: 650px) {
    .news-list-card {
        flex-direction: column;
    }
    
    .news-list-thumbnail {
        width: 100%;
        height: 200px;
    }
}

/* =========================================
   News Details Page (news_details.php)
   ========================================= */
   
.back-link-container {
    margin-bottom: 20px;
}

.back-link {
    color: var(--brand-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--brand-orange);
}

.article-container {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--brand-purple);
    margin-bottom: 40px;
    overflow: hidden; 
}

/* 1. Top Meta Header */
.article-top-meta-header {
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    background: #faf8fc; 
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    color: var(--dark-text);
}

.author-avatar-small {
    width: 36px;
    height: 36px;
    background: var(--brand-purple);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

.meta-author strong {
    color: var(--brand-purple);
}

.meta-date-time {
    font-size: 0.95rem;
    color: #777;
}

/* 2. Main Image */
.article-main-image {
    width: 100%;
    height: 450px;
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.image-placeholder {
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* 3 & 4. Title and Body */
.article-content-body {
    padding: 40px;
}

.article-title {
    color: var(--brand-purple);
    font-size: 2.8rem;
    margin: 0 0 30px 0;
    line-height: 1.2;
}

.article-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
}

.article-text p {
    margin-bottom: 20px;
}

.article-text blockquote {
    font-size: 1.4rem;
    font-style: italic;
    color: var(--brand-orange);
    border-left: 5px solid var(--brand-orange);
    margin: 40px 0;
    padding: 20px 30px;
    background-color: #fffaf0;
    border-radius: 0 8px 8px 0;
}

/* 5. Gallery Section */
.article-gallery-section {
    background: var(--white);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    border-top: 4px solid var(--brand-orange); 
}

.article-gallery-section h3 {
    margin: 0 0 25px 0;
    color: var(--brand-purple);
    font-size: 1.6rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.gallery-item {
    height: 150px;
    background: #eaeaea;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

/* Mobile Responsive Adjustments */
@media (max-width: 650px) {
    .article-top-meta-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-main-image {
        height: 250px;
    }
}

/* =========================================
   Gallery Pages (gallery.php - Album Fanning)
   ========================================= */

.page-header-simple {
    text-align: center;
    margin-bottom: 30px;
}

.page-header-simple h1 {
    font-size: 2.8rem;
    color: var(--brand-purple);
    margin: 0 0 10px 0;
}

.page-header-simple p {
    color: #666;
    font-size: 1.1rem;
}

/* Category Filters */
.gallery-category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    color: var(--brand-purple);
    border: 2px solid var(--brand-purple);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: #f8f5ff;
}

.filter-btn.active {
    background: var(--brand-purple);
    color: var(--white);
}

/* Album Grid */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px 30px; 
    margin-bottom: 40px;
}

.album-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

/* The Fanning Photo Stack */
.album-stack {
    position: relative;
    height: 220px; 
    margin-bottom: 20px;
}

/* Base style for all images in the stack */
.stack-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    border-radius: 8px;
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border: 6px solid var(--white); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Initial resting positions */
.stack-back {
    transform: rotate(-6deg) translate(-10px, 10px) scale(0.9);
    z-index: 1;
    background: #e0e0e0;
}

.stack-mid {
    transform: rotate(4deg) translate(10px, 5px) scale(0.95);
    z-index: 2;
    background: #f0f0f0;
}

.stack-front {
    transform: rotate(0deg) translate(0, 0) scale(1);
    z-index: 3;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15); 
}

/* Hover Animation */
.album-card:hover .stack-back {
    transform: rotate(-12deg) translate(-25px, 15px) scale(0.9);
}

.album-card:hover .stack-mid {
    transform: rotate(10deg) translate(25px, 10px) scale(0.95);
}

.album-card:hover .stack-front {
    transform: translateY(-5px) scale(1.02);
}

/* Album Text Info */
.album-info {
    text-align: center;
}

.album-info h3 {
    margin: 0 0 5px 0;
    color: var(--brand-purple);
    font-size: 1.3rem;
    transition: color 0.2s ease;
}

.album-card:hover .album-info h3 {
    color: var(--brand-orange);
}

.photo-count {
    font-size: 0.9rem;
    color: #777;
}

/* =========================================
   Gallery Details Page (gallery_details.php)
   ========================================= */

.album-details-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eaeaea;
}

.album-details-header h1 {
    font-size: 2.5rem;
    color: var(--brand-purple);
    margin: 15px 0 10px 0;
}

.album-meta {
    color: #777;
    font-weight: 600;
    margin-bottom: 15px;
}

.album-description {
    max-width: 700px;
    margin: 0 auto;
    color: #555;
    line-height: 1.6;
}

/* Standard Masonry/Grid for Individual Photos */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.photo-item {
    height: 200px;
    background: #eaeaea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Lightbox Modal (Shared between News and Gallery) */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-modal img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* =========================================
   Expanded Footer Layout (Updated Theme)
   ========================================= */

footer {
    background: var(--brand-purple); /* Changed from dark-text */
    color: var(--white);
    padding: 50px 20px 20px 20px;
    margin-top: auto;
    border-top: 5px solid var(--brand-white);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about {
    flex: 2;
    min-width: 280px;
}

.footer-logo {
    color: var(--brand-white);
    font-size: 1.6rem;
    margin: 0 0 15px 0;
}

.footer-about p {
    color: #f0f0f0; /* Softened white for readability */
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
}

.footer-links, .footer-contact {
    flex: 1;
    min-width: 200px;
}

.footer-links h3, .footer-contact h3 {
    color: var(--brand-white);
    margin: 0 0 20px 0;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #f0f0f0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--brand-orange);
}

.footer-contact p {
    color: #f0f0f0;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* =========================================
   Contact Page Styles
   ========================================= */

.contact-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start; /* Prevents cards from stretching vertically */
}

/* Left Side Card */
.contact-info-card {
    flex: 1;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--brand-purple);
}

.contact-info-card h3 {
    color: var(--brand-purple);
    font-size: 1.5rem;
    margin: 0 0 15px 0;
}

.contact-info-card > p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
}

.contact-detail {
    margin-bottom: 20px;
}

.contact-detail strong {
    color: var(--brand-orange);
    display: block;
    margin-bottom: 5px;
    font-size: 1.05rem;
}

.contact-detail p {
    margin: 0;
    color: var(--dark-text);
    line-height: 1.5;
}

/* Right Side Form */
.contact-form-card {
    flex: 2;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--brand-orange);
}

.contact-form-card h3 {
    color: var(--brand-orange);
    font-size: 1.5rem;
    margin: 0 0 25px 0;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--brand-purple);
    font-size: 0.95rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--dark-text);
    box-sizing: border-box; /* Prevents padding from breaking width */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 3px rgba(178, 44, 245, 0.1);
}

.submit-btn {
    background: var(--brand-purple);
    color: var(--white);
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.submit-btn:hover {
    background: var(--brand-orange);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .contact-layout {
        flex-direction: column;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Add Contact Page to the existing Slide-Up Animation Rule */
.slide-seq-up .contact-info-card,
.slide-seq-up .contact-form-card {
    animation: slideInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* =========================================
   Standard Sequential Slide-Up Animations
   ========================================= */

/* Targets every animatable element across all pages */
.slide-seq-up .news-page-header,
.slide-seq-up .news-list-card,
.slide-seq-up .article-top-meta-header,
.slide-seq-up .article-main-image,
.slide-seq-up .article-content-body,
.slide-seq-up .article-gallery-section,
.slide-seq-up .page-header-simple,
.slide-seq-up .gallery-category-filters,
.slide-seq-up .album-card,
.slide-seq-up .album-details-header,
.slide-seq-up .photo-item {
    animation: slideInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(60px); /* Slides up from 60px below */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Login Page Styles
   ========================================= */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--brand-purple) 0%, #7d1fae 100%);
    margin: 0;
}

.login-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: slideInUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.login-card .logo {
    color: var(--brand-purple);
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

.login-card .logo:hover {
    animation: none; /* Disable breathing on login page */
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.login-btn {
    width: 100%;
    background: var(--brand-orange);
    color: var(--white);
    border: none;
    padding: 14px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.login-btn:hover { background: #e67e00; }

/* =========================================
   Navigation Dropdown Styles
   ========================================= */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 130%; /* Pushed down slightly */
    right: 0;
    background: var(--white);
    min-width: 160px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    z-index: 100;
    border-top: 3px solid var(--brand-orange);
}

/* Hover trigger */
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu a {
    color: var(--dark-text) !important; /* Override white nav link */
    padding: 10px 20px !important;
    display: block;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
}

.nav-dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--brand-purple) !important;
}