:root {
    --bg-color: #f4f4f0;
    --text-color: #333333;
    --accent-color: #5d5d5d;
    --primary-color: #b2a490;
    /* Sand/Earth tone */
    --hover-color: #8c7b64;
    --nav-bg: rgba(244, 244, 240, 0.95);

    --font-heading: 'Zen Old Mincho', serif;
    --font-body: 'Zen Kaku Gothic New', sans-serif;

    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 500;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

small {
    line-height: 1.2;
    display: block;
    /* Ensures line-height applies effectively if it contains blocks, or behaves as block context */
}

.red {
    color: red;
    text-decoration: underline;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--nav-bg);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-family: var(--font-body);
}

.logo-main {
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.nav-list {
    display: flex;
    gap: 40px;
}

.nav-list a {
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 5px;
    white-space: nowrap;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-color);
    transition: width 0.3s ease;
}

.nav-list a:hover::after {
    width: 100%;
}

.nav-social-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-list a.nav-social-icon {
    padding-bottom: 0;
    display: flex;
    align-items: center;
}

.nav-list a.nav-social-icon::after {
    display: none;
}

.nav-list a.nav-social-icon:hover {
    color: var(--hover-color);
    /* Or stick to inherit/primary */
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
}

.bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    transition: all 0.3s ease;
}

.bar:nth-child(1) {
    top: 0;
}

