/* ===== Responsive Design for 株式会社Roxy ===== */

/* ===== Large Desktop (1400px and up) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* ===== Desktop (1200px - 1399px) ===== */
@media (max-width: 1199px) {
    .container {
        padding: 0 30px;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .services-grid {
        gap: 2rem;
    }
}

/* ===== Large Tablet (992px - 1199px) ===== */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .about-text .section-title {
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .company-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1.5rem 0;
    }
    
    .company-label {
        font-weight: 700;
        color: #3498db;
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-info {
        text-align: center;
    }
}

/* ===== Medium Tablet (768px - 991px) ===== */
@media (max-width: 767px) {
    /* Header Adjustments */
    .header-content {
        padding: 15px 0;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: #fff;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
        padding-top: 80px;
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 2rem;
    }
    
    .nav-list a {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid #e9ecef;
        font-size: 1.1rem;
    }
    
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Hero Section */
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    /* Sections */
    .news-section,
    .about-section,
    .services-section,
    .company-info,
    .contact-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    /* News Section */
    .news-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        padding: 1rem 0;
    }
    
    .news-date {
        font-size: 0.9rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-item {
        padding: 2rem 1.5rem;
    }
    
    /* Contact Section */
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }
}

/* ===== Small Mobile (576px - 767px) ===== */
@media (max-width: 575px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .about-img-placeholder {
        padding: 40px 30px;
    }
    
    .about-img-placeholder i {
        font-size: 3rem;
    }
    
    .service-item {
        padding: 2rem 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .contact-item {
        padding: 1.5rem;
    }
    
    .contact-item i {
        font-size: 2rem;
    }
}

/* ===== Extra Small Mobile (320px - 575px) ===== */
@media (max-width: 479px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .news-section,
    .about-section,
    .services-section,
    .company-info,
    .contact-section {
        padding: 40px 0;
    }
    
    .service-item h4 {
        font-size: 1.2rem;
    }
    
    .service-item p {
        font-size: 0.9rem;
    }
    
    .company-row {
        padding: 1rem 0;
    }
    
    .company-label,
    .company-value {
        font-size: 1rem;
    }
    
    .footer {
        padding: 30px 0 15px;
    }
}

/* ===== Landscape Mobile Orientation ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
}

/* ===== High Resolution Displays ===== */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .hero-title,
    .section-title {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ===== Accessibility Improvements ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    /* This can be implemented later if needed */
}

/* ===== Print Styles ===== */
@media print {
    .header,
    .mobile-menu-btn,
    .footer {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: #000 !important;
        padding: 2rem 0;
    }
    
    .hero-title {
        color: #000 !important;
    }
    
    .section-title {
        color: #000 !important;
    }
    
    .service-item,
    .contact-item,
    .news-item {
        box-shadow: none !important;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}

/* ===== Focus and Active States for Better UX ===== */
@media (max-width: 767px) {
    .nav-list a:focus,
    .nav-list a:active {
        background: rgba(52, 152, 219, 0.1);
        outline: none;
    }
    
    .mobile-menu-btn:focus {
        outline: 2px solid #3498db;
        outline-offset: 2px;
    }
    
    .service-item:focus-within {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }
}

/* ===== Touch-friendly Improvements ===== */
@media (hover: none) and (pointer: coarse) {
    .service-item:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .nav-list a::after {
        display: none;
    }
    
    .nav-list a:active {
        color: #3498db;
        background: rgba(52, 152, 219, 0.1);
    }
}

/* ===== Loading State for Mobile ===== */
@media (max-width: 767px) {
    .loading-spinner {
        text-align: center;
    }
    
    .loading-spinner .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #3498db;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto 1rem;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
}

/* ===== Notification Responsive Styles ===== */
@media (max-width: 767px) {
    .notification {
        right: 10px !important;
        left: 10px !important;
        right: auto !important;
        transform: translateY(-100%) !important;
        top: 80px !important;
    }
    
    .notification.show {
        transform: translateY(0) !important;
    }
}