/* ===================================
   GB-POWER Website - Merged Stylesheet
   =================================== */

/* CSS Custom Properties (Variables) */
:root {
  /* Colors */
  --color-primary: #CBBB8C;
  --color-accent: #E355A4;
  --color-text-light: #FFFFFF;
  --color-text-dark: #CCCCCC;
  --color-background: #000000;
  --color-background-alt: #FFFFFF;
  --color-overlay: rgba(0, 0, 0, 0.3);

  /* Typography */
  --font-family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", sans-serif;
  --font-size-base: 14px;
  --line-height: 1.5;

  /* Layout */
  --max-width: 1200px;
  --section-padding: 30px;

  /* Transitions */
  --transition-speed: 0.8s;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-background);
  color: var(--color-text-light);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Selective user-select: none for interactive elements */
button, a, .nav-links a, .logout-btn, .action-btn, .login-btn,
.mobile-nav-toggle, .tab-btn, .delete-btn, .status-btn, .inquiry-filters button {
  -webkit-touch-callout: none;
  user-select: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  margin: 0;
}

/* Links */
a {
  text-decoration: none;
  color: var(--color-text-light);
  transition: color 0.3s ease;
}

a:visited {
  color: var(--color-text-light);
}

a:hover {
  color: var(--color-text-dark);
}

a:hover img {
  opacity: 0.7;
  filter: alpha(opacity=70);
}

.link-underline {
  text-decoration: underline;
  font-weight: bold;
}

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

.full-width-image {
  width: 100vw;
  max-width: none;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.image img {
  border-radius: 10px;
}

/* Lists */
ul {
  list-style: none;
}

/* Tables (for legacy structure compatibility) */
table {
  border-collapse: collapse;
}

/* ===================================
   Video Background
   =================================== */

#video-area {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 70px);
  z-index: -1;
  overflow: hidden;
  background-color: var(--color-background);
}

#video-area video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Video Overlay */
#video-area::after {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-overlay);
  background-image: radial-gradient(#999 3%, transparent 10%), radial-gradient(#111 3%, transparent 31%);
  background-size: 4px 4px;
  background-position: 0 0, 4px 4px;
  z-index: 1;
}

/* Movie/Video Container (legacy) */
.movie {
  display: none;
}

/* ===================================
   Layout Components
   =================================== */

.wrapper {
  position: relative;
  z-index: 1;
  margin-top: 70px !important;
}

.frame {
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: relative;
}

/* Header */
#header {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

/* Hero Title */
.hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);
  color: #fff;
  text-shadow: 0 0 15px #666;
  text-align: center;
  z-index: 1;
}

/* Container */
#container {
  width: 100%;
  background-color: var(--color-background);
  position: relative;
  z-index: 1;
}

/* ===================================
   Content Sections
   =================================== */

#container section,
.section-content {
  background-color: var(--color-background);
  width: 100%;
  padding: 40px 0 0;
}

.section-inner {
  width: 92%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 0 0;
  text-align: left;
}

.section-inner--center {
  text-align: center;
}

/* Section Titles */
.section-title {
  color: var(--color-primary);
  font-size: 32px;
  font-family: var(--font-family);
  text-align: center;
  margin-bottom: 20px;
}

.item-title {
  color: var(--color-primary);
  font-size: 24px;
  font-family: Impact, sans-serif;
  margin-bottom: 20px;
}

.item-title a {
  font-size: 14px;
}

/* Text Blocks */
.text-block {
  color: var(--color-primary);
  font-size: 16px;
  margin-bottom: 15px;
}

.company-description {
  font-size: 18px;
}

.highlight-text {
  color: var(--color-accent);
  font-size: 48px;
  font-family: Impact, sans-serif;
  margin-bottom: 10px;
}

.subtitle-text {
  color: var(--color-text-light);
  font-size: 24px;
  margin-bottom: 10px;
}

