/* Base styles for the banking app */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', Arial, sans-serif;
    background-color: #f3f4f6;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #1f2937;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s;
}

nav a:hover {
    color: #ff9800;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

h1 {
    color: #222;
    margin-bottom: 2rem;
    text-align: center;
}

h2 {
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.3);
}

button {
    background-color: #ff9800;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
    width: 100%;
}

button:hover {
    background-color: #e65100;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin: 2rem 0;
}

thead {
    background-color: #1f2937;
    color: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background-color: #f9f9f9;
}

.error {
    background-color: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #c62828;
}

.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #2e7d32;
}

.packages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.package-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.package-card h2 {
    margin-top: 0;
    color: #ff9800;
}

.package-card p {
    margin: 0.5rem 0;
}

.package-card button {
    margin-top: 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.dashboard-card h3 {
    margin-top: 0;
    color: #ff9800;
}

.dashboard-card .amount {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin: 1rem 0;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #ff9800;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #e65100;
}

.home-page {
    text-align: center;
}

.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feature h2 {
    margin-top: 0;
    color: #ff9800;
}

footer {
    background-color: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Tablet and below */
@media (max-width: 1024px) {
    main {
        padding: 0 1.5rem;
    }

    .packages-container,
    .dashboard-grid,
    .features-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav {
        width: 100%;
    }

    nav a {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        font-size: 0.9rem;
    }

    main {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    form {
        padding: 1.5rem;
        margin: 0 auto;
    }

    /* Improve input fields for mobile */
    input, select, textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.875rem;
    }

    button {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    /* Tables - horizontal scroll */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    th, td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .packages-container,
    .dashboard-grid,
    .features-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .package-card,
    .dashboard-card,
    .feature {
        padding: 1.5rem;
    }

    .dashboard-card .amount {
        font-size: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1.25rem;
    }

    footer {
        padding: 1.5rem;
        font-size: 0.9rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    header {
        padding: 0.75rem;
    }

    nav a {
        display: block;
        margin: 0.5rem 0;
        text-align: center;
    }

    main {
        padding: 0 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    form {
        padding: 1rem;
    }

    .package-card,
    .dashboard-card,
    .feature {
        padding: 1rem;
    }

    .package-card h2,
    .dashboard-card h3,
    .feature h2 {
        font-size: 1.1rem;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* Landscape orientation optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .packages-container,
    .dashboard-grid,
    .features-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    button,
    .btn,
    a {
        min-height: 44px;
        padding: 12px 20px;
    }

    nav a {
        padding: 12px 16px;
        display: inline-block;
    }

    input, select, textarea {
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .package-card:hover,
    .dashboard-card:hover,
    .feature:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    button:hover,
    .btn:hover {
        transform: none;
    }
}
