/* Makise Co., Ltd. - Global Styles */

:root {
    --primary-color: #003366; /* Deep blue for reliability */
    --secondary-color: #0055aa;
    --accent-color: #ffaa00;
    --text-color: #333333;
    --bg-color: #ffffff;
    --light-gray: #f4f7f9;
    --border-color: #e0e0e0;
    --font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --header-height: 80px;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header & Navigation */
header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 50px;
    width: auto;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-weight: 500;
    font-size: 0.95rem;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

.dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    min-width: 200px;
    display: none;
    padding: 10px 0;
    border-radius: 4px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

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

.dropdown-menu li a:hover {
    background: var(--light-gray);
}

/* Hero Section */
.hero {
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    margin-top: var(--header-height);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 51, 102, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--accent-color);
    color: #fff;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background: #e69900;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layouts */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    grid-auto-flow: dense; /* Fill gaps automatically */
}

.service-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: var(--secondary-color);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--primary-color);
    margin-top: 15px;
}

.service-card p {
    font-size: 0.95rem;
    color: #555;
    flex-grow: 1;
}

/* Stretched Link & Button More */
.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

.service-card {
    position: relative;
    cursor: pointer;
}

.btn-more {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 25px;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.3s;
    text-align: center;
    width: fit-content;
}

.service-card:hover .btn-more {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Before/After styles */
.ba-container {
    display: flex;
    gap: 12px;
    margin-bottom: 0px;
}

.ba-item {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.ba-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 51, 102, 0.85);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.7rem;
    border-radius: 4px;
    font-weight: 700;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ba-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Detail Gallery Styles */
.detail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.gallery-item {
    width: 100px;
}

.gallery-item img {
    border-radius: 6px;
    width: 100%;
    height: 70px;
    object-fit: cover;
    transition: 0.3s;
}

.before-after-card {
    grid-column: span 2;
}

.clickable {
    cursor: pointer;
}

/* Lightbox Styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    border: 3px solid #fff;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    cursor: default;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 3rem;
    padding: 20px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
    border-radius: 4px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr); /* Fixed 3 columns on large screens */
    }
}

@media (max-width: 1199px) {
    .before-after-card {
        grid-column: span 1;
    }
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    nav ul { display: none; }
    .company-info th { width: 120px; }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    .ba-container {
        flex-direction: column;
    }
    .ba-item img {
        height: auto;
    }
    .before-after-card {
        grid-column: span 1;
    }
}

/* Company Table */
.company-info {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
}

.company-info th, .company-info td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.company-info th {
    width: 250px;
    background: var(--light-gray);
    text-align: left;
    color: var(--primary-color);
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #aaa;
}

.footer-col ul li a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #333;
    color: #777;
    font-size: 0.85rem;
}