.highlight-text--small {
  color: var(--color-text-light);
  font-size: 28px;
  text-align: center;
}

.towa-text {
  font-size: 24px;
  color: var(--color-primary);
}

/* ===================================
   Grid Layouts
   =================================== */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 0 auto;
  padding: 20px 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto;
  padding: 20px;
}

/* Feature Cards */
.feature-card {
  background: transparent;
  text-align: center;
}

.feature-card img {
  margin: 0 auto 15px;
}

.feature-card p {
  text-align: left;
}

/* ===================================
   Catalog Section
   =================================== */

.catalog-section {
  background-color: var(--color-background);
  padding: 40px 0;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.catalog-item {
  text-align: center;
}

.catalog-item img {
  width: 230px;
  height: 336px;
  object-fit: cover;
  margin: 0 auto 15px;
}

.catalog-item-title {
  color: var(--color-primary);
  font-size: 14px;
  margin-top: 10px;
}

/* ===================================
   News Section
   =================================== */

.news-section {
  background-color: var(--color-background);
  padding: 40px 0;
}

.news-list {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.news-item {
  color: var(--color-primary);
  font-size: 14px;
  margin-bottom: 15px;
}

/* ===================================
   Footer & Address
   =================================== */

.address-section {
  background-color: var(--color-background);
  margin: 0 auto;
  text-align: center;
  padding: 20px;
}

.address-text {
  color: var(--color-primary);
  font-size: 16px;
  text-align: center;
}

/* Google Map */
.map-container {
  max-width: 950px;
  margin: 0 auto;
  padding: 20px;
}

.map-container iframe {
  width: 100%;
  max-width: 950px;
  height: 450px;
  border: 0;
}

/* ===================================
   Navigation / Header Component
   =================================== */

.floating-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 70px;
  background-color: #000000;
  z-index: 9999;
  border: none;
}

.floating-menu .menu-content {
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.floating-menu .logo {
  flex-shrink: 0;
}

.floating-menu .logo img {
  width: 200px;
  height: auto;
}

.floating-menu .nav-links {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.floating-menu .nav-links a {
  color: var(--color-primary);
  font-size: 14px;
  padding: 5px 10px;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.floating-menu .nav-links a:hover {
  color: var(--color-text-light);
}

.floating-menu .nav-separator {
  color: var(--color-primary);
  margin: 0 5px;
}

/* Mobile Navigation Hamburger */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 10000;
}

.mobile-nav-toggle .hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 5px 0;
  transition: all 0.3s ease;
}

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

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

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

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9998;
  transition: right 0.3s ease;
  padding: 80px 20px 20px;
}

.mobile-nav-drawer.active {
  right: 0;
}

.mobile-nav-drawer .nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-drawer .nav-list li {
  margin-bottom: 15px;
}

.mobile-nav-drawer .nav-list a {
  color: var(--color-primary);
  font-size: 16px;
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid rgba(203, 187, 140, 0.3);
}

.mobile-nav-drawer .nav-list a:hover {
  color: var(--color-text-light);
}

.mobile-nav-drawer .nav-list a.phone-link {
  color: var(--color-primary);
  font-size: 14px;
  margin-top: 20px;
}

/* ===================================
   Footer Component
   =================================== */

.footer {
  background-color: #000000;
  color: var(--color-primary);
}

.footer-content {
  background-color: #000000;
  margin: 0 auto;
  text-align: center;
  padding: 40px 20px 20px;
}

.footer-section {
  background-color: #000000;
}

.footer-section-title {
  color: var(--color-primary);
  font-size: 20px;
  font-family: Impact, sans-serif;
  margin-bottom: 15px;
}

/* Instagram/Footer Links */
.instagram-link {
  display: inline-block;
}

.instagram-link img {
  width: 100px;
  height: auto;
  margin: 0 auto 10px;
}

.instagram-link .insta-text {
  color: var(--color-primary);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.instagram-link .insta-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

/* SDGs Section */
.sdgs-section {
  max-width: 800px;
  margin: 0 auto;
}

.footer-section.sdgs-section {
  padding-top: 40px;
}

.sdgs-section img {
  max-width: 100%;
  height: auto;
  margin-bottom: 15px;
}

.sdgs-section p {
  font-size: 14px;
  line-height: 1.6;
}

/* Copyright */
.copyright {
  font-size: 12px;
}

/* ===================================
   Button Component
   =================================== */

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--color-primary);
  color: var(--color-background);
  font-weight: bold;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  background-color: transparent;
  color: var(--color-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-background);
}

