/* ============ Mobile Responsive CSS ============ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
}

/* ============ Navigation ============ */
.nav {
    background: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    color: #6366f1;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #4b5563;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover {
    background: #f3f4f6;
    color: #6366f1;
}

.nav-links .btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-links .btn-primary:hover {
    opacity: 0.9;
    color: white;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2.5px;
    background: #1f2937;
    border-radius: 2px;
    transition: all 0.3s;
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile Nav */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 15px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        padding: 60px 20px;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 18px;
        padding: 12px 24px;
        width: 100%;
        text-align: center;
    }
    
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    
    .mobile-overlay.active {
        display: block;
    }
}

/* ============ Hero Section ============ */
.hero {
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 36px;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 15px;
    }
    
    .hero h1 {
        font-size: 26px;
    }
    
    .hero p {
        font-size: 15px;
    }
}

/* ============ Container ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* ============ Cards ============ */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .card {
        padding: 20px 15px;
        border-radius: 12px;
    }
}

/* ============ Grid Layouts ============ */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============ Buttons ============ */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

@media (max-width: 480px) {
    .btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ============ Forms ============ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
}

/* ============ Tables ============ */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

@media (max-width: 600px) {
    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* ============ Price Comparison ============ */
.price-table {
    overflow-x: auto;
}

.price-table table {
    min-width: 500px;
}

/* ============ Product Cards ============ */
.product-card {
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.2s;
    background: white;
}

.product-card:hover {
    border-color: #6366f1;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
    transform: translateY(-3px);
}

.product-card .price {
    font-size: 32px;
    font-weight: 800;
    color: #6366f1;
    margin: 10px 0;
}

@media (max-width: 480px) {
    .product-card {
        padding: 20px 15px;
    }
    
    .product-card .price {
        font-size: 26px;
    }
}

/* ============ Footer ============ */
.footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 30px 20px;
    text-align: center;
    font-size: 14px;
    margin-top: 40px;
}

.footer a {
    color: #6366f1;
    text-decoration: none;
}

/* ============ Utility ============ */
.text-center { text-align: center; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-20 { margin-top: 20px; }
.p-20 { padding: 20px; }

/* ============ Section Spacing ============ */
section {
    padding: 40px 0;
}

@media (max-width: 768px) {
    section {
        padding: 25px 0;
    }
}

/* ============ Language Toggle ============ */
.lang-toggle {
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #4b5563;
    font-weight: 500;
}

.lang-toggle:hover {
    background: #e5e7eb;
}

/* ============ Animations ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

/* ============ Touch Friendly ============ */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-links a, .product-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .btn:active {
        transform: scale(0.97);
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
}

/* ============ Safe Area (iPhone notch) ============ */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
    }
    
    .nav {
        padding-left: calc(20px + env(safe-area-inset-left));
        padding-right: calc(20px + env(safe-area-inset-right));
    }
}
