/* ===========================
   APPS PAGE - UTILITY HEADER - OPTIMIZED
   =========================== */

.apps-utility-header {
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
    border-bottom: 1px solid rgba(0, 180, 216, 0.15);
    position: relative;
}

.apps-utility-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--health-primary));
}

.apps-utility-header .container {
    max-width: 900px;
}

.apps-utility-header h1 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.apps-utility-header p {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ===========================
   APP SECTIONS - OPTIMIZED
   =========================== */

.app-section {
    padding: 5rem 0;
    background: var(--white);
}

.app-section:nth-child(even) {
    background: var(--bg-light);
}

.app-section-header {
    margin-bottom: 3rem;
}

.app-section-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.app-section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--health-primary));
    border-radius: 2px;
}

.app-section-description {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ===========================
   APP GRID
   =========================== */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* ===========================
   APP CARDS - OPTIMIZED
   =========================== */

.app-card {
    background: var(--white);
    border: 2px solid rgba(0, 180, 216, 0.15);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(10, 37, 64, 0.06);
    position: relative;
    overflow: hidden;
}

.app-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--health-primary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 180, 216, 0.15);
    border-color: var(--secondary);
}

.app-card:hover:before {
    transform: scaleX(1);
}

/* App Card Header */
.app-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.app-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.app-title-group {
    flex-grow: 1;
}

.app-card h3 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 0.2rem;
}

.app-full-name {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* App Card Content */
.app-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* App Card Metadata */
.app-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 180, 216, 0.1);
}

.app-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-lighter);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 180, 216, 0.1);
}

.app-meta-icon {
    font-size: 0.85rem;
}

/* App Card Actions */
.app-card-actions {
    display: flex;
    gap: 0.8rem;
}

.btn-app {
    flex: 1;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    text-align: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

.btn-app:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.4);
}

.btn-app-secondary {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
}

.btn-app-secondary:hover {
    background: var(--secondary);
    color: var(--white);
}

/* ===========================
   TOOL CARDS (Coming Soon) - OPTIMIZED
   =========================== */

.tool-card {
    background: var(--white);
    border: 2px dashed rgba(0, 180, 216, 0.4);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    opacity: 0.8;
    position: relative;
}

.tool-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--health-primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    opacity: 1;
    border-style: solid;
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.15);
}

.tool-card:hover:before {
    opacity: 1;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.tool-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--primary-dark);
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.tool-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(0, 180, 216, 0.15);
    color: var(--secondary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid var(--secondary);
}

/* ===========================
   APP PAGE CONTACT SECTION - OPTIMIZED
   =========================== */

.apps-contact {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    position: relative;
}

.apps-contact:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--health-primary));
}

.apps-contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.apps-contact h3 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.apps-contact p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
}

.apps-contact-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.apps-contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 180, 216, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 180, 216, 0.3);
    transition: var(--transition);
}

.apps-contact-item:hover {
    background: rgba(0, 180, 216, 0.2);
    border-color: var(--secondary-light);
}

.apps-contact-item .icon {
    font-size: 1.2rem;
}

/* ===========================
   RESPONSIVE - APPS PAGE
   =========================== */

@media (max-width: 992px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .apps-utility-header {
        padding: 3rem 0 2rem;
    }

    .apps-utility-header h1 {
        font-size: 2rem;
    }

    .app-section {
        padding: 3rem 0;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .app-card-header {
        flex-direction: column;
        text-align: center;
    }

    .app-metadata {
        justify-content: center;
    }

    .app-card-actions {
        flex-direction: column;
    }

    .apps-contact-details {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}

/* ===========================
   STATUS INDICATORS - OPTIMIZED
   =========================== */

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-active {
    background: rgba(0, 204, 136, 0.15);
    color: var(--health-primary);
    border: 1px solid var(--health-primary);
}

.status-coming-soon {
    background: rgba(100, 100, 100, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--text-light);
}

/* ===========================
   ENVIRONMENT BADGES - OPTIMIZED
   =========================== */

.env-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-main);
}

.env-firebase {
    background: rgba(255, 152, 0, 0.12);
    color: #FF6F00;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.env-appscript {
    background: rgba(0, 204, 136, 0.12);
    color: #00A854;
    border: 1px solid rgba(0, 204, 136, 0.3);
}