/* ================= LAYOUT & BACKGROUND ================= */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    background: linear-gradient(to top, #e8f5e9 70%, white);
    width: 100%;
    padding: 0px 15px 40px 15px; 
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-content {
    width: 100%;
    max-width: 1100px;
    transform: translateX(5%);
}

/* --- Positioning Fixes for Cutout Image Alignment (From Internal) --- */
.profile-container {
    position: relative;       /* CRITICAL: Becomes the anchor box for the absolute image */
    background: #ffffff;
    border-radius: 16px;
    overflow: visible;        /* ALLOWS the image to extend outside the white box boundaries */
    padding-top: 40px;        
    padding-bottom: 30px;
    margin-top: 250px;        /* Pushes the container down to make room for the image resting on top */
}

/* --- The Unbreakable Transparent Container (From Internal) --- */
.plain-profile-image {
    position: absolute;
    top: 0;                   /* Anchors to the exact top edge of the white container */
    left: 0;
    width: 100%;
    height: 0;                /* CRITICAL: Zero height means zoom scaling cannot distort its bounds */
    display: flex;
    justify-content: center;  /* Centers the image horizontally */
    align-items: center;      /* Centers the image perfectly halfway over the top line */
    z-index: 5;               /* Guarantees the image sits safely over background elements */
    pointer-events: none;     /* Prevents selection overlays during drag operations */
}

.plain-profile-image img {
    height: 240px;            /* Controlled height configuration for precise framing */
    width: auto;
    object-fit: contain;
    /* Since 'align-items: center' puts the exact middle of the image on the top line,
       we use margin-bottom in pure pixels to push it higher. Pixels scale perfectly with zoom! */
    margin-bottom: 240px;      /* Adjust this up or down if you want the image to sit higher/lower */
}

.profile-header {
    margin-top: -30px;         /* Gives breathing room below the overlapping image */
    margin-bottom: 25px;
    text-align: center;
    padding: 0 20px;
}

/* ================= TABS SYSTEM (Internal Layout Priority) ================= */
.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px;
    margin-bottom: 30px;
    margin-top: -40px;
}

.tab-link {
    flex: 1 1 calc(20% - 8px); /* Adjusted layout percentage to fit 4 buttons comfortably */
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f4fdf7;
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tab-link.active, .tab-link:hover {
    background: #f4fdf7;
    border-color: #2e7d32;
    color: #2e7d32;
}

/* --- Custom Yellow Gradient Promo Tab Style --- */
.tab-link.promo-tab {
    background: linear-gradient(to bottom, #fffde7 10%, #fff59d 90%) !important;
    border-color: #fbc02d !important;
    color: #f57f17 !important; 
}

.tab-link.promo-tab:hover, 
.tab-link.promo-tab.active {
    background: linear-gradient(135deg, #fff59d 0%, #fbc02d 100%) !important;
    border-color: #f57f17 !important;
    color: #5d4037 !important; /* Dark brown text for the darker gold active state */
    box-shadow: 0 4px 12px rgba(251, 192, 45, 0.25) !important;
}

.tab-link .tab-icon {
    width: 20px;
    height: 20px;
    background: #f4fdf7;
}

.tab-icon {
    width: 40px;
    height: 25px;
    object-fit: scale-down;
}

/* --- Mobile Accordion Navigation Styles (From Internal) --- */
.accordion-header {
    display: none; /* Auto hidden on Desktop viewports */
    width: calc(100% - 40px);
    margin: 10px auto 0 auto;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 16px 20px;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.accordion-header .tab-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    vertical-align: middle;
}

.accordion-header .accordion-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: #888888;
}

.accordion-header.active {
    background: #f4fdf7;
    border-color: #2e7d32;
    color: #2e7d32;
    border-radius: 8px 8px 0 0;
}

.accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
    color: #2e7d32;
}

/* --- Custom Yellow Gradient Promo Accordion Style --- */
.accordion-header.promo-accordion {
    background: linear-gradient(135deg, #fffde7 0%, #fff59d 100%);
    border-color: #fbc02d;
    color: #f57f17;
}

.accordion-header.promo-accordion .accordion-arrow {
    color: #f57f17;
}

.accordion-header.promo-accordion.active {
    background: linear-gradient(135deg, #fff59d 0%, #fbc02d 100%);
    border-color: #f57f17;
    color: #5d4037;
    border-radius: 8px 8px 0 0;
}

.accordion-header.promo-accordion.active .accordion-arrow {
    color: #5d4037;
}

.tab-content {
    display: none;
    padding: 30px 20px; /* Adapted padding fallback value from internal */
    background: white;
    border: 1px solid #eee;
    border-top: none;
    animation: fadeInContent 0.4s ease-in-out;
}

.tab-content.active { 
    display: block; 
    background: linear-gradient(to top, #e8f5e9 -20%, white);
}

@keyframes fadeInContent {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Custom Yellow Gradient for Promo Tab Content --- */
#deposit-promo.tab-content {
    background: linear-gradient(to bottom, #fffde7 30%, #fff59d 100%) !important;
    border: 1px solid #fbc02d; 
    border-top: none;
    border-radius: 0 0 8px 8px; 
}

/* ================= TABLE STYLING ================= */
.deposit-table-wrapper { overflow-x: auto; }

.deposit-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

.deposit-table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 700;
    padding: 15px;
    border: 1px solid #dee2e6;
    text-align: center;
    text-transform: uppercase;
    font-size: 12px;
}

.deposit-table td {
    padding: 15px;
    border: 1px solid #dee2e6;
    text-align: center;
    color: #555;
    font-size: 14px;
}

.product-desc {
    font-size: 16px;
    color: #444;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ================= BUTTONS CONTAINER ================= */
.btn-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.btn-open-account {
    background: linear-gradient(to right, #2e7d32, #4caf50, #81c784);
    color: WHITE;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 77, 0, 0.2);
    text-shadow: 1px 1px 3px rgba(0, 51, 0, 0.8); 
}

.btn-open-account:hover {
    background: linear-gradient(to right, #1b5e20, #388e3c, #66bb6a);
    transform: translateY(-2px);
}

/* ================= TABLET & DESKTOP BREAKPOINTS ================= */
@media screen and (min-width: 768px) {
    .content-wrapper {
        padding: 0px 20px 60px 20px;
    }
    
    /* Removed explicit banner height layout override because internal rules explicitly rely on zero-height bounds */

    .profile-header {
        padding: 40px;
    }

    .profile-header h2 {
        font-size: 32px;
    }

    .subtitle {
        font-size: 16px;
    }
}

/* --- Responsive Viewport Overrides (From Internal) --- */
@media (max-width: 768px) {
    .profile-container {
        padding-top: 30px;    
        margin-top: 150px;    
    }

    .plain-profile-image img {
        height: 160px;
        margin-top: -110px;        
        margin-bottom: 50px;  
    }

    .profile-header {
        margin-top: 50px;     
    }

    .tabs-container {
        display: none !important; 
    }
    
    .accordion-header {
        display: flex; 
    }

    .tab-content {
        display: none; 
        width: calc(100% - 40px);
        margin: 0 auto 10px auto;
        border: 1px solid #e0e0e0;
        border-top: none;
        padding: 20px 15px;
        background: #ffffff;
        border-radius: 0 0 8px 8px;
    }

    .tab-content.active {
        display: block !important;
    }
}