:root {
    --primary-color: #0a2540;
    --primary-light: #15395f;
    --accent-color: #c6a43b;
    --accent-hover: #b09133;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --font-headings: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings);
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 164, 59, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--bg-white);
    border: 2px solid var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-header {
    margin-bottom: 4rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

section {
    padding: 8rem 2rem 5rem;
    /* Increased top padding to accommodate fixed navbar */
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.8rem 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    color: var(--accent-color);
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--bg-white);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    color: var(--bg-white);
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(10, 37, 64, 0.85),
            rgba(10, 37, 64, 0.85)), url('justice.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    color: var(--bg-white);
}

.hero-content {
    max-width: 900px;
    margin-top: 80px;
    /* Offset for navbar */
    animation: fadeIn 1s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero h1 .star {
    color: var(--accent-color);
    font-size: 2.5rem;
    vertical-align: middle;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    color: #d1d9e2;
    font-weight: 300;
    text-align: left;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* About Section */
.about {
    background-color: var(--bg-white);
    flex: 1;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.about-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    transform: translate(20px, 20px);
    z-index: -1;
}

.about-text {
    text-align: left;
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Services Section */
.services {
    background-color: var(--bg-light);
    flex: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-top-color: var(--accent-color);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: rgba(198, 164, 59, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    color: var(--accent-color);
}

.service-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    text-align: left;
}

/* Forms Core Styling */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(198, 164, 59, 0.1);
}

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

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
}

.logo-icon {
    color: var(--accent-color);
}

.active-nav-link {
    color: var(--accent-color) !important;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.appointment-submit-btn {
    width: 100%;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Appointment Section */
.appointment {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--bg-white);
    flex: 1;
}

.appointment .section-title {
    color: var(--bg-white);
}

.appointment .section-subtitle {
    color: #d1d9e2;
}

.appointment-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.appointment-form-container {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: var(--text-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Contact Section */
.contact {
    background-color: var(--bg-white);
    flex: 1;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info-card {
    background: var(--bg-light);
    padding: 3rem 2rem;
    border-radius: 8px;
    border-top: 4px solid var(--accent-color);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-right: 1.5rem;
    margin-top: 0.2rem;
}

.contact-details h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-details p {
    color: var(--text-light);
}

.maps-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 0.6rem;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.maps-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.consultation-text {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
}

.contact-form-container {
    padding: 1rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 4rem 2rem 2rem;
    border-top: 5px solid var(--accent-color);
    margin-top: auto;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.footer-desc {
    color: #d1d9e2;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    max-width: 350px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #d1d9e2;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    margin-bottom: 1rem;
    color: #d1d9e2;
}

.footer-contact i {
    color: var(--accent-color);
    margin-right: 1rem;
    margin-top: 0.3rem;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 600px;
        margin: 0 auto;
    }

    .about-image::before {
        display: none;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: 0.4s ease-in-out;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .appointment-form-container {
        padding: 2rem 1.5rem;
    }

    section {
        padding: 6rem 1.5rem 4rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25d366;
    color: #ffffff;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    z-index: 9999;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #1ebe5d;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* ─── Skip Link ─────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 10px 18px;
    border-radius: 4px;
    font-weight: 700;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 1rem;
}

/* ─── Focus Visible ──────────────────────────────────────── */
:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}
:focus:not(:focus-visible) {
    outline: none;
}

/* ─── Button states ──────────────────────────────────────── */
.btn:active { transform: translateY(0) scale(0.98); }
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ─── Form enhancements ──────────────────────────────────── */
.form-control::placeholder { color: #aaa; font-size: 0.9rem; }
.form-control:invalid:not(:placeholder-shown) { border-color: #dc3545; }
.char-count {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ─── Hero Badge & Stats ─────────────────────────────────── */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(198, 164, 59, 0.15);
    border: 1px solid rgba(198, 164, 59, 0.4);
    color: var(--accent-color);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.3px;
}
.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-stat-number {
    font-family: var(--font-headings);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}
.hero-stat-label {
    font-size: 0.8rem;
    color: #d1d9e2;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Testimonials ───────────────────────────────────────── */
.testimonials {
    background-color: var(--bg-light);
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.testimonial-card {
    background: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    border-bottom: 4px solid var(--accent-color);
    transition: var(--transition);
}
.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.testimonial-stars {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 3px;
}
.testimonial-text {
    color: var(--text-light);
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.97rem;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(10, 37, 64, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.testimonial-author strong {
    display: block;
    color: var(--primary-color);
    font-size: 0.95rem;
}
.testimonial-author span {
    font-size: 0.82rem;
    color: var(--text-light);
}

/* ─── FAQ ────────────────────────────────────────────────── */
.faq { background: var(--bg-white); }
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}
.faq-item.open {
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(198, 164, 59, 0.1);
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.3rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-headings);
    font-size: 1.05rem;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
    transition: var(--transition);
}
.faq-question:hover { background: var(--bg-light); }
.faq-icon {
    color: var(--accent-color);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 1.5rem;
}
.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
    padding-bottom: 1.3rem;
    font-size: 0.97rem;
}
.faq-item.open .faq-answer {
    max-height: 300px;
    padding-top: 0;
}

/* ─── Map embed ──────────────────────────────────────────── */
.map-embed {
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    line-height: 0; /* removes gap under iframe */
}
.map-embed iframe {
    display: block;
    width: 100%;
    height: 220px;
    border: 0;
    border-radius: 8px;
}

/* ─── Contact info links ─────────────────────────────────── */
.contact-details a {
    color: var(--text-light);
    transition: var(--transition);
}
.contact-details a:hover {
    color: var(--accent-color);
}
.footer-contact a {
    color: #d1d9e2;
    transition: var(--transition);
}
.footer-contact a:hover {
    color: var(--accent-color);
}

/* ─── Scroll-reveal animation ────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ─── Print styles ───────────────────────────────────────── */
@media print {
    .navbar, .whatsapp-float, .hamburger, .hero-buttons,
    .btn, form, .footer-social { display: none !important; }
    .hero { height: auto; padding: 2rem; }
    body { color: #000; background: #fff; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
    section { padding: 2rem 1rem; }
}

/* ─── Max width cap for ultra-wide screens ───────────────── */
@media (min-width: 1600px) {
    .hero-content, .about-content, .services-grid,
    .appointment-wrapper, .contact-container,
    .testimonials-grid, .faq-list, .footer-grid {
        max-width: 1400px;
    }
}

/* ─── Responsive: hero stats ─────────────────────────────── */
@media (max-width: 600px) {
    .hero-stats { gap: 1.5rem; }
    .hero-stat-number { font-size: 1.5rem; }
    .hero-badge { font-size: 0.8rem; padding: 6px 14px; }
}

/* ─── Field-level form validation ────────────────────────── */
.form-control.field-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}
.field-error-msg {
    display: block;
    color: #dc3545;
    font-size: 0.82rem;
    margin-top: 4px;
}

/* ─── Language Toggle Button ─────────────────────────────── */
.lang-toggle {
    background: transparent;
    border: 1.5px solid var(--accent-color);
    color: var(--accent-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.lang-toggle:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}
/* ─── Amharic font support ───────────────────────────────── */
/* Apply Ethiopic font only to text elements, never to icon elements */
body.am-text *:not(i):not(.fa):not([class*="fa-"]):not([class*="fa "]) {
    font-family: 'Noto Sans Ethiopic', 'Nyala', 'Ethiopia Jiret', var(--font-body);
}
/* Explicitly protect Font Awesome icons from font override */
body.am-text i,
body.am-text .fa,
body.am-text [class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}
@media (max-width: 768px) {
    .lang-toggle {
        position: fixed;
        bottom: 5.5rem;
        right: 1.2rem;
        z-index: 9998;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        background: var(--primary-color);
    }
}

/* ─── Contact: no form, info takes full width ────────────── */
.contact-container {
    grid-template-columns: 1fr;
}
.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
.contact-info-card {
    height: 100%;
}
.map-embed iframe {
    height: 100%;
    min-height: 320px;
}
@media (max-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
    .map-embed iframe {
        min-height: 220px;
    }
}

/* ═══════════════════════════════════════════════════════════
   GALLERY PAGE
═══════════════════════════════════════════════════════════ */
.gallery-page { background: var(--bg-light); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: var(--transition);
    aspect-ratio: 4/3;
    background: #e5e5e5;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(10,37,64,0.85));
    color: #fff;
    padding: 1.5rem 1rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 6px;
    object-fit: contain;
}

.lightbox-caption {
    color: #d1d9e2;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
}

/* ═══════════════════════════════════════════════════════════
   RESOURCES PAGE
═══════════════════════════════════════════════════════════ */
.resources-page { background: var(--bg-light); }

.resources-search-wrapper {
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.resources-search {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 10px 20px;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.resources-search:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(198,164,59,0.15);
}

.resources-search i {
    color: var(--text-light);
    font-size: 1rem;
}

.resources-search input {
    border: none;
    outline: none;
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: transparent;
    color: var(--text-color);
}

/* Category Tabs */
.resource-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.resource-tab {
    background: var(--bg-white);
    border: 1.5px solid #ddd;
    color: var(--text-light);
    padding: 8px 20px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.resource-tab:hover,
.resource-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--accent-color);
}

/* Resources Grid */
.resources-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.resource-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-left-color: var(--accent-color);
}

.resource-card[data-category="proclamation"] { border-left-color: #3b82f6; }
.resource-card[data-category="code"]         { border-left-color: #10b981; }
.resource-card[data-category="decision"]     { border-left-color: #f59e0b; }
.resource-card[data-category="other"]        { border-left-color: #8b5cf6; }

.resource-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(198,164,59,0.1);
    color: var(--accent-color);
}

.resource-icon.proclamation { background: rgba(59,130,246,0.1); color: #3b82f6; }
.resource-icon.code         { background: rgba(16,185,129,0.1); color: #10b981; }
.resource-icon.decision     { background: rgba(245,158,11,0.1); color: #f59e0b; }

.resource-info { flex: 1; min-width: 0; }

.resource-title {
    font-family: var(--font-headings);
    font-size: 1.05rem;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}

.resource-desc {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.resource-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.resource-meta i { color: var(--accent-color); }

.resource-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-color);
    color: var(--accent-color);
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
    text-decoration: none;
}

.resource-download:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* No results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    color: #ddd;
    display: block;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .resource-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .resource-download { width: 100%; justify-content: center; }
    .resource-tabs { gap: 0.4rem; }
    .resource-tab { padding: 6px 14px; font-size: 0.82rem; }
}

/* ─── Cassation All Volumes Section ─────────────────────── */
.cassation-all-section {
    max-width: 1000px;
    margin: 3rem auto 0;
    background: var(--bg-white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-top: 4px solid var(--accent-color);
}
.cassation-all-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.cassation-all-section > p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.cassation-volumes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.vol-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: 1.5px solid #ddd;
    color: var(--primary-color);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    min-width: 72px;
}
.vol-btn:hover {
    background: var(--primary-color);
    color: var(--accent-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}
.vol-btn-special {
    background: rgba(198,164,59,0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}
.vol-btn-special:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* ─── Resource button group (View + Download) ────────────── */
.resource-btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
.resource-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    white-space: nowrap;
    transition: var(--transition);
}
.resource-view-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ─── PDF Viewer Modal ───────────────────────────────────── */
.pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.pdf-modal.active { display: flex; }

.pdf-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
}
.pdf-modal-content {
    position: relative;
    z-index: 1;
    background: var(--bg-white);
    border-radius: 8px;
    width: 90vw;
    max-width: 1000px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    gap: 1rem;
    flex-shrink: 0;
}
.pdf-modal-title {
    font-family: var(--font-headings);
    font-size: 1rem;
    color: var(--accent-color);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pdf-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.pdf-modal-download {
    padding: 8px 16px;
    font-size: 0.85rem;
    text-decoration: none;
}
.pdf-modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
    flex-shrink: 0;
}
.pdf-modal-close:hover { background: rgba(255,255,255,0.25); }
.pdf-modal-frame {
    flex: 1;
    width: 100%;
    border: none;
}
@media (max-width: 600px) {
    .pdf-modal-content { width: 100vw; height: 100vh; border-radius: 0; }
    .resource-btn-group { flex-direction: row; flex-wrap: wrap; }
    .resource-view-btn, .resource-btn-group .resource-download { padding: 8px 12px; font-size: 0.82rem; }
}
