/*
Theme Name: Usatool
Theme URI: https://usachim.com/tool/
Author: Usachim
Author URI: https://usachim.com/
Description: Web application portal theme for Usatool
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: usatool
*/

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Zen Kaku Gothic New', 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ============================================
   Main Layout
   ============================================ */
.site-main {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* Background glow effects */
.site-main::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.site-main::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   Global Header & Navigation
   ============================================ */
.global-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
}

.global-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
}

.global-header__logo {
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.05em;
}

/* Hamburger Button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
  padding: 0;
}

.hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #f8fafc;
  margin: 3px 0;
  transition: all 0.3s ease;
}

.hamburger.is-active .hamburger__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active .hamburger__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Global Navigation (Drawer) */
.global-nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1001;
  padding: 80px 2rem 2rem;
  transition: right 0.3s ease;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
}

.global-nav.is-active {
  right: 0;
}

.global-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.global-nav__list li {
  margin-bottom: 1.5rem;
}

.global-nav__list a {
  color: #e2e8f0;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  display: block;
  transition: color 0.2s ease;
}

.global-nav__list a:hover {
  color: #38bdf8;
}

/* Overlay */
.global-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.global-nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   Page Header
   ============================================ */
.site-header {
  padding: 8rem 2rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 10;
}

.site-header__badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.05em;
}

.site-header__title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  margin: 0 0 1rem;
  background: linear-gradient(to right, #f8fafc, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.site-header__description {
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 600px;
  line-height: 1.6;
}

/* ============================================
   Tool Cards Section
   ============================================ */
.tools-section {
  max-width: 1100px;
  margin: 2rem auto 6rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Individual Card */
.tool-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
}

.tool-card:hover .tool-card__arrow {
  transform: translateX(5px);
  color: #3b82f6;
}

/* Card Tags */
.tool-card__tags {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tool-card__tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.13);
  color: #3b82f6;
  line-height: 1.4;
}

/* Card Title */
.tool-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.8rem;
  color: #f8fafc;
  line-height: 1.4;
}

/* Card Video */
.tool-card__video-wrap {
  margin: 0 0 1.2rem;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.05);
}

.tool-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.tool-card:hover .tool-card__video {
  transform: scale(1.03);
}

/* Card Content (post editor content) */
.tool-card__content {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0 0 1.5rem;
  flex: 1;
}

.tool-card__content p {
  margin: 0 0 0.6em;
}

.tool-card__content p:last-child {
  margin-bottom: 0;
}

.tool-card__content ul,
.tool-card__content ol {
  margin: 0.4em 0 0.6em 1.4em;
}

.tool-card__content a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tool-card__content strong,
.tool-card__content b {
  color: #e2e8f0;
  font-weight: 700;
}

/* Card Description */
.tool-card__description {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  flex: 1;
}

/* Card Link Button */
.tool-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  color: #f8fafc;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-top: auto;
  transition: all 0.2s ease;
}

.tool-card__link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.tool-card__arrow {
  transition: transform 0.2s ease, color 0.2s ease;
  margin-left: 8px;
}

/* ============================================
   Footer / Back Link
   ============================================ */
.site-footer {
  display: flex;
  justify-content: center;
  padding-bottom: 4rem;
  position: relative;
  z-index: 10;
}

.site-footer__back-link {
  display: inline-flex;
  align-items: center;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.site-footer__back-link:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

/* ============================================
   No Tools Message
   ============================================ */
.tools-empty {
  text-align: center;
  color: #94a3b8;
  font-size: 1rem;
  padding: 4rem 2rem;
}

/* ============================================
   Site Notice
   ============================================ */
.site-notice {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.site-notice__inner {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-notice__title {
  color: #fcd34d;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-notice__content {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.7;
}

.site-notice__content p {
  margin: 0 0 1rem;
}

.site-notice__content strong {
  color: #f8fafc;
  font-weight: 700;
}

.site-notice__subtitle {
  color: #e2e8f0;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-notice__content ul {
  margin: 0 0 1rem 1.5rem;
  padding: 0;
}

.site-notice__content li {
  margin-bottom: 0.8rem;
}

.site-notice__link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
  display: inline-block;
  margin-top: 4px;
}

.site-notice__link:hover {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ============================================
   Contact Section
   ============================================ */
.site-contact {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.site-contact__inner {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-contact__title {
  color: #f8fafc;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
  text-align: center;
}

/* Contact Form 7 基本スタイル調整 */
.site-contact__form .wpcf7 {
  color: #e2e8f0;
}

.site-contact__form .wpcf7-form-control.wpcf7-text,
.site-contact__form .wpcf7-form-control.wpcf7-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.site-contact__form .wpcf7-form-control.wpcf7-submit {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.3s ease;
  display: block;
  margin: 0 auto;
}

.site-contact__form .wpcf7-form-control.wpcf7-submit:hover {
  opacity: 0.9;
}

/* ============================================
   Floating Contact Button
   ============================================ */
.floating-contact {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 14px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  transition: all 0.3s ease;
}

.floating-contact:hover {
  transform: translateY(-3px);
  background: rgba(40, 53, 75, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  color: #fff;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .site-header {
    padding: 3rem 1.5rem 1.5rem;
  }

  .tools-section {
    margin: 1.5rem auto 4rem;
    padding: 0 1rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .site-footer {
    padding-bottom: 3rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 2.5rem 1rem 1rem;
  }

  .site-header__badge {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .tool-card__title {
    font-size: 1.25rem;
  }
}

/* ============================================
   WordPress Admin Bar Adjustment
   ============================================ */
body.admin-bar .site-main {
  min-height: calc(100vh - 32px);
}

@media (max-width: 782px) {
  body.admin-bar .site-main {
    min-height: calc(100vh - 46px);
  }
}
