:root {
    --primary: #007aff;
    /* iOS Blue */
    --primary-hover: #0056b3;
    --secondary: #8e8e93;
    --bg-body: #f2f2f7;
    /* iOS System Gray 6 */
    --bg-card: #ffffff;
    --text-main: #1c1c1e;
    --text-muted: #8e8e93;
    --border: #d1d1d6;
    /* iOS Separator Color */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Softer shadows */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --radius: 18px;
    /* More rounded like iOS widgets */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1100px;
    /* Slightly tighter container */
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    /* Glassmorphism */
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3.5rem;
    /* Shorter header */
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
}

.nav-links a:hover {
    color: var(--primary);
}

.cta-btn {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    /* Pill shape */
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.1s ease;
}

.cta-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.cta-btn:hover {
    color: white;
    /* Ensure text stays white */
}

/* Hero Section */
.hero {
    padding: 3rem 0;
    text-align: center;
    background: linear-gradient(to bottom, #ffffff, var(--bg-body));
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Footer */
.site-footer {
    background: #fff;
    padding: 2rem 0 6rem 0;
    /* Extra padding bottom for mobile nav space */
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--text-main);
}

/* Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* Reduced min-width for mobile */
    gap: 1.25rem;
    padding: 1.5rem 0;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: none;
    /* Removed border */
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-row {
    display: flex;
    padding: 1rem;
    align-items: center;
    gap: 1rem;
}

.card-content {
    flex: 1;
}

.card-img-wrapper {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 14px;
    /* Slightly softer radius than container */
    overflow: hidden;
    background: #f1f5f9;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.card-meta {
    font-size: 0.75rem;
    color: #aeaeb2;
}

/* Product Detail - iOS Style */
.ios-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.product-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.product-image-container {
    flex: 0 0 280px;
    /* Fixed width for better layout control */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-details {
    flex: 1;
    padding-top: 0.5rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.product-price {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.product-desc-short {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* App Info Box */
.app-info-box {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.app-info-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.download-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.download-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    color: white;
}

/* Utilities */
.badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-blog {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
}

.badge-app {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
}

.badge-product {
    background: rgba(255, 45, 85, 0.1);
    color: #ff2d55;
}

/* Responsive */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 3.5rem;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--secondary);
    font-size: 0.7rem;
    transition: color 0.2s;
}

.mobile-nav-link i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Hide desktop nav */
    .mobile-nav {
        display: block;
    }

    /* Show mobile nav */

    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    /* Unstick header to save space or keep sticky preference */

    .product-layout {
        flex-direction: column;
        gap: 1.5rem;
    }

    .product-image-container {
        flex: none;
        width: 100%;
        max-width: 100%;
        /* Full width */
        margin: 0 auto;
    }

    .product-details {
        text-align: left;
        /* Keep left aligned for readability */
        padding: 0 0.5rem;
    }

    .product-title {
        font-size: 2rem;
    }

    .ios-card {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .container {
        padding: 0 1rem;
    }

    .grid-cards {
        grid-template-columns: 1fr;
    }

    .card-row {
        flex-direction: row-reverse;
        /* Image Left, Text Right */
        padding: 1rem;
        align-items: center;
        gap: 1rem;
    }

    .hero {
        padding: 1.5rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }

    .mobile-break {
        display: block;
        margin-bottom: 0.25rem;
    }

    .hero p {
        font-size: 0.95rem;
        padding: 0 1rem;
        margin-bottom: 0;
    }

    .card-content {
        padding: 0;
        width: 100%;
    }

    .card-img-wrapper {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
        border-radius: 14px;
        margin-bottom: 0;
    }

    /* Fix header layout */
    .nav-flex {
        height: 3.5rem;
    }

    /* Global spacing adjustments */
    body {
        padding-bottom: 4rem;
        /* Space for bottom nav */
    }

    /* Full width buttons on mobile */
    .download-btn {
        width: 100%;
        display: block;
        /* Ensure it behaves like a block to take full width */
    }

    /* App Info Mobile */
    .app-info-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }

    .app-info-list {
        text-align: left;
        margin-bottom: 1.5rem;
    }
}