/* Responsive Additions 
 * This file contains additional responsive styles that complement the main styles.css
 * It focuses on specific device needs and edge cases
 */

/* Fix any overflow issues that might break layouts */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
    /* Improve touch targets on mobile */
    button, 
    .btn, 
    nav ul li a,
    .domain-card ul li a,
    .social-icon {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Ensure content doesn't shift when submitting forms */
    form button {
        width: 100%;
    }
    
    /* Fix for mobile safari input zooming */
    input, textarea, select {
        font-size: 16px !important;
    }
    
    /* Ensure hamburger menu is easily tappable */
    .hamburger {
        padding: 10px;
    }
    
    /* Better spacing for stacked elements */
    .domain-card,
    .info-item,
    .about-content > div {
        margin-bottom: 20px;
    }
}

/* Tablet-specific optimizations */
@media (min-width: 768px) and (max-width: 992px) {
    .domain-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Premium WebApps responsive */
    .premium-services {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large mobile phones (landscape) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-content {
        padding: 0 15px;
    }
    
    .domain-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Premium WebApps responsive */
    .premium-services {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .service-icon i {
        font-size: 2.5rem;
    }
    
    .cta-container {
        padding: 30px 20px;
    }
    
    .cta-container h3 {
        font-size: 1.5rem;
    }
}

/* Portrait phones */
@media (max-width: 575px) {
    body {
        font-size: 0.95rem;
    }
    
    .hero {
        height: auto;
        min-height: 60vh;
        padding: 60px 0;
    }
    
    /* Stack grid items in single column */
    .about-features {
        grid-template-columns: 1fr;
    }
    
    /* Premium WebApps responsive */
    .premium-services {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 20px 15px;
    }
    
    .service-icon i {
        font-size: 2.2rem;
    }
    
    .cta-container {
        padding: 25px 15px;
        margin-top: 40px;
    }
    
    .cta-container h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    /* Adjust spacing */
    section {
        padding: 50px 0;
    }
    
    /* Smaller title on mobile */
    .section-title {
        margin-bottom: 5px;
    }
}

/* Extra small phones */
@media (max-width: 374px) {
    .container {
        padding: 0 8px;
    }
    
    .hero-content h1 {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
}

/* Print styles - hide unnecessary elements when printing */
@media print {
    header, footer, .hero, .contact-form {
        display: none;
    }
    
    .domain-grid {
        display: block;
    }
    
    .domain-card {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* High pixel ratio (Retina) device optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize image rendering */
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Only apply if the site has a dark mode option enabled */
    body.dark-mode-enabled {
        --text-color: #f0f0f0;
        --light-gray: #222;
        --medium-gray: #444;
        --dark-gray: #aaa;
        --white: #121212;
        --shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    }
}

/* Landscape orientation optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
    }
    
    /* Adjust header for landscape mobile */
    header {
        position: absolute;
    }
}

/* Ensure proper form control spacing on iOS */
@supports (-webkit-touch-callout: none) {
    input, select, textarea {
        font-size: 16px !important;
    }
    
    /* Fix iOS form zoom issues */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        font-size: 16px !important;
    }
}
