/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
    --color_main: #0066cc;
    --color_main_dark: #0052a3;
    --color_main_light: #3385d6;
    --color_text: #333333;
    --color_bg: #ffffff;
    --color_bg_gray: #f0f5fa;
    --color_border: #d4e2f0;
    --swl-font_family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "メイリオ", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    --container_size: 1200px;
    --header_height: 80px;
    --header_height_scroll: 60px;
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--swl-font_family);
    color: var(--color_text);
    background-color: var(--color_bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--color_main);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container_size);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */
.l-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header_height);
    background-color: var(--color_bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: var(--transition);
}

.l-header.scrolled {
    height: var(--header_height_scroll);
}

.l-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container_size);
    margin: 0 auto;
    padding: 0 20px;
}

.l-header__logo {
    flex-shrink: 0;
}

.l-header__logo img {
    height: 40px;
    transition: var(--transition);
}

.l-header.scrolled .l-header__logo img {
    height: 30px;
}

.l-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu__item {
    position: relative;
}

.nav-menu__item > a {
    display: block;
    padding: 10px 0;
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu__item.has-dropdown > a::after {
    content: '\25BC';
    font-size: 0.8em;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: var(--color_bg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    list-style: none;
}

.nav-menu__item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--color_border);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 15px 20px;
}

.dropdown-menu a:hover {
    background-color: var(--color_bg_gray);
}

.l-header__actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-corporate,
.btn-consultation {
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-corporate {
    border: 1px solid var(--color_text);
}

.btn-corporate:hover {
    background-color: var(--color_text);
    color: var(--color_bg);
}

.btn-consultation {
    background-color: var(--color_main);
    color: var(--color_bg);
}

.btn-consultation:hover {
    background-color: var(--color_main_dark);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color_text);
    margin: 3px 0;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--header_height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header_height));
    background-color: var(--color_bg);
    transform: translateX(-100%);
    transition: var(--transition);
    overflow-y: auto;
    z-index: 999;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav > ul > li {
    border-bottom: 1px solid var(--color_border);
}

.mobile-nav a {
    display: block;
    padding: 15px 20px;
    font-weight: 500;
}

.mobile-nav .submenu {
    background-color: var(--color_bg_gray);
    display: none;
}

.mobile-nav .has-submenu.active .submenu {
    display: block;
}

.btn-corporate-mobile,
.btn-consultation-mobile {
    margin: 20px;
    text-align: center;
    padding: 12px 24px;
    border-radius: 4px;
}

.btn-corporate-mobile {
    border: 1px solid var(--color_text);
}

.btn-consultation-mobile {
    background-color: var(--color_main);
    color: var(--color_bg);
}

/* ==========================================================================
   Main Visual Slider
   ========================================================================== */
.main-visual {
    margin-top: var(--header_height);
    position: relative;
    overflow: hidden;
}

.main-visual-slider {
    height: 500px;
}

.main-visual-slider .swiper-slide {
    position: relative;
}

.main-visual-slider .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.main-visual-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--color_bg);
    z-index: 2;
}

.slide-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn-more {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color_main);
    color: var(--color_bg);
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-more:hover {
    background-color: var(--color_main_dark);
    transform: translateY(-2px);
}

.main-visual-slider .swiper-pagination-bullet {
    background-color: var(--color_bg);
    opacity: 0.5;
}

.main-visual-slider .swiper-pagination-bullet-active {
    opacity: 1;
}

.main-visual-slider .swiper-button-next,
.main-visual-slider .swiper-button-prev {
    color: var(--color_bg);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.l-main {
    padding: 60px 0;
    background-color: var(--color_bg_gray);
}

/* Widget Title */
.c-widget__title {
    font-size: 2rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--color_main);
    display: inline-block;
}

/* ==========================================================================
   Article List
   ========================================================================== */
.p-postList {
    margin-bottom: 80px;
}