.bar:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.bar:nth-child(3) {
    bottom: 0;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 999;
    padding-top: var(--header-height);
    transition: right 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-list {
    text-align: center;
}

.mobile-nav-list li {
    margin: 30px 0;
}

.mobile-nav-list a {
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../pics/front1.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    z-index: -1;
    transform: scale(1.1);
    /* Initial scale for parallax effect */
    transition: transform 0.1s linear;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeUp 1.5s ease 0.5s forwards;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 20px;
    letter-spacing: 0.3em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 4rem;
    line-height: 1.3;
    letter-spacing: 0.2em;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    writing-mode: horizontal-tb;
    /* Explicitly set horizontal first */
}

/* Vertical text for Japanese aesthetic on larger screens if desired, 
   but simplistic checks keep it horizontal for readability sometimes.
   Let's create a specific look. */
@media (min-width: 768px) {
    .hero-title {
        font-size: 5rem;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
}

.scroll-indicator span {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.line {
    width: 1px;
    height: 60px;
    background-color: #fff;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections Common */
.section {
    padding: 100px 20px;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--primary-color);
    letter-spacing: 0.2em;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--accent-color);
    line-height: 2;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background-color: #e0e0dc;
    position: relative;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 1px solid var(--primary-color);
    z-index: -1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
}

/* Banner Parallax */
.banner-parallax {
    height: 400px;
    background-image: url('../pics/hero.png');
    /* Reusing hero for now, could be different */
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    color: #fff;
}

.banner-parallax::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.banner-content h3 {
    font-size: 3rem;
    letter-spacing: 0.2em;
    line-height: 1.6;
}

/* Activities */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.activity-card {
    background-color: #fff;
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid transparent;
}

.activity-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-top-color: var(--primary-color);
}

.activity-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.activity-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.activity-details {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* Access */
.access-content {
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

@media (min-width: 900px) {
    .access-content {
        flex-direction: row;
    }
}

.access-info {
    padding: 50px;
    flex: 1;
}

.access-map {
    flex: 1;
    min-height: 400px;
    padding-top: 50px;
    padding-right: 50px;
    padding-bottom: 50px;
    /* Adding bottom for balance, though user didn't ask, usually looks better */
}

@media (max-width: 900px) {
    .access-map {
        padding-right: 0;
        /* On mobile, full width is usually better, or balanced padding */
        padding-left: 0;
        padding-top: 0;
    }
}

.access-info .address {
    font-size: 1.2rem;
    margin-top: 10px;
}

.access-info .phone {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin-bottom: 40px;
}

.access-details dt {
    font-weight: bold;
    margin-top: 20px;
    color: var(--primary-color);
}

.access-details dd {
    margin-top: 5px;
}

/* Contact */
.contact-box {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-box h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-block;
    margin-top: 40px;
    padding: 15px 40px;
    background-color: #fff;
    color: var(--text-color);
    font-weight: bold;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #fff;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* SNS Promo Box (for individual pages) */
.sns-promo-box {
    margin-top: 60px;
    text-align: center;
    padding: 40px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 8px;
}

.sns-promo-text {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Footer */
.footer {
    background-color: #222;
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
}

.footer-nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: #ccc;
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.8rem;
    color: #666;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

/* Responsive Adjustments */
@media (max-width: 1150px) {
    .nav-list {
        gap: 20px;
    }

    .nav-list a {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Page Specific Styles */
.page-main {
    padding-top: var(--header-height);
}

.page-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 60px;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1rem;
    letter-spacing: 0.2em;
    opacity: 0.8;
    text-transform: uppercase;
    font-family: var(--font-body);
}

.next-schedule-box {
    margin-top: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--text-color);
    padding: 20px 40px;
    display: inline-block;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 300px;
}

.next-schedule-label {
    font-size: 0.9rem;
    color: var(--accent-color);
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}

.next-schedule-date {
    font-size: 1.5rem;
    color: #c94e4e;
    /* Muted Red */
    font-weight: bold;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
}

.content-container {
    max-width: 800px;
}

.content-block {
    margin-bottom: 60px;
    line-height: 2;
}

.content-block h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.activity-detail-block {
    background-color: #fff;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.detail-header h3 {
    font-size: 1.8rem;
    margin: 0;
}

.tag {
    background-color: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.info-list {
    margin-top: 25px;
    background-color: #fafafa;
    padding: 20px;
    border-radius: 4px;
}

.info-list li {
    margin-bottom: 10px;
    border-bottom: 1px dotted #ddd;
    padding-bottom: 5px;
}

.info-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.back-link-container {
    text-align: center;
    margin-top: 60px;
}

/* Content Gallery (2 Columns) */
.content-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

@media (min-width: 768px) {
    .content-gallery {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.gallery-item img {
    width: 100%;
    height: 300px;
    /* Fixed height for alignment */
    object-fit: cover;
    /* Crop to fill */
    object-position: top;
    /* Anchor to top, trimming the bottom if needed */
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.gallery-caption {
    font-size: 0.9rem;
    color: var(--accent-color);
    line-height: 1.6;
}

/* Link Styles */
.read-more-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 30px;
    color: var(--primary-color);
    font-weight: bold;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.card-link:hover .activity-details span:last-child {
    text-decoration: underline;
}

/* Page Thumbnail */
.page-thumbnail {
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
    transition: transform 0.5s ease;
}

.page-thumbnail:hover img {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .page-thumbnail img {
        max-height: 250px;
    }
}

/* Memorial Page Styles */
.timeline-grid ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    /* Added spacing */
}

.timeline-grid li {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 15px 10px;
    text-align: center;
    border-radius: 4px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.step-list dl {
    margin: 0;
}

.step-list dt {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.step-list dt:first-child {
    margin-top: 0;
}

.step-list dd {
    margin-left: 14px;
    margin-top: 5px;
    padding-left: 10px;
    border-left: 1px solid #eee;
}

.info-box {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 0.9rem;
}

.soto-note {
    border-left: 4px solid #aaa;
    background-color: #fafafa;
}

.note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}

/* Step Grid Styles */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.step-item {
    position: relative;
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-weight: bold;
    margin-bottom: 10px;
}

.step-img {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: #eee;
}

.step-img img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.3s;
}

.step-img img:hover {
    transform: scale(1.05);
}

.step-item h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.step-item p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Comprehensive Memorial Styles */
.memorial-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media (min-width: 900px) {
    .memorial-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .info-section.full-width {
        grid-column: 1 / -1;
    }
}

.info-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    /* Slightly softer corners */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--primary-color);
}

.info-section h4 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: var(--text-color);
}

.section-intro {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

/* Timeline List (DL style) */
.timeline-list dl {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-list dt {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-list dd {
    margin-left: 0;
    /* Reset default margin */
    padding-left: 1rem;
    border-left: 2px solid #eee;
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.5;
}

/* Check List */
.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    margin-bottom: 15px;
    padding-left: 1.5em;
    position: relative;
}

.check-list li::before {
    content: '✔';
    /* Or custom icon */
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Note Box */
.note-box {
    background-color: #f9f9f7;
    /* Very light beige */
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.note-box h5 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.note-box ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

/* Split Content (3 cols for fees etc) */
.split-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .split-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.split-content h5 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-left: 3px solid var(--primary-color);
    padding-left: 10px;
}

.fee-list,
.rules-list {
    font-size: 0.95rem;
}

.rules-list dt {
    font-weight: bold;
    margin-top: 15px;
    color: var(--text-color);
}

.rules-list dd {
    margin-left: 0;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 1px solid #ddd;
}

/* Facilities & Equipment Page */
.map-container {
    margin-top: 40px;
    margin-bottom: 60px;
    text-align: center;
}

.map-block h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.map-img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.map-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .map-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.facility-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.facility-card:hover {
    transform: translateY(-5px);
}

.facility-img {
    height: 200px;
    overflow: hidden;
}

.facility-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.facility-card:hover .facility-img img {
    transform: scale(1.05);
}

.facility-content {
    padding: 20px;
}

.facility-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.facility-content p {
    font-size: 0.95rem;
    color: var(--accent-color);
}

/* Equipment List */
.equipment-list {
    margin-top: 40px;
    display: grid;
    gap: 40px;
}

.equipment-item {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .equipment-item {
        flex-direction: row;
        align-items: center;
    }

    .eq-img,
    .eq-img-group {
        flex: 1;
        max-width: 400px;
    }

    .eq-content {
        flex: 1;
    }
}

.eq-img img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.eq-img-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.eq-img-group img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.eq-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.eq-content p {
    font-size: 1rem;
    line-height: 1.8;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Add pointer cursor to clickable images */
.facility-img img,
.eq-img img,
.eq-img-group img {
    cursor: pointer;
}

/* Figure & Caption Styles */
figure {
    margin: 0 0 30px 0;
    width: 100%;
}

figure img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

figcaption {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-top: 10px;
    text-align: center;
    line-height: 1.6;
    background-color: #f9f9f7;
    padding: 10px;
    border-radius: 4px;
}

/* Reference Link Section */
.reference-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.reference-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.reference-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.reference-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.reference-img-wrapper {
    height: 120px;
    background-color: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.reference-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.reference-img-wrapper.text-only {
    background-color: var(--primary-color);
}

.text-icon {
    font-size: 1.4rem;
    line-height: 1.4;
    text-align: center;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: bold;
    display: inline-block;
    width: 100%;
}

.reference-text {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.reference-text h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.reference-text p {
    font-size: 0.9rem;
    color: var(--accent-color);
    line-height: 1.6;
}