/* 
   JUSTORIA - Custom Luxury Legal Theme Stylesheet
   Navy Blue (#0D2B52), Gold (#C8A15A), White, Light Gray
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0D2B52;
    --primary-light: #163f73;
    --primary-dark: #071933;
    --secondary-color: #C8A15A;
    --secondary-light: #dbbc7f;
    --secondary-dark: #b0873c;
    --bg-light: #F8F9FA;
    --bg-dark: #0b1a2d;
    --text-color: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --transition-speed: 0.4s;
    --border-radius: 12px;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-dark);
}

/* Page Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--primary-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity var(--transition-speed) ease;
}
.loader-content {
    text-align: center;
    color: var(--white);
}
.loader-scale {
    font-size: 4rem;
    color: var(--secondary-color);
    animation: sway 2s ease-in-out infinite;
}
.loader-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-top: 15px;
    letter-spacing: 3px;
    color: var(--secondary-color);
}
@keyframes sway {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}

/* Custom Cursor */
.custom-cursor {
    width: 25px;
    height: 25px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    transition-timing-function: ease-out;
}
.custom-cursor-dot {
    width: 5px;
    height: 5px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
}
a:hover ~ .custom-cursor, button:hover ~ .custom-cursor, .btn:hover ~ .custom-cursor {
    width: 40px;
    height: 40px;
    background-color: rgba(200, 161, 90, 0.15);
}

/* Header & Navigation */
.navbar {
    background-color: white;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(200, 161, 90, 0.25);
    padding: 15px 0;
    transition: padding 0.3s ease;

}
.navbar.scrolled {
    padding: 8px 0;
}
.navbar-brand {
    display: flex;
    align-items: center;
}
.navbar-brand img {
    height: 50px;
    transition: height 0.3s ease;
}
.navbar.scrolled .navbar-brand img {
    height: 40px;
}
.nav-link {
    color: #113049 !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px !important;
    transition: color var(--transition-speed);
    position: relative;

}
.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 16px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}
.nav-link:hover {
    color: var(--secondary-color) !important;
}
.nav-link:hover:after {
    width: calc(100% - 32px);
}
.navbar-toggler {
    border-color: var(--secondary-color);
}
.navbar-toggler-icon {
    filter: invert(1);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    overflow: hidden;
}
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}
.hero-title span {
    color: var(--secondary-color);
}
.hero-subtitle {
    font-size: 1.3rem;
    color: var(--bg-light);
    margin-bottom: 40px;
    font-weight: 300;
}
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--white);
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* Premium Buttons */
.btn-gold {
    background-color: var(--secondary-color);
    color: var(--primary-dark) !important;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 30px;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(200, 161, 90, 0.4);
    transition: all var(--transition-speed);
}
.btn-gold:hover {
    background-color: transparent;
    color: var(--secondary-color) !important;
    box-shadow: 0 4px 20px rgba(200, 161, 90, 0.2);
    transform: translateY(-2px);
}
.btn-outline-gold {
    background-color: transparent;
    color: var(--secondary-color) !important;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 30px;
    border: 2px solid var(--secondary-color);
    transition: all var(--transition-speed);
}
.btn-outline-gold:hover {
    background-color: var(--secondary-color);
    color: var(--primary-dark) !important;
    transform: translateY(-2px);
}

/* Section Common Styles */
section {
    padding: 100px 0;
    position: relative;
}
.section-bg-light {
    background-color: var(--bg-light);
}
.section-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
    position: relative;
}
.section-title:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}
.section-title.left-align:after {
    left: 0;
    transform: none;
}
.subtitle-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 60px;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(200, 161, 90, 0.15);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(13, 43, 82, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(13, 43, 82, 0.1);
    border-color: var(--secondary-color);
}
.dark-glass-card {
    background: rgba(20, 46, 74, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 30px;
    color: var(--white);
    backdrop-filter: blur(10px);

}

/* Law Zone Card Grid */
.law-zone-card {
    position: relative;
    overflow: hidden;
    height: 100%;
}
.law-zone-card .card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    transition: transform 0.3s;
}
.law-zone-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}
.law-zone-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Interactive Timelines */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}
.timeline-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}
.timeline-container::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: var(--white);
    border: 4px solid var(--secondary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}
.left-container {
    left: 0;
}
.right-container {
    left: 50%;
}
.right-container::after {
    left: -17px;
}
.timeline-content {
    padding: 20px 30px;
    background-color: var(--bg-light);
    position: relative;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--secondary-color);
}
.right-container .timeline-content {
    border-left: none;
    border-right: 5px solid var(--secondary-color);
}

