/* 
 * OSTEN Engineering Consultation Website
 * Responsive CSS Stylesheet
 * 
 * This file contains responsive styling for different screen sizes
 */

/* ===== RESPONSIVE STYLES ===== */

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Devices (desktops, 992px to 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .slide-content h1 {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* Medium Devices (tablets, 768px to 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    /* Header & Navigation */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-heavy);
        transition: var(--transition-medium);
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .nav-menu li a {
        font-size: 1.1rem;
        padding: 12px 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero Slider */
    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .slide-content p {
        font-size: 1.1rem;
    }
    
    /* About Section */
    .about-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .about-image, .about-text {
        flex: 100%;
    }
    
    /* Services Section */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .service-card {
        padding: 25px 20px;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-icon i {
        font-size: 1.8rem;
    }
    
    /* Projects Section */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Team Section */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Contact Section */
    .contact-content {
        flex-direction: column;
        gap: 40px;
    }
    
    /* Footer */
    .footer-content {
        gap: 30px;
    }
    
    .footer-column {
        min-width: 45%;
    }
}

/* Small Devices (landscape phones, 576px to 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 20px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .section {
        padding: 50px 0;
    }
    
    /* Header */
    .header-content {
        height: 70px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
        width: 100%;
        left: -100%;
    }
    
    /* Hero Slider */
    .slide-content h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    
    .slide-content p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .arrow {
        width: 40px;
        height: 40px;
    }
    
    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .service-card {
        padding: 30px 25px;
    }
    
    .service-features {
        margin: 20px 0;
    }
    
    /* Projects Section */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-filters {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .filter-btn {
        padding: 12px 20px;
        font-size: 1rem;
        min-width: 120px;
    }
    
    /* Team Section */
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Section */
    .contact-form-container,
    .contact-info {
        flex: 100%;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 15px 18px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 15px 30px;
        font-size: 16px;
        width: 100%;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-column {
        width: 100%;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .copyright {
        order: 2;
    }
    
    .footer-bottom-links {
        order: 1;
    }
    
    .footer-bottom-links a {
        margin: 0 10px;
    }
    
    .back-to-top {
        right: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
    }
    
    .back-to-top i {
        font-size: 1.2rem;
    }
}

/* Extra Small Devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .section-header h2::after {
        width: 60px;
        height: 2px;
    }
    
    .slide-content h1 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    .key-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-item {
        text-align: center;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .info-icon {
        margin: 0 auto;
    }
    
    .social-links {
        justify-content: center;
        gap: 15px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 15px;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .testimonial-author img {
        margin: 0 auto;
    }
}

/* Height-based media queries */
@media (max-height: 600px) {
    .hero-slider {
        height: 100vh;
    }
    
    .slide-content h1 {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .slide-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.95);
    }
    
    /* Increase touch targets */
    .nav-menu li a {
        padding: 15px 0;
    }
    
    .filter-btn {
        padding: 15px 25px;
        min-height: 44px;
    }
    
    .social-link {
        width: 50px;
        height: 50px;
    }
    
    .back-to-top {
        width: 60px;
        height: 60px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-slider {
        height: 100vh;
    }
    
    .slide-content {
        padding: 20px;
    }
    
    .slide-content h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .slide-content p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .section {
        padding: 40px 0;
    }
}

/* Print styles */
@media print {
    #header, 
    .mobile-menu-toggle,
    .slider-navigation,
    .back-to-top,
    .loading-screen,
    .scroll-indicator {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .section {
        padding: 20pt 0;
        page-break-inside: avoid;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }
    
    .service-card {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .btn {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
}
