/* ============================================
   Responsive Styles
   Nihon-bashi International Accounting Firm
   ============================================ */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
  .container {
    padding: 0 2rem;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
  }
}

/* Tablet Landscape (768px - 991px) */
@media (max-width: 991px) {
  :root {
    --header-height: 70px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  /* Navigation */
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background);
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    overflow-y: auto;
  }
  
  .nav.active {
    transform: translateX(0);
  }
  
  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  
  .nav-link {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
  }
  
  .nav-link::after {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  /* Hero */
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 3rem) 0 4rem;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  /* Services Grid */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  /* Features Grid */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  /* About Grid */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-image {
    order: -1;
    max-height: 400px;
  }
  
  /* Form Container */
  .form-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Contact Grid */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Service Detail */
  .service-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .service-detail:nth-child(even) {
    direction: ltr;
  }
  
  .service-detail-image {
    order: -1;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }
  
  /* Cookie Banner */
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-buttons {
    justify-content: center;
  }
}

/* Tablet Portrait (576px - 767px) */
@media (max-width: 767px) {
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  /* Hero */
  .hero-title {
    font-size: 1.875rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  /* Features Grid */
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .feature-number {
    font-size: 2.5rem;
  }
  
  /* Page Header */
  .page-header {
    padding: 7rem 0 3rem;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  /* Form Box */
  .form-box {
    padding: 1.5rem;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    text-align: center;
  }
  
  /* Cookie Modal */
  .cookie-modal-content {
    margin: 1rem;
    max-height: 90vh;
  }
  
  .cookie-modal-footer {
    flex-direction: column;
  }
  
  .cookie-modal-footer .btn {
    width: 100%;
  }
  
  /* Legal Content */
  .legal-content {
    padding: 2rem 0;
  }
  
  .legal-content h2 {
    font-size: 1.25rem;
  }
}

/* Mobile (up to 575px) */
@media (max-width: 575px) {
  :root {
    --header-height: 60px;
  }
  
  html {
    font-size: 15px;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  /* Logo */
  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .logo-name {
    font-size: 1rem;
  }
  
  .logo-subtitle {
    font-size: 0.65rem;
  }
  
  /* Hero */
  .hero {
    padding: calc(var(--header-height) + 2rem) 0 3rem;
  }
  
  .hero-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  
  /* Features Grid */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .feature-item {
    padding: 1rem;
  }
  
  .feature-number {
    font-size: 2rem;
  }
  
  /* Service Card */
  .service-card {
    padding: 1.5rem;
  }
  
  /* Page Header */
  .page-header {
    padding: 6rem 0 2rem;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .breadcrumb {
    font-size: 0.8rem;
    flex-wrap: wrap;
  }
  
  /* Contact Info */
  .contact-info-card {
    padding: 1.5rem;
  }
  
  .contact-info-icon {
    width: 35px;
    height: 35px;
  }
  
  /* Cookie Banner */
  .cookie-banner {
    padding: 1rem;
  }
  
  .cookie-text h3 {
    font-size: 1rem;
  }
  
  .cookie-text p {
    font-size: 0.85rem;
  }
  
  .cookie-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .cookie-buttons .btn {
    width: 100%;
  }
  
  /* Footer */
  .footer {
    padding: 3rem 0 0;
  }
  
  .footer-title {
    font-size: 0.95rem;
  }
  
  .footer-links a,
  .footer-contact li {
    font-size: 0.9rem;
  }
  
  .footer-disclaimer {
    font-size: 0.8rem;
  }
  
  .footer-copyright {
    font-size: 0.85rem;
  }
}

/* Extra Small Mobile (up to 375px) */
@media (max-width: 375px) {
  html {
    font-size: 14px;
  }
  
  .hero-title {
    font-size: 1.35rem;
  }
  
  .section-title {
    font-size: 1.35rem;
  }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero::before {
    background-image: url('../assets/financial-services.jpg');
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode support
  :root {
    --background: #0d1f3c;
    --background-alt: #1a365d;
    --text-dark: #f7fafc;
    --text-medium: #cbd5e0;
    --text-light: #a0aec0;
    --border-color: #2d3748;
  }
  */
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .cookie-banner,
  .cookie-modal,
  .btn,
  .form-box {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem 0;
    background: none;
    color: #000;
  }
  
  .hero-title,
  .hero-description {
    color: #000;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* Landscape Orientation on Mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 1rem) 0 2rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    padding: 0.75rem 0;
  }
  
  .form-input,
  .form-textarea,
  .form-select {
    min-height: 44px;
  }
  
  .cookie-toggle {
    width: 55px;
    height: 30px;
  }
  
  .cookie-toggle-slider::before {
    height: 24px;
    width: 24px;
  }
  
  .cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(25px);
  }
}
