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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-weight: 500;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
}

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

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 4rem;
    color: #008080;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: #ff7f50;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
}

/* Buttons */
.btn-primary {
    background: #ff7f50;
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 100%, 15px 100%);
    display: inline-block;
    font-family: 'Zen Maru Gothic', sans-serif;
}

.btn-primary:hover {
    background: #e66b42;
    transform: translateX(5px);
    color: white;
}

.btn-outline {
    background: transparent;
    color: #008080;
    padding: 0.8rem 2rem;
    border: 2px solid #008080;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 100%, 15px 100%);
    display: inline-block;
    font-family: 'Zen Maru Gothic', sans-serif;
}

.btn-outline:hover {
    background: #008080;
    color: white;
    transform: translateY(-3px);
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: white;
    z-index: 1000;
    padding: 1rem 2rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.nav-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 60px;
    height: 60px;
    background: #008080;
    transform: translateY(-50%) rotate(45deg);
    z-index: -1;
    opacity: 0.1;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: #008080;
    position: relative;
    z-index: 10;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-item a {
    text-decoration: none;
    color: #333333;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: #ff7f50;
    transition: width 0.3s ease;
}

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

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 1rem 0;
    margin-top: 1rem;
}

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

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #333333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #008080;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu span {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #999;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #333333;
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 2rem;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

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

.mobile-nav > ul > li {
    margin-bottom: 1rem;
}

.mobile-nav a {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.mobile-nav .btn-primary {
    margin-top: 1rem;
    text-align: center;
}

.mobile-dropdown-toggle {
    cursor: pointer;
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    color: #333333;
}

.mobile-dropdown-menu {
    padding-left: 1rem;
    margin-top: 0.5rem;
    list-style: none;
}

.mobile-dropdown-menu a {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #008080, #20b2aa);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}


.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: rgba(255, 127, 80, 0.1);
    transform: rotate(15deg);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 60%;
    height: 120%;
    background: rgba(173, 255, 47, 0.1);
    transform: rotate(-25deg);
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    min-height: 1.2em;
}

.hero h1::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 40px;
    height: 40px;
    background: #ff7f50;
    transform: rotate(45deg);
    z-index: -1;
}

.hero-subtitle {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    margin-top: 2rem;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

/* Typewriter Animation */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    background-color: white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

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

/* Services Section */
.services {
    padding: 6rem 2rem;
    background: #f8f9fa;
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, #008080, transparent);
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0 80%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 10;
}

/* Service Card - Updated Hover Effects */
.service-card {
    background: white;
    padding: 2rem;
    position: relative;
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
    z-index: 5;
}

.service-card:hover::before {
    opacity: 1;
    animation: shine 0.6s ease-in-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.service-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f0f0f0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.service-image:hover img {
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    padding: 1rem;
    text-align: center;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.service-card h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #555;
}

.service-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}

/* Service Card Colors */
.service-card.service-1 h3 { background: #008080; }
.service-card.service-2 h3 { background: #ff7f50; }
.service-card.service-3 h3 { background: #adff2f; color: #333; }
.service-card.service-4 h3 { background: #cd5c5c; }
.service-card.service-5 h3 { background: #4b0082; }
.service-card.service-6 h3 { background: #ff69b4; }

/* News Section */
.news {
    padding: 6rem 2rem;
    background: white;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #eee;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transition: left 0.5s ease;
}

.news-item:hover::before {
    left: 100%;
}

.news-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.news-date {
    background: #008080;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 2rem;
    min-width: 120px;
    text-align: center;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.news-more {
    text-align: center;
    margin-top: 3rem;
}

/* About Section - Updated with Table Style */
.about {
    padding: 6rem 2rem;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

/* Company Table Styles */
.company-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.company-table th,
.company-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.company-table th {
    background: #f8f9fa;
    font-weight: 500;
    color: #333;
    width: 30%;
}

.company-table td {
    color: #666;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.badge.invoice {
    background: #e3f2fd;
    color: #1976d2;
}

.badge.non-smoking {
    background: #e8f5e8;
    color: #388e3c;
}

.service-area h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #008080;
    margin-bottom: 2rem;
}

.area-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.prefecture h5 {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #008080;
    color: white;
    border-radius: 5px;
}

.prefecture p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.8;
}

.area-note {
    font-style: italic;
    color: #888;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #ff7f50;
}

/* Contact Section */
.contact {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #008080, #20b2aa);
    color: white;
    text-align: center;
}

.contact .section-title {
    color: white;
}

.contact .section-title::after {
    background: white;
}

.contact-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.contact-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact .btn-primary {
    background: white;
    color: #008080;
}

.contact .btn-primary:hover {
    background: #f8f9fa;
    color: #008080;
}

.contact .btn-outline {
    border-color: white;
    color: white;
}

.contact .btn-outline:hover {
    background: white;
    color: #008080;
}

/* Footer */
.footer {
    background: #333333;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
}

.footer-logo .logo {
    color: white;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    color: #ccc;
    font-size: 0.9rem;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #008080;
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
}

.scroll-top.visible {
    opacity: 1;
}

.scroll-top:hover {
    background: #ff7f50;
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .area-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .company-table th {
        width: 35%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-menu,
    .cta-buttons {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services {
        padding: 4rem 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .news-date {
        margin-right: 0;
        margin-bottom: 1rem;
        min-width: auto;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .about-content {
        text-align: center;
    }
    
    .company-table th,
    .company-table td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .company-table th {
        width: 40%;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}