/* Masonry Gallery & Lightbox */
.gallery-grid {
    column-count: 3;
    column-gap: 20px;
}
@media (max-width: 991px) {
    .gallery-grid {
        column-count: 2;
    }
}
@media (max-width: 575px) {
    .gallery-grid {
        column-count: 1;
    }
}
.gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: auto;
    transition: transform var(--transition-speed);
}
.gallery-item:hover img {
    transform: scale(1.08);
}
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 43, 82, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    opacity: 0;
    transition: opacity var(--transition-speed);
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Testimonials Carousel */
.testimonials-slider {
    padding: 30px 10px;
}
.testimonial-card {
    text-align: center;
    padding: 40px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.testimonial-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 3px solid var(--secondary-color);
}
.testimonial-rating {
    color: var(--secondary-color);
    margin-bottom: 15px;
}
.testimonial-quote {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Footer Section */
.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 80px 0 20px;
    border-top: 4px solid var(--secondary-color);
}
.footer h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.4rem;
    position: relative;
}
.footer h4:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}
.footer-links {
    list-style: none;
    padding: 0;
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}
.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s, color 0.3s;
}
.social-icons a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
}

/* Animated Counters */
.counter-box {
    text-align: center;
}
.counter-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    font-family: 'Playfair Display', serif;
}
.counter-title {
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Custom Styles for Pages */
.hero-banner-sub {
    background: linear-gradient(rgba(13, 43, 82, 0.9), rgba(13, 43, 82, 0.9)), url('../images/welcome-bg.png') no-repeat center center/cover;
    height: 350px;
    display: flex;
    align-items: center;
    color: var(--white);
    border-bottom: 4px solid var(--secondary-color);
}
.hero-banner-sub h1 {
    color: var(--white);
    font-size: 3.5rem;
}

/* Event List Card */
.event-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    background: var(--white);
    transition: transform 0.3s;
}
.event-card:hover {
    transform: translateY(-5px);
}
.event-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}
.event-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.event-date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-color);
    color: var(--primary-dark);
    padding: 8px 15px;
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Admin Panel Layout Styles */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 260px;
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 20px 0;
    flex-shrink: 0;
    border-right: 2px solid var(--secondary-color);
}
.admin-logo {
    padding: 10px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}
.admin-logo img {
    max-height: 65px;
}
.admin-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}
.admin-menu li a {
    display: block;
    padding: 12px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
}
.admin-menu li a i {
    width: 25px;
    margin-right: 10px;
    color: var(--secondary-color);
}
.admin-menu li a:hover, .admin-menu li.active a {
    color: var(--white);
    background-color: rgba(250, 250, 250, 0.05);
    border-left: 4px solid var(--secondary-color);
}
.admin-content {
    flex-grow: 1;
    background-color: #f4f6f9;
    padding: 40px;
}
.admin-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 30px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-left: 5px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stat-card-info h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    color: var(--primary-color);
}
.stat-card-info p {
    margin: 0;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}
.stat-card-icon {
    font-size: 2.2rem;
    color: var(--secondary-light);
}

/* Media Library View */
.media-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #fff;
}
.media-img-wrapper {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    overflow: hidden;
}
.media-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.media-info {
    padding: 10px;
    font-size: 0.8rem;
    color: #666;
}

/* Form Styles */
.form-control, .form-select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ced4da;
}
.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(200, 161, 90, 0.25);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-container::after {
        left: 19px;
    }
    .right-container {
        left: 0%;
    }
    .right-container .timeline-content {
        border-right: none;
        border-left: 5px solid var(--secondary-color);
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .admin-wrapper {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
    }
}

/* Heartbeat Animation for Footer Credit */
.heart-beat {
    animation: heartbeat 1.2s infinite;
    display: inline-block;
    margin: 0 4px;
}
@keyframes heartbeat {
    0% { transform: scale(1); }
    20% { transform: scale(1.15); }
    40% { transform: scale(1); }
    60% { transform: scale(1.15); }
    80% { transform: scale(1); }
    100% { transform: scale(1); }
}

/* Glass Hero Panel Hover Animations */
.glass-hero-panel {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease, box-shadow 0.4s ease;
}
.glass-hero-panel:hover {
    transform: translateY(-5px);
    border-color: rgba(200, 161, 90, 0.6) !important;
    box-shadow: 0 30px 80px rgba(200, 161, 90, 0.2) !important;
}

/* Further Responsive Refinements */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}
@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem !important;
        letter-spacing: 1px !important;
    }
    .glass-hero-panel {
        padding: 25px 15px !important;
    }
}
