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

:root {
  --primary-blue: #013d6e;
  --accent-red: #ef1616;
  --success-green: #28a745;
  --warning-yellow: #ffc107;
  --danger-red: #dc3545;
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --dark-gray: #6c757d;
  --text-dark: #212529;
  --text-light: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.15);
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: var(--primary-blue);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.logo p {
  font-size: 0.875rem;
  opacity: 0.9;
}

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

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
}

/* Navigation */
.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-list a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.nav-list a:hover {
  opacity: 0.8;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #0056b3 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* Ranking Section */
.ranking-section {
  padding: 4rem 0;
  background-color: var(--light-gray);
}

.ranking-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--text-dark);
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.rank-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.rank-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.rank-header {
  padding: 1.5rem;
  text-align: center;
}

.rank-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.rank-a .rank-badge {
  background-color: var(--success-green);
  color: white;
}

.rank-b .rank-badge {
  background-color: #17a2b8;
  color: white;
}

.rank-c .rank-badge {
  background-color: var(--warning-yellow);
  color: var(--text-dark);
}

.rank-d .rank-badge {
  background-color: var(--danger-red);
  color: white;
}

.rank-header h3 {
  font-size: 1.5rem;
  margin-top: 0.5rem;
}

.rank-content {
  padding: 0 1.5rem 1.5rem;
}

.rank-content ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.rank-content li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.rank-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-green);
  font-weight: bold;
}

.price-indicator {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-indicator span {
  color: var(--text-light);
  font-size: 0.875rem;
}

.price-indicator strong {
  font-size: 1.25rem;
  color: var(--accent-red);
}

/* Search Section */
.search-section {
  padding: 4rem 0;
  background-color: white;
}

.search-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}

.search-box {
  max-width: 800px;
  margin: 0 auto;
}

.search-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.filter-select,
.search-input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  background-color: white;
}

