:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #00d2ff;
    --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: transparent;
}

/* Ambient Light Effect */
.ambient-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 0%, rgba(0, 229, 255, 0.35) 0%, transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(0, 89, 255, 0.3) 0%, transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(0, 42, 120, 0.4) 0%, transparent 80%);
    pointer-events: none;
    z-index: -3;
    animation: ambientShine 12s ease-in-out infinite alternate;
}

@keyframes ambientShine {
    0% { opacity: 0.6; transform: scale(1) translateY(0); }
    50% { opacity: 1; transform: scale(1.1) translateY(2%); }
    100% { opacity: 0.7; transform: scale(1) translateY(-2%); }
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Accessibility / SEO: 画面には表示されないがSEO・スクリーンリーダーに有効 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.dark-bg {
    background-color: #0a0a0a;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 10px 24px;
    background: var(--accent-gradient);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.3);
}

.btn-primary.large {
    padding: 15px 32px;
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(15px);
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 2.2rem;
    font-weight: 800;
    margin-left: 5%;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    margin-right: 5%;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    cursor: pointer;
    margin-right: 5%;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.45); /* 映像が見えつつ、白文字が最も読みやすい暗さに調整 */
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5,5,5,0.08) 0%, rgba(5,5,5,0.65) 100%);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    white-space: nowrap;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    background: rgba(5, 10, 15, 0.65);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 210, 255, 0.3);
    background: rgba(15, 25, 35, 0.85);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
}

/* Drone Animation */
.drone-anim {
    animation: droneHover 3s ease-in-out infinite;
}

.propeller {
    transform-origin: center;
    animation: propellerSpin 0.1s linear infinite;
}

/* ROV Animation */
.rov-anim {
    animation: rovHover 4s ease-in-out infinite;
}

.light-beam {
    animation: lightPulse 2s ease-in-out infinite;
}

/* Confined Space Drone Animation */
.confined-anim {
    animation: confinedHover 2.5s ease-in-out infinite;
}

.cage-spin {
    transform-origin: center;
    animation: cageSpin 10s linear infinite;
}

@keyframes droneHover {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(1deg); }
    50% { transform: translateY(-8px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(-1deg); }
}

@keyframes propellerSpin {
    0% { opacity: 1; transform: scaleX(1); }
    50% { opacity: 0.5; transform: scaleX(0.2); }
    100% { opacity: 1; transform: scaleX(1); }
}

@keyframes rovHover {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(4px) rotate(2deg); }
    66% { transform: translateY(-2px) rotate(-1deg); }
}

@keyframes lightPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

@keyframes confinedHover {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(2deg); }
    50% { transform: translateY(-6px) rotate(-1deg); }
    75% { transform: translateY(-3px) rotate(3deg); }
}

@keyframes cageSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Fleet */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.fleet-card {
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.fleet-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.fleet-card .img-container {
    height: 260px;
    background-color: #ffffff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fleet-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.fleet-card:hover img {
    transform: scale(1.05);
}

/* Specifically enlarge the IBIS image which has more white space */
.ibis-img {
    transform: scale(1.6);
}

.fleet-card:hover .ibis-img {
    transform: scale(1.7);
}

.fleet-info {
    padding: 20px;
    text-align: center;
}

.fleet-info h3 {
    margin-bottom: 5px;
    color: var(--accent-color);
}

.fleet-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 320px;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* ホバー時に画像を暗くしない */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item .overlay span {
    color: #ffffff; /* 文字色は白 */
    font-weight: 700;
    font-size: 1.3rem;
    transform: translateY(20px);
    transition: var(--transition);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.8); /* 画像が明るくても読めるように強力なシャドウを追加 */
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.1);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

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

/* Contact */
.contact-section {
    position: relative;
}

.contact-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
    text-align: center;
}

.contact-box h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-box > p {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.contact-layout {
    display: flex;
    gap: 50px;
    text-align: left;
    margin-top: 40px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .contact-layout {
        flex-direction: column;
    }
}

.contact-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-form-container {
    flex: 1.2;
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

.form-group .required {
    color: #ff4d4d;
    margin-left: 5px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.4);
}

.form-submit {
    width: 100%;
    margin-top: 10px;
    padding: 15px;
    font-size: 1.1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-item .icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.contact-item p, .contact-item a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--accent-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Map Styles */
.contact-map {
    margin-top: 40px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    background: var(--glass-bg);
    line-height: 0;
}

.contact-map iframe {
    filter: grayscale(0.2);
    opacity: 0.9;
    transition: var(--transition);
}

.contact-map:hover iframe {
    filter: none;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content p {
        white-space: normal;
        font-size: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        background: rgba(5,5,5,0.95);
        backdrop-filter: blur(10px);
        width: 100%;
        flex-direction: column;
        padding: 20px 0;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: block;
    }
}

/* ============================================================
   ★ 点検実績ギャラリー用ライトボックス（拡大ポップアップ）
============================================================ */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    opacity: 0;
    transition: opacity 0.4s ease;
    align-items: center;
    justify-content: center;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--text-primary);
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    line-height: 0;
    padding-bottom: 8px;
}

.lightbox-close:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

#lightbox-media-container {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    background: #000;
}

#lightbox-media-container img,
#lightbox-media-container video {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    -webkit-touch-callout: none; /* iOS長押し時の保存・コピーメニューを禁止 */
    user-select: none;          /* 選択禁止 */
}

#lightbox-caption {
    margin-top: 20px;
    color: #ffffff; /* グラデーションから白色に変更 */
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9);
    display: inline-block;
}

#lightbox-media-container video::-webkit-media-controls-enclosure {
    background-color: transparent !important;
    background-image: none !important;
}

#lightbox-media-container video::-webkit-media-controls-panel {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 40px;
    }
    
    #lightbox-caption {
        font-size: 1.1rem;
    }
}

/* ============================================================
   ★ ニュースセクション (News Section)
============================================================ */
.news-section {
    position: relative;
    padding-bottom: 50px;
}

.news-container {
    display: flex;
    gap: 40px;
    padding: 40px;
    align-items: center;
    background: rgba(5, 10, 15, 0.45);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.news-container:hover {
    border-color: rgba(0, 210, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 210, 255, 0.15);
    transform: translateY(-5px);
}

.news-banner-link {
    flex: 1;
    max-width: 420px;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    line-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.news-banner-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: var(--transition);
}

.news-banner-link:hover .news-banner-img {
    transform: scale(1.04);
}

.news-content {
    flex: 1.6;
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.news-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 0.9rem;
}

.news-date {
    color: var(--text-secondary);
    font-weight: 500;
}

.news-category {
    background: var(--accent-gradient);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.news-title {
    font-size: 1.6rem;
    color: var(--text-primary);
    line-height: 1.4;
    font-weight: 700;
}

.news-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.btn-news {
    align-self: flex-start;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-news:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.btn-news:hover .arrow {
    transform: translateX(5px);
}

.btn-news .arrow {
    transition: var(--transition);
    display: inline-block;
}

@media (max-width: 992px) {
    .news-container {
        flex-direction: column;
        align-items: stretch;
        padding: 30px 20px;
        gap: 30px;
    }
    
    .news-banner-link {
        max-width: 100%;
    }
    
    .news-title {
        font-size: 1.3rem;
    }
}