.p-postList__items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.p-postList__item {
    background-color: var(--color_bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.p-postList__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.p-postList__link {
    display: block;
}

.p-postList__thumb {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.p-postList__thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.p-postList__item:hover .p-postList__thumb img {
    transform: scale(1.1);
}

.p-postList__body {
    padding: 20px;
}

.p-postList__cat {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--color_main);
    color: var(--color_bg);
    font-size: 0.75rem;
    border-radius: 3px;
    margin-bottom: 10px;
}

.p-postList__title {
    font-size: 1.125rem;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--color_text);
}

.p-postList__date {
    font-size: 0.875rem;
    color: #666;
}

.p-postList__more {
    text-align: center;
}

.btn-more-articles {
    display: inline-block;
    padding: 15px 40px;
    border: 2px solid var(--color_main);
    color: var(--color_main);
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-more-articles:hover {
    background-color: var(--color_main);
    color: var(--color_bg);
}

/* ==========================================================================
   Special Features Carousel
   ========================================================================== */
.special-features {
    margin-bottom: 80px;
    position: relative;
}

.features-carousel {
    overflow: visible;
    padding: 0 20px;
}

.features-carousel .swiper-wrapper {
    align-items: stretch;
}

.features-carousel .swiper-slide {
    height: auto;
}

.feature-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
    background-color: var(--color_bg);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.feature-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.feature-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--color_bg);
    font-size: 1.125rem;
    margin: 0;
}

/* ==========================================================================
   Category Links
   ========================================================================== */
.category-links {
    margin-bottom: 80px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-box {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.category-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.category-box img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.category-box h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--color_bg);
    font-size: 1.125rem;
    text-align: center;
}

/* ==========================================================================
   Video Content
   ========================================================================== */
.video-content {
    margin-bottom: 80px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.video-card {
    background-color: var(--color_bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.video-thumb {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
    cursor: pointer;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 102, 204, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.play-button i {
    color: white;
    font-size: 24px;
    margin-left: 4px;
}

.video-card:hover .play-button {
    background-color: rgba(0, 82, 163, 0.95);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-card h3 {
    padding: 20px 20px 10px;
    font-size: 1.125rem;
}

.video-card p {
    padding: 0 20px 20px;
    color: #666;
    font-size: 0.875rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.l-footer {
    background-color: #0f2940;
    color: #ccc;
}

/* Footer CTA */
.footer-cta {
    background-color: #1a3a52;
    padding: 60px 0;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cta-box {
    text-align: center;
    padding: 30px;
    background-color: #234a68;
    border-radius: 8px;
    transition: var(--transition);
}

.cta-box:hover {
    background-color: #2d5a7b;
    transform: translateY(-5px);
}

.cta-box i {
    font-size: 3rem;
    color: var(--color_main);
    margin-bottom: 20px;
}

.cta-box h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color_bg);
}

.cta-box p {
    font-size: 0.875rem;
}

/* Footer Navigation */
.footer-nav {
    padding: 40px 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--color_bg);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    font-size: 0.875rem;
}

/* Footer Bottom */
.footer-bottom {
    background-color: #0a1929;
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    font-size: 1.25rem;
}

.copyright {
    font-size: 0.875rem;
}

/* ==========================================================================
   Sticky Footer Banner
   ========================================================================== */
.sticky-footer-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color_main);
    color: var(--color_bg);
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transform: translateY(100%);
    transition: var(--transition);
    z-index: 900;
}

.sticky-footer-banner.show {
    transform: translateY(0);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-cta {
    padding: 10px 30px;
    background-color: var(--color_bg);
    color: var(--color_main);
    border-radius: 4px;
    font-weight: 500;
}

.btn-cta:hover {
    background-color: #f0f0f0;
}

.banner-close {
    background: none;
    border: none;
    color: var(--color_bg);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 10px;
}

/* ==========================================================================
   Exit Intent Popup
   ========================================================================== */
.exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 2000;
}

.exit-popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: var(--color_bg);
    border-radius: 8px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.popup-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--color_main);
}

.popup-content p {
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.popup-content img {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
}

.btn-popup-cta {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--color_main);
    color: var(--color_bg);
    border-radius: 4px;
    font-size: 1.125rem;
    font-weight: 500;
}

.btn-popup-cta:hover {
    background-color: var(--color_main_dark);
}

.popup-note {
    font-size: 0.875rem;
    color: #666;
    margin-top: 15px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 960px) {
    .l-header__nav {
        display: none;
    }
    
    .l-header__actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-visual-slider {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .p-postList__items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    :root {
        --header_height: 60px;
        --header_height_scroll: 50px;
    }
    
    .main-visual-slider {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 1.5rem;
    }
    
    .slide-content p {
        font-size: 0.875rem;
        margin-bottom: 20px;
    }
    
    .btn-more {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
    
    .c-widget__title {
        font-size: 1.5rem;
    }
    
    .p-postList__items {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .features-carousel .swiper-slide {
        width: 80%;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 599px) {
    .container {
        padding: 0 15px;
    }
    
    .l-main {
        padding: 40px 0;
    }
    
    .p-postList,
    .special-features,
    .category-links,
    .video-content {
        margin-bottom: 50px;
    }
}