.search-btn {
  padding: 0.75rem 2rem;
  background-color: var(--accent-red);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-btn:hover {
  background-color: #d61414;
}

/* Guide Section */
.guide-section {
  padding: 4rem 0;
  background-color: var(--light-gray);
}

.guide-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.step {
  text-align: center;
  padding: 2rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: var(--primary-blue);
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.step p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Features Section */
.features {
  padding: 4rem 0;
  background-color: white;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature {
  text-align: center;
  padding: 2rem;
  background-color: var(--light-gray);
  border-radius: 8px;
  transition: transform 0.3s ease;
}

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

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary-blue);
}

.feature p {
  color: var(--text-light);
}

/* Footer */
footer {
  background-color: var(--text-dark);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

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

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #495057;
  color: #adb5bd;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    position: relative;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary-blue);
    flex-direction: column;
    padding: 1rem;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    margin-top: 0.5rem;
  }

  .nav-list.active {
    display: flex;
  }

  .hero {
    padding: 3rem 0;
    min-height: 60vh;
    background-size: cover;
    background-position: center;
  }

  .hero h2 {
    font-size: 1.5rem;
    padding: 0 1rem;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .ranking-section h2,
  .search-section h2,
  .guide-section h2,
  .features h2 {
    font-size: 1.5rem;
    padding: 0 1rem;
  }

  .rank-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .search-filters {
    grid-template-columns: 1fr;
  }

  .guide-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0 1rem;
  }

  .container {
    padding: 0 15px;
    max-width: 100%;
  }

  .ranking-section,
  .search-section,
  .guide-section,
  .features {
    padding: 2.5rem 0;
  }

  .header-container {
    padding: 1rem 15px;
  }

  .section-description {
    padding: 0 1rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 1.25rem;
  }

  .logo p {
    font-size: 0.75rem;
  }

  .rank-header h3 {
    font-size: 1.25rem;
  }

  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

/* Rank Examples Section */
.rank-examples-section {
  padding: 4rem 0;
  background-color: white;
}

.rank-examples-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.section-description {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 3rem;
  font-size: 1.125rem;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 3rem;
}

.example-card {
  background: var(--light-gray);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.example-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.example-header {
  background: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rank-label {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
}

.rank-label.rank-a {
  background-color: var(--success-green);
  color: white;
}

.rank-label.rank-b {
  background-color: #17a2b8;
  color: white;
}

.rank-label.rank-c {
  background-color: var(--warning-yellow);
  color: var(--text-dark);
}

.rank-label.rank-d {
  background-color: var(--danger-red);
  color: white;
}

.example-images {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.device-showcase {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.device-image {
  width: 100%;
  height: auto;
  max-height: 250px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: white;
  padding: 0.5rem;
  object-fit: contain;
  display: block;
}

.example-details h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.example-details ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.example-details li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-light);
}

.example-details li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-blue);
}

.view-more-btn {
  background: var(--primary-blue);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.view-more-btn:hover {
  background: #012d5e;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: auto;
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  padding: 1rem 1.5rem;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
}

#modal-body {
  padding: 2rem;
}

/* Hero with background image */
.hero {
  background: linear-gradient(rgba(1, 61, 110, 0.9), rgba(0, 86, 179, 0.9)), url('TOP画像.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  padding: 5rem 0;
  text-align: center;
}

/* Responsive for rank examples */
@media (max-width: 1024px) {
  .examples-grid {
    grid-template-columns: 1fr;
  }

  .example-images {
    grid-template-columns: 1fr;
  }

  .device-showcase {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .rank-examples-section {
    padding: 2.5rem 0;
  }

  .example-card {
    margin: 0 1rem;
  }

  .device-image {
    max-width: 120px;
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
  }
}

/* Modal content styles */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.modal-images h3,
.modal-info h3 {
  margin-bottom: 1rem;
  color: var(--primary-blue);
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.image-gallery img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: block;
  background: white;
}

.modal-info ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.modal-info li {
  padding: 0.5rem 0;
  color: var(--text-dark);
  border-bottom: 1px solid var(--light-gray);
}

.price-range {
  background: var(--light-gray);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.price-range h4 {
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.price-range p {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-red);
}

@media (max-width: 768px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }
}

/* Info Banners Section */
.info-banners-section {
  padding: 4rem 0;
  background-color: var(--light-gray);
  overflow: hidden;
}

.banners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.info-banner {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

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

.banner-image {
  width: 100%;
  overflow: hidden;
}

.banner-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 300px;
}

.banner-content {
  padding: 2rem;
}

.banner-content h3 {
  font-size: 1.5rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.banner-subtitle {
  font-size: 1.125rem;
  color: var(--accent-red);
  font-weight: 600;
  margin-bottom: 1rem;
}

.highlight {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success-green);
  background: var(--light-gray);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.notice {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.warning {
  color: var(--danger-red);
  font-weight: 600;
}

.sim-explanation {
  background: var(--light-gray);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.sim-explanation h4 {
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.note {
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
}

.sim-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  border: 2px solid var(--border-color);
}

.comparison-item {
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
}

.comparison-item.locked {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
}

.comparison-item.unlocked {
  background: #e8f5e8;
  border: 2px solid var(--success-green);
}

.comparison-item h5 {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.carrier {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--primary-blue);
  color: white;
  margin-bottom: 0.5rem;
}

.carrier.sim-free {
  background: var(--success-green);
}

.model {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.price {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.price span {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-blue);
}

.price span.higher {
  color: var(--accent-red);
}

.price-up {
  background: var(--accent-red);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.comparison-arrow {
  font-size: 2rem;
  color: var(--primary-blue);
  font-weight: bold;
}

.cta {
  text-align: center;
  font-weight: 700;
  color: var(--accent-red);
  font-size: 1.125rem;
  background: #fff3cd;
  padding: 1rem;
  border-radius: 8px;
  border: 2px solid var(--warning-yellow);
}

@media (max-width: 1024px) {
  .banners-grid {
    grid-template-columns: 1fr;
  }

  .sim-comparison {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .comparison-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 768px) {
  .info-banners-section {
    padding: 2.5rem 0;
  }

  .banners-grid {
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .info-banner {
    margin: 0;
  }

  .banner-image img {
    max-height: 200px;
  }

  .banner-content {
    padding: 1.5rem;
  }

  .banner-content h3 {
    font-size: 1.25rem;
  }

  .sim-comparison {
    padding: 1rem;
  }

  .comparison-item {
    padding: 0.75rem;
  }

  .price span {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .banner-image img {
    max-height: 150px;
  }

  .banner-content {
    padding: 1rem;
  }

  .highlight {
    font-size: 1rem;
    padding: 0.75rem;
  }

  .sim-explanation {
    padding: 1rem;
  }

  .cta {
    font-size: 1rem;
    padding: 0.75rem;
  }
}

/* Image Slider Styles */
.image-slider {
  margin-bottom: 1.5rem;
}

.slider-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.5rem;
}

.slider-images {
  position: relative;
  width: 250px;
  height: 250px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 4px;
}

.slider-image.active {
  opacity: 1;
}

.slider-btn {
  position: absolute;
  background: var(--primary-blue);
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background-color 0.3s ease;
}

.slider-btn:hover {
  background: #012d5e;
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

.clickable-image {
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--medium-gray);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background: var(--primary-blue);
}

/* 査定例セクションの画像フレックスボックスを修正 */
.device-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.device-showcase .device-image {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f8f8f8;
}

@media (max-width: 768px) {
  .slider-images {
    width: 200px;
    height: 200px;
  }

  .device-image {
    max-height: 180px;
  }

  .device-showcase {
    grid-template-columns: 1fr;
  }
}

/* Image Popup Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.image-modal-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 800px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
}

.image-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2001;
}

.image-close:hover,
.image-close:focus {
  color: #bbb;
}

#popup-image {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.image-info {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .image-modal-content {
    width: 95%;
  }

  .image-close {
    top: 10px;
    right: 25px;
    font-size: 30px;
  }
}