/* ===================================
   Card Component
   =================================== */

.card {
  background: transparent;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-image {
  margin-bottom: 15px;
}

.card-image img {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.card-title {
  color: var(--color-primary);
  font-size: 18px;
  font-family: Impact, sans-serif;
  margin-bottom: 10px;
}

.card-content {
  color: var(--color-primary);
  font-size: 14px;
  line-height: 1.5;
}

/* ===================================
   Form Components
   =================================== */

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

.form-label {
  display: block;
  color: var(--color-primary);
  font-size: 14px;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--color-primary);
  color: var(--color-text-light);
  font-family: var(--font-family);
  font-size: 14px;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* ===================================
   Utilities
   =================================== */

/* Separator */
.separator {
  border-width: 1px 0 0 0;
  border-style: solid;
  border-color: var(--color-primary);
  margin-top: 2px;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Clearfix */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* Container */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Section Wrapper */
.section {
  width: 100%;
  padding: 40px 0;
}

.section--dark {
  background-color: var(--color-background);
}

.section--light {
  background-color: var(--color-background-alt);
}

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Spacing Utilities */
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.py-20 { padding-top: 20px; padding-bottom: 20px; }
.py-30 { padding-top: 30px; padding-bottom: 30px; }
.py-40 { padding-top: 40px; padding-bottom: 40px; }

/* ===================================
   Animation Classes
   =================================== */

/* ===================================
   Loop Animation (Images)
   =================================== */

.loop {
  padding-top: 30px;
  padding-bottom: 30px;
  overflow: hidden;
}

.loop__box {
  display: flex;
  width: 100vw;
}

.loop__box img {
  min-width: 100vw;
}

.loop__box img:first-child {
  animation: loop 40s -20s linear infinite;
}

.loop__box img:last-child {
  animation: loop2 40s linear infinite;
}

@keyframes loop {
  0% { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

@keyframes loop2 {
  0% { transform: translateX(0); }
  to { transform: translateX(-200%); }
}

/* ===================================
   Back to Top Button
   =================================== */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.back-to-top img {
  width: 50px;
  height: auto;
}

.back-to-top:hover {
  opacity: 1;
}

/* ===================================
   Responsive Breakpoints
   =================================== */

/* Tablet and below (768px) */
@media (max-width: 768px) {
  .floating-menu .nav-links {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .mobile-nav-drawer {
    display: block;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-list {
    max-width: 100%;
  }

  .hero-title {
    font-size: 18px !important;
  }

  #video {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
  }
}

/* Mobile Portrait (480px) */
@media (max-width: 480px) {
  :root {
    --font-size-base: 13px;
  }

  .floating-menu .logo img {
    width: 150px;
  }

  .section-title {
    font-size: 20px;
  }

  .highlight-text {
    font-size: 22px;
  }
  
  .highlight-text--small {
    color: var(--color-text-light);
    font-size: 20px;
    text-align: center;
  }

  .grid-2,
  .grid-3 {
    gap: 15px;
  }

  .catalog-item img {
    width: 180px;
    height: 260px;
  }

  .map-container iframe {
    height: 300px;
  }
}

/* High resolution screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Print Styles */
@media print {
  .floating-menu,
  .mobile-nav-toggle,
  #page-top,
  #video-area {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }
}
