/* Responsive Design for Elga Cloud Website */

/* Base responsive utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Mobile First Approach */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    /* Typography adjustments */
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.3rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }
    
    /* Header mobile */
    .main-header {
        padding: 10px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        text-align: center;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .main-nav {
        display: none;
    }
    
    .user-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
    }
    
    /* Hero section mobile */
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .hero-image {
        order: -1;
    }
    
    .hero-img {
        max-width: 250px;
        height: auto;
    }
    
    /* Domain search mobile */
    .domain-search-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .domain-input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .domain-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .domain-buttons .btn {
        width: 100%;
    }
    
    .domain-extensions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Hosting plans mobile */
    .hosting-tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .hosting-tab {
        width: 100%;
        text-align: center;
    }
    
    .billing-toggle {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .plan-card {
        margin: 0;
        padding: 25px 20px;
    }
    
    .plan-price {
        font-size: 2.5rem;
    }
    
    .plan-features {
        font-size: 0.9rem;
    }
    
    /* Comparison table mobile */
    .comparison-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-table table {
        min-width: 600px;
    }
    
    /* Reviews mobile */
    .video-reviews {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .text-reviews {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Stats mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-section h4 {
        margin-bottom: 15px;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Tablet Portrait */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 25px;
    }
    
    /* Typography adjustments */
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.8rem; }
    
    /* Header tablet */
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hero section tablet */
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
    }
    
    /* Domain search tablet */
    .domain-extensions {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    /* Hosting plans tablet */
    .hosting-tabs {
        flex-direction: row;
        justify-content: center;
    }
    
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .plan-card:nth-child(2) {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Reviews tablet */
    .video-reviews {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .text-reviews {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    /* Stats tablet */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Footer tablet */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* Tablet Landscape */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    /* Hero section tablet landscape */
    .hero-content {
        flex-direction: row;
        align-items: center;
        gap: 50px;
    }
    
    .hero-text {
        flex: 1;
    }
    
    .hero-image {
        flex: 0 0 400px;
    }
    
    /* Hosting plans tablet landscape */
    .plans-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    /* Reviews tablet landscape */
    .video-reviews {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .text-reviews {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    /* Stats tablet landscape */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    /* Footer tablet landscape */
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
}

/* Desktop */
@media screen and (min-width: 1025px) {
    /* Mobile menu hidden on desktop */
    .mobile-menu-toggle {
        display: none;
    }
    
    .mobile-menu-overlay {
        display: none;
    }
    
    /* Main navigation visible */
    .main-nav {
        display: block;
    }
    
    .user-actions {
        display: flex;
    }
}

/* Large Desktop */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 40px;
    }
    
    /* Hero section large desktop */
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* Hosting plans large desktop */
    .plans-grid {
        gap: 30px;
    }
    
    .plan-card {
        padding: 40px 30px;
    }
}

/* Ultra Wide Desktop */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content {
        gap: 80px;
    }
    
    .hero-image {
        flex: 0 0 500px;
    }
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-color: #fff;
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    margin-bottom: 15px;
}

.mobile-nav-link {
    display: block;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: #673de6;
}

.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 20px;
    display: none;
}

.mobile-nav-item.has-submenu.active .mobile-submenu {
    display: block;
}

.mobile-submenu-link {
    display: block;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.mobile-submenu-link:hover {
    color: #673de6;
}

.mobile-user-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.mobile-user-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 10px;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-user-btn.login-btn {
    background-color: transparent;
    color: #673de6;
    border: 2px solid #673de6;
}

.mobile-user-btn.login-btn:hover {
    background-color: #673de6;
    color: #fff;
}

.mobile-user-btn.signup-btn {
    background-color: #673de6;
    color: #fff;
    border: 2px solid #673de6;
}

.mobile-user-btn.signup-btn:hover {
    background-color: #5a2fd8;
    border-color: #5a2fd8;
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .plan-card:hover {
        transform: none;
    }
    
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 24px;
    }
    
    .nav-link {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .mobile-nav-link {
        min-height: 44px;
        padding: 12px 0;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .mobile-menu-overlay,
    .mobile-menu-content {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .plan-card {
        border: 2px solid #333;
    }
    
    .mobile-menu-content {
        border-left: 2px solid #333;
    }
}

/* Print styles */
@media print {
    .main-header,
    .mobile-menu-overlay,
    .mobile-menu-toggle,
    .user-actions,
    .news-ticker,
    .footer {
        display: none;
    }
    
    .hero-section {
        background: none;
        color: #000;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .plan-card {
        border: 1px solid #000;
        break-inside: avoid;
    }
}

