/* ========================================
   ALMULLA EXCHANGE DASHBOARD STYLES
   ======================================== */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root CSS Variables for Consistent Theming */
:root {
    /* Primary Color Palette - Almulla Exchange Green Theme */
    --primary-green: #00a651;
    --primary-green-dark: #008f45;
    --primary-green-light: #00c066;
    --primary-green-accent: #00d673;
    
    /* Secondary Colors - Complementary Greens */
    --secondary-green: #34d399;
    --secondary-green-light: #6ee7b7;
    --secondary-green-dark: #059669;
    --accent-green: #10b981;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f0fdf4;
    --medium-gray: #d1fae5;
    --dark-gray: #065f46;
    --black: #064e3b;
    
    /* Gradients - Dark Green Focused */
    --gradient-primary: linear-gradient(135deg, #0D4A0F 0%, #1B5E20 100%);
    --gradient-secondary: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
    --gradient-accent: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
    --gradient-dark: linear-gradient(135deg, #0D4A0F 0%, #1B5E20 25%, #2E7D32 50%, #388E3C 75%, #4CAF50 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Body and Typography */
body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-dark);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--black);
    line-height: 1.6;
    font-weight: 400;
    position: relative;
    overflow-x: hidden;
}



/* ========================================
   HEADER STYLES
   ======================================== */
.header {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    background: var(--gradient-primary);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-subtitle p {
    font-size: 1.1rem;
    color: var(--white);
    font-weight: 500;
    opacity: 0.9;
}

/* ========================================
   MAIN DASHBOARD CONTAINER
   ======================================== */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.dashboard-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--white);
}

.dashboard-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dashboard-title p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
}

/* ========================================
   BENTO GRID LAYOUT
   ======================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 2rem;
    margin: 3rem auto;
    max-width: 900px;
    padding: 2rem;
    position: relative;
}

/* Visual separator between rows */
.bento-grid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 2rem;
    right: 2rem;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
    opacity: 0.2;
    pointer-events: none;
    border-radius: 2px;
}

/* Base Bento Card Styles */
.bento-card {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 2.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
}

/* Top row cards - more rounded */
.bento-grid .bento-card:nth-child(1),
.bento-grid .bento-card:nth-child(2) {
    border-radius: 2.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Bottom row cards - even more rounded */
.bento-grid .bento-card:nth-child(3),
.bento-grid .bento-card:nth-child(4) {
    border-radius: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Card hover effects */
.bento-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
}

/* Card Header Styles */
.card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.platform-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    transition: all 0.3s ease;
}

/* Platform-specific icon colors and effects */
.mobile-card .platform-icon {
    background: linear-gradient(135deg, #00a651, #00c066);
    box-shadow: 0 8px 25px rgba(0, 166, 81, 0.4);
    transform: rotate(-5deg);
}

.web-card .platform-icon {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    transform: rotate(5deg);
}

.kiosk-card .platform-icon {
    background: linear-gradient(135deg, #00d673, #6ee7b7);
    box-shadow: 0 8px 25px rgba(0, 214, 115, 0.4);
    transform: rotate(-3deg);
}

.branch-card .platform-icon {
    background: linear-gradient(135deg, #008f45, #00a651);
    box-shadow: 0 8px 25px rgba(0, 143, 69, 0.4);
    transform: rotate(3deg);
}

/* Icon hover effects */
.bento-card:hover .platform-icon {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.card-header h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.025em;
    margin: 0;
}

/* Card Content Styles */
.card-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 1.5rem 0;
}

.card-content p {
    color: var(--dark-gray);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

/* Card Footer Styles */
.card-footer {
    border-top: 2px solid rgba(76, 175, 80, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.view-more {
    color: var(--primary-green);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    width: 100%;
}

.bento-card:hover .view-more {
    color: var(--primary-green-light);
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 1.5rem;
        padding: 1rem;
        max-width: 100%;
    }
    
    .bento-grid::after {
        display: none;
    }
    
    .bento-card {
        min-height: 250px;
        padding: 2rem;
    }
    
    .card-header h3 {
        font-size: 1.75rem;
    }
    
    .platform-icon {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.75rem;
    }
}

/* ========================================
   INFO SECTION
   ======================================== */
.info-section {
    margin-top: 3rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.info-card h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.info-card p {
    color: var(--dark-gray);
    line-height: 1.6;
}

/* ========================================
   FOOTER STYLES
   ======================================== */
.footer {
    background: rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    color: var(--white);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   MODAL STYLES
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.close {
    color: var(--dark-gray);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--black);
}

#modalTitle {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

#modalContent {
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Modal Platform Info Styles */
.modal-platform-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.platform-description p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    line-height: 1.6;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-green);
}

.platform-features h3,
.platform-flows h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.platform-features ul,
.platform-flows ul {
    list-style: none;
    padding: 0;
}

.platform-features li,
.platform-flows li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--medium-gray);
    position: relative;
    padding-left: 1.5rem;
}

.platform-features li::before,
.platform-flows li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

.platform-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark-gray);
    border: 1px solid var(--medium-gray);
}

.btn-secondary:hover {
    background: var(--medium-gray);
    color: var(--black);
}

/* Loading Spinner Styles */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-green);
    font-size: 2rem;
    z-index: 10;
}

/* Modal Animation Enhancements */
.modal {
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal-content {
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .dashboard-container {
        padding: 2rem 1rem;
    }
    
    .dashboard-title h2 {
        font-size: 2rem;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .bento-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo-section {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-text {
        font-size: 1.75rem;
    }
    
    .dashboard-title h2 {
        font-size: 1.75rem;
    }
    
    .bento-card {
        padding: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}

/* ========================================
   ANIMATIONS AND TRANSITIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bento-card {
    animation: fadeInUp 0.6s ease-out;
}

.bento-card:nth-child(1) { animation-delay: 0.1s; }
.bento-card:nth-child(2) { animation-delay: 0.2s; }
.bento-card:nth-child(3) { animation-delay: 0.3s; }
.bento-card:nth-child(4) { animation-delay: 0.4s; }

/* Hover effects for interactive elements */
.bento-card:hover .platform-icon {
    transform: scale(1.1);
    transition: transform var(--transition-normal);
}

.bento-card:hover .tag {
    background: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
}

/* Focus states for accessibility */
.bento-card:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Loading states */
.bento-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Font Weight Utilities */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
