/* style.css */
/* ===== WIRA COLOR SCHEME (based on logo) ===== */
:root {
  /* ===== ARES BRAND COLORS ===== */
  --primary-color: #4371A5;        /* Blue from logo "A" symbol - main brand color */
  --secondary-color: #000000;       /* Black from "RES" text - secondary brand color */
  --secondary-color-dark: #333333;  /* Dark gray for hover states */
  --accent-color: #5A7FB0;          /* Lighter blue - accent color */
  --light-color: #FEFEFE;           /* Almost white - backgrounds (from logo) */
  --dark-color: #222222;            /* Dark gray - text */
  --text-color: #333333;            /* Main text color */
  --text-light: #666666;            /* Lighter text color */
  --text-lighter: #555555;          /* Even lighter text */
  --text-white: #ffffff;             /* White text */
  --text-font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
  --border-color: #e5e7eb;           /* Border color */
  --border-light: #f0f0f0;           /* Light border */
  --border-lighter: #eaeef2;         /* Very light border */
  --bg-white: #FEFEFE;                /* Almost white background (from logo) */
  --bg-light: #f8f9fa;                /* Light background */
  --bg-overlay: rgba(254, 254, 254, 0.98); /* Navigation overlay */
  --bg-overlay-dark: rgba(0, 0, 0, 0.1);    /* Dark overlay */
  
  /* Stats Section Background - Linear Gradient */
  --stats-bg-start: #4371A5;   /* Blue start */
  --stats-bg-end: #5A7FB0;     /* Lighter blue end */
  --stats-number-color: #ffffff;  /* White numbers */
  --stats-label-color: #ffffff;    /* White labels */

  /* Shadow Colors */
  --shadow-color-light: rgba(67, 113, 165, 0.1);    /* Blue-tinted light shadow */
  --shadow-color-medium: rgba(67, 113, 165, 0.2);   /* Blue-tinted medium shadow */
  --shadow-color-dark: rgba(67, 113, 165, 0.02);    /* Blue-tinted dark shadow */
  --shadow-color-darker: rgba(67, 113, 165, 0.03);  /* Blue-tinted darker shadow */
  --shadow-color-primary: rgba(0, 0, 0, 0.3);       /* Black shadow */
  --shadow-color-primary-light: rgba(0, 0, 0, 0.2); /* Light black shadow */
  --shadow-color-primary-lighter: rgba(0, 0, 0, 0.08); /* Very light black shadow */
  --shadow-color-primary-faint: rgba(0, 0, 0, 0.05); /* Faint black shadow */
  --shadow-color-accent: rgba(67, 113, 165, 0.06); /* Blue accent shadow */
  --shadow-color-accent-light: rgba(67, 113, 165, 0.08); /* Light blue accent shadow */
  
  /* Hover Colors */
  --secondary-hover: #2A4A6E;                   /* Darker blue for hover */
  --primary-hover: rgba(0, 0, 0, 0.05);         /* Light black hover background */
  --nav-hover-color: var(--secondary-color-dark); /* Dark gray for nav links */
  
  /* Navbar */
  --navbar-bg: var(--bg-overlay);
  --navbar-box-shadow: 0 2px 20px var(--shadow-color-light);
  
  /* Buttons */
  --cta-bg: var(--primary-color);     /* Blue background */
  --cta-border: var(--primary-color); /* Blue border */
  --cta-text: #ffffff;                /* White text */
  --cta-hover-bg: #2A4A6E;            /* Darker blue on hover */
  --cta-hover-border: #2A4A6E;        /* Darker blue border on hover */
  --cta-box-shadow: 0 5px 15px rgba(67, 113, 165, 0.3); /* Blue shadow */
  
  /* Modals */
  --modal-ext-background: rgba(0, 0, 0, 0.8);   /* Black overlay */
  --modal-box-shadow: 0 0 30px rgba(67, 113, 165, 0.3);
  --modal-close-img: 0 0 30px rgba(67, 113, 165, 0.3);
  --modal-int-background: rgba(67, 113, 165, 0.5);
  --zoom-level-color: white;
  
  /* Cards */
  --card-bg: var(--bg-white);
  --card-border: var(--border-light);
  --card-box-shadow: 0 5px 15px var(--shadow-color-darker);
  --card-box-shadow-hover: 0 15px 30px var(--shadow-color-accent);
  
  /* Service Items */
  --service-item-bg: var(--bg-white);
  --service-item-border: var(--border-light);
  --service-item-box-shadow: 0 3px 10px var(--shadow-color-darker);
  --service-item-box-shadow-hover: 0 10px 25px var(--shadow-color-primary-light);
  --service-item-border-hover: rgba(67, 113, 165, 0.2);
  
  /* Form Elements */
  --form-bg: var(--bg-white);
  --form-border: #ddd;
  --form-box-shadow: 0 2px 10px var(--shadow-color-light);
  --form-focus-border: var(--primary-color);
  --form-focus-shadow: 0 0 0 3px rgba(67, 113, 165, 0.1);
  
  /* Info Badge */
  --info-badge-bg: var(--bg-light);
  --info-badge-border: var(--border-lighter);
  
  /* Social Icons */
  --social-icon-bg: var(--primary-color);
  --social-icon-text: #ffffff;        /* White text on blue */
  --social-icon-hover-bg: #000000;    /* Black on hover */
  --social-icon-hover-text: #ffffff;  /* White text on black hover */
  
  /* Mobile Menu */
  --mobile-menu-bg: var(--bg-overlay);
  --mobile-menu-border: rgba(0, 0, 0, 0.1);
  
  /* Home Slide */
  --homeslide-box-shadow: 0 10px 30px var(--shadow-color-medium);
  
  /* Enquiry Form */
  --enquiryForm-box-shadow: 0 2px 10px var(--shadow-color-light);
  --enquiryForm-box-shadow-focus: 0 0 0 3px rgba(67, 113, 165, 0.1);

  /* ===== DIMENSIONS ===== */
  --navbar-height: 108px;
  --navbar-height-480: 108px; /* change to 128px if have ISO or RBA logo*/
  --footer-height: 38px;
  --footer-font-size: clamp(10px, 2vw, 12px);
  --logo-height: clamp(48px, 6vw, 72px);
  --badge-height: clamp(32px, 6vw, 48px);
  --mobile-menu-height: clamp(10px, 2vw, 12px);
  --stats-height: 100px;
  --stats-height-992: 80px;
  --stats-height-768: 60px;
  --stats-height-480: 70px;
  --cell-height: 22px;

  /* ===== FONT SIZES ===== */
  /* Smaller text - scale less aggressively */
  --font-tiny: clamp(4px, 1.2vw, 6px);
  --font-xxxsmall: clamp(6px, 1.3vw, 8px);
  --font-xxsmall: clamp(8px, 1.4vw, 10px);
  --font-xsmall: clamp(9px, 1.5vw, 11px);
  --font-small: clamp(10px, 1.6vw, 12px);
  --font-medium: clamp(11px, 1.7vw, 14px);
  --font-xmedium: clamp(12px, 1.8vw, 16px);
  --font-xxmedium: clamp(14px, 1.9vw, 18px);
  
  /* Medium text - moderate scaling */
  --font-xxxmedium: clamp(16px, 2.2vw, 20px);
  --font-large: clamp(20px, 2.5vw, 24px);
  --font-xlarge: clamp(24px, 2.8vw, 30px);
  
  /* Large text - scale more aggressively */
  --font-xxlarge: clamp(30px, 3.5vw, 36px);
  --font-xxxlarge: clamp(36px, 4vw, 48px);
  --font-jumbo: clamp(48px, 5vw, 64px);
  --font-xjumbo: clamp(96px, 6vw, 128px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: var(--text-font-family);
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--text-font-family);
    font-weight: bold;
}

/* Hidden H1 CSS */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* ===== NAVIGATION ===== */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--navbar-box-shadow);
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    z-index: 1000;
    transition: var(--transition);
}

.navbar-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Quote button styling */
.quote-btn {
    margin: 0 0 0 32px;
    padding: 10px 20px;
    font-size: var(--font-medium);
}

.logo img {
    height: var(--logo-height);
    width: auto;
    transition: var(--transition);
}

.badge img {
    height: var(--badge-height);
    width: auto;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-button {
    color: var(--primary-color);
    font-weight: bold;
    font-size: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--text-font-family);
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.nav-button:hover {
    color: var(--nav-hover-color);
}

.nav-button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--nav-hover-color);
    transition: var(--transition);
}

.nav-button:hover::after {
    width: 100%;
}

.dropdown {
    position: relative;
    display: inline-flex;  /* Changed to inline-flex for better alignment */
    align-items: center;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;  /* Center the content */
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px 0;
    width: 100%;  /* Take full width */
}

.dropdown-toggle i {
    font-size: var(--font-small);
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;  /* Center the dropdown */
    transform: translateX(-50%) translateY(-10px);  /* Center and initial hidden position */
    min-width: 240px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;  /* Increased z-index */
    padding: 12px 0;
    margin-top: 10px;  /* Add space from nav button */
}

/* Add a small arrow on top of dropdown */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    z-index: 10000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);  /* Center and show */
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--text-font-family);
    font-size: var(--font-small);
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: uppercase;
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--Retired);
    font-weight: bold;
}

.view-profile-btn,
.cta-button {
    color: var(--cta-text) !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    background: var(--cta-bg);
    border-radius: 30px;
    border: 0px solid var(--cta-border);
    cursor: pointer;
    font-family: var(--text-font-family);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.cta-button {
    font-size: var(--font-medium);
    padding: 12px 28px;
}

.view-profile-btn {
    font-size: var(--font-small);
    padding: 6px 14px;
}

.view-profile-btn:hover,
.cta-button:hover {
    background: var(--cta-hover-bg);
    border-color: var(--cta-hover-border);
    transform: translateY(-2px);
    box-shadow: var(--cta-box-shadow);
}

.view-profile-btn:after,
.cta-button::after {
    display: none;
}

.nav-button.active {
    color: var(--secondary-color);
}

.nav-button.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: var(--font-large);
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--secondary-color);
}

/* ===== HOME SLIDER ===== */
.home-slider {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--footer-height) - var(--stats-height));
    overflow: hidden;
    border: 0px solid brown;
}

.home-slide {
    display: flex;
    position: absolute;
    flex-direction: row;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    align-items: stretch;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    box-sizing: border-box;
    border: 0px solid blue;
}

.home-slide.active {
    opacity: 1;
}

.home-slide .container-column.home-image {
    flex: 0 0 60%;
    width: 60%;
    height: 100% !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    border: 0px solid yellow;
}

.home-slide .container-column.home-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--homeslide-box-shadow);
    transition: transform 0.5s ease;
}

.home-slide .container-column.home-image img:hover {
    transform: scale(1.02);
}

.home-slide .container-column.home-text {
    flex: 0 0 40%;
    width: 40%;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.home-slide .home-content {
    text-align: left;
    color: var(--primary-color);
    width: 100%;
    z-index: 2;
    border: 0px solid purple;
}

.home-slide .home-content h2 {
    font-size: var(--font-xxlarge);
    margin-bottom: 24px;
    color: var(--primary-color);
    line-height: 1.2;
}

.home-slide .home-content h4 {
    font-size: var(--font-xlarge);
    margin-bottom: 24px;
    color: var(--text-light);
    line-height: 1.2;
}

.home-slide .home-content p {
    font-size: var(--font-xxxmedium);
    margin-bottom: 24px;
    color: var(--text-light);
    line-height: 1.6;
}

.core-value img {
    width: 60%;
    height: auto;
}

/* ===== IFRAME ===== */
iframe {
    height: calc(100vh - var(--navbar-height) - var(--footer-height));
    display: block;
    box-sizing: border-box;
    width: 100%;
    border: none;
    padding: 0;
    min-height: 100%;
}

.content { 
    flex: 1; 
    display: flex; 
    flex-direction: column;
}

.content iframe { 
    flex: 1; 
    width: 100%; 
    border: none;
    min-height: 100%;
}  

/* ===== CONTAINER SYSTEM ===== */
.contact-container,
.container {
    display: grid;
    grid-template-rows: var(--grid-rows, auto);
    height: calc(100% - var(--footer-height));
    width: 100%;
    gap: var(--container-gap);
    padding: var(--container-padding);
    margin: var(--container-margin);
    box-sizing: border-box;
}

.home-container {
    display: grid;
    grid-template-rows: var(--grid-rows, 20% 80%);
    height: 100%;
    border: 0px solid blue;
    gap: var(--container-gap);
    padding: var(--container-padding);
    margin: var(--container-margin);
    box-sizing: border-box;
    overflow: hidden;
}

.contact-container-row,
.container-row {
    display: flex;
    width: 100%;
    min-height: 0;
    gap: var(--row-gap, 6px);
    padding: var(--row-padding, 6px);
    box-sizing: border-box;
    position: relative;
}

.container-column {
    display: flex;
    flex-direction: var(--flex-direction, column);
    flex: var(--flex, 1);
    width: 100%;
    min-width: 0;
    height: auto;
    border-radius: var(--radius, 6px);
    background: var(--background, transparent);
    justify-content: var(--justify, flex-start);
    align-items: var(--align, flex-start);
    padding: var(--padding, 6px);
    gap: var(--column-gap, 0px);
}

.container-column.no-padding {
    padding: 0 !important;
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 80px 32px;
}

.section-title {
    text-align: var(--title-align, center);
}

.section-title h2 {
    font-size: var(--font-xxlarge);
    color: var(--primary-color);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: var(--font-xjumbo);
    height: 3px;
    background: var(--secondary-color-dark);
    bottom: -20px;
    left: var(--underline-position, 50%);
    transform: translateX(var(--underline-transform, -50%));
}

.section-title p {
    margin-top: 20px;
    color: var(--text-light);
    font-size: var(--font-xxxmedium);
}

.section-text {
    padding:12px 20px 28px 20px;
    width: 100%;
    height: 100%;
    border: 0px solid red;
}

.section-text h3 {
    font-size: var(--font-xlarge);
    color: var(--primary-color);
    margin-bottom: 24px;
}

.section-text p {
    margin-bottom: 32px;
    font-size: var(--font-xxmedium);
}

/* ===== STATS ===== */
.stats {
    width: 100%;
    height: var(--stats-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(var(--stats-bg-start), var(--stats-bg-end));
    color: var(--text-white);
    box-sizing: border-box;
    border: 0px solid black;
}

.stats-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    box-sizing: border-box;
    border: 0px solid red;

}

.stat-item {
    text-align: center;
    padding: 8px;
}

.stat-number {
    font-size: var(--font-xxlarge);
    font-weight: bold;
    color: var(--stats-number-color);
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}

.stat-label {
    font-size: var(--font-xxmedium);
    font-weight: bold;
    white-space: nowrap;
    color: var(--stats-label-color);
}

/* ===== FEATURES & SERVICES ===== */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 32px;
    overflow: hidden;
}

.feature {
    text-align: center;
    padding: 24px;
}

.feature i {
    font-size: var(--font-xlarge);
    color: var(--text-light);
    margin-bottom: 16px;
}

.feature h4 {
    font-size: var(--font-xxxmedium);
    margin-bottom: 8px;
    color: var(--primary-color);
}

/* ===== SERVICES GRID (Reusable) ===== */
.service-item {
    background: var(--service-item-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--service-item-box-shadow);
    transition: var(--transition);
    border: 1px solid var(--service-item-border);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--service-item-box-shadow-hover);
    border-color: var(--service-item-border-hover);
}

.service-item i {
    font-size: var(--font-xlarge);
    color: var(--text-light);
    margin-bottom: 16px;
}

.service-item h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: var(--font-xxxmedium);
}

.service-item p {
    font-size: var(--font-xxmedium);
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0;
}

.badge-grid,
.section-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.management-card {
    background: var(--card-bg);
    padding: 28px 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--card-box-shadow);
    transition: var(--transition);
    border: 1px solid var(--card-border);
}

.management-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-box-shadow-hover);
    border-color: var(--service-item-border-hover);
}

.management-card h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: var(--font-xxxmedium);
}

.management-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--homeslide-box-shadow);
    margin-top: 10px;
    margin-bottom: 20px;
}

/* ===== LEADERSHIP CARD (Alternative for credentials) ===== */
.leadership-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: 12px;
    box-shadow: var(--card-box-shadow);
    transition: var(--transition);
    border: 1px solid var(--card-border);
}

.leadership-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-box-shadow-hover);
    border-color: var(--service-item-border-hover);
}

/* ===== CREDENTIALS CARD ===== */
.credential-item-portrait {
    display: flex;
    background: var(--card-bg);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--card-box-shadow);
    transition: var(--transition);
    border: 1px solid var(--card-border);
    height: 100%;
}

.credential-item-portrait:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-box-shadow-hover);
    border-color: var(--service-item-border-hover);
}

.credential-card-portrait {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.credential-card-portrait img {
    width: 100%;
    max-width: 200px;
    height: 280px;
    object-fit: cover;
    box-shadow: var(--homeslide-box-shadow);
    margin-bottom: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.credential-card-portrait p {
    font-size: var(--font-xmedium);
    color: var(--text-color);
    margin: 5px 0 0;
    line-height: 1.4;
}

/* Portrait credential cards - 3 in a row */
.portrait-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
    
/* Landscape credential cards - 2 in a row */
.landscape-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 30px;
}

.credential-item-landscape {
    display: flex;
    background: var(--card-bg);
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--card-box-shadow);
    transition: var(--transition);
    border: 1px solid var(--card-border);
    height: 100%;
}

.credential-item-landscape:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-box-shadow-hover);
    border-color: var(--service-item-border-hover);
}

.credential-card-landscape {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.credential-card-landscape img {
    width: 100%;
    max-width: 350px;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    box-shadow: var(--homeslide-box-shadow);
    margin-bottom: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.credential-card-landscape p {
    font-size: var(--font-xmedium);
    color: var(--text-color);
    margin: 10px 0 5px;
}

/* RBA writeup styles - matching previous version */
.rba-writeup {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 16px;
    margin: 30px 0 20px;
    border-left: 4px solid var(--secondary-color);
}

.rba-writeup p {
    font-size: var(--font-medium);
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 15px;
}

.rba-writeup p:last-child {
    margin-bottom: 0;
}

.rba-writeup strong {
    color: var(--primary-color);
}

.rba-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    margin-bottom: 20px;
}

.rba-badge i {
    font-size: 24px;
}


/* ===== INFO BADGE (Reusable) ===== */
.info-badge {
    padding: 24px;
    background: var(--info-badge-bg);
    border-radius: 12px;
    border: 1px solid var(--info-badge-border);
    width: 100%;
}

.info-badge-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
}

.info-badge-content i {
    font-size: var(--font-xxlarge);
    color: var(--text-light);
    grid-column: 1;
}

.info-badge-content i.primary-icon {
    color: var(--text-light);
}

.info-badge-content div {
    grid-column: 2;
}

.info-badge-content h4 {
    font-size: var(--font-xxxmedium);
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.info-badge-content p {
    font-size: var(--font-xxmedium);
    margin: 0;
    color: var(--text-lighter);
    line-height: 1.5;
}

/* ===== FORM ===== */
#enquiryForm {
    width: 100%;
    max-width: 100%;
    background: var(--form-bg);
    padding: 18px;
    border-radius: 8px;
    box-shadow: var(--form-box-shadow);
    box-sizing: border-box;
    margin: 0;
}

#enquiryForm .form-group {
    width: 100%;
    margin-bottom: 16px;
}

#enquiryForm .form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid var(--form-border);
    border-radius: 5px;
    font-family: var(--text-font-family);
    transition: var(--transition);
    line-height: var(--cell-height);
}

#enquiryForm .form-control:focus {
    outline: none;
    border-color: var(--form-focus-border);
    box-shadow: var(--form-focus-shadow);
}

/* ===== CONTACT ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-info h3 {
    font-size: var(--font-xlarge);
    color: var(--primary-color);
    margin-bottom: 16px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.contact-item i {
    font-size: var(--font-large);
    color: var(--secondary-color-dark);
    margin-top: 4px;
}

.contact-item h4 {
    font-size: var(--font-xxxmedium);
    color: var(--primary-color);
    margin-bottom: 8px;
}

.contact-item p {
    font-size: var(--font-xxmedium);
}

/* ===== LOGO ICONS ===== */
.social-icons,
.logo-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.social-icons.left,
.logo-icons.left {
    justify-content: flex-start;
}

.social-icons.right,
.logo-icons.right {
    justify-content: flex-end;
}

.social-icons.space-between,
.logo-icons.space-between {
    justify-content: space-between;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--social-icon-bg);
    color: var(--social-icon-text);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-icon:hover {
    transform: translateY(-3px);
    background: var(--secondary-color);  /* Keep bright gold for social icons */
    color: var(--primary-color);
}

/* ===== LEADER PROFILE ===== */
.leader-profile {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.leader-profile img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--homeslide-box-shadow);
    margin-top: 10px;
}

.leader-info {
    flex: 1;
}

.leader-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
}

.leader-header h4 {
    color: var(--primary-color);
    font-size: var(--font-large);
    margin-bottom: 4px;
}

.leader-title {
    color: var(--secondary-color-dark);
    font-size: var(--font-xxxmedium) !important;
    font-weight: bold;
    margin-bottom: 12px;
}

.leader-bio {
    font-size: var(--font-xxmedium) !important;
    color: var(--text-lighter);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* ===== MAIN & FOOTER ===== */
.main {
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    bottom: var(--footer-height);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    height: var(--footer-height);
    background: var(--panel);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    font-size: var(--footer-font-size);
}

/* Image Modal Styles */
.modal.image-mode .modal-content {
    background: var(--modal-ext-background);
    max-width: 1000px;
    width: 95%;
    text-align: center;
    padding: 20px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 100%;
}

.modal-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0; /* Important for flexbox to respect max-height */
    width: 100%;
    overflow: auto; /* Add scroll if image overflows */
}

.modal-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.modal-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-ext-background);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: var(--modal-box-shadow);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    color: var(--secondary-color-dark);
}

.modal-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.modal-header img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
}

.modal-header h2 {
    color: var(--primary-color);
    font-size: var(--font-xlarge);
    margin-bottom: 8px;
}

.modal-header .title {
    color: var(--secondary-color-dark);
    font-size: var(--font-xxmedium);
    font-weight: bold;
}

.modal-body {
    font-size: var(--font-xmedium);
    line-height: 1.8;
    color: #555;
}

.modal-body p {
    margin-bottom: 15px;
}

/* Zoom controls */
.modal-zoom-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding: 10px 20px 0 20px;
    flex-shrink: 0; /* Prevent zoom controls from shrinking */
    align-self: center;
}

.zoom-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    width: var(--font-xlarge);
    height: var(--font-xlarge);
    border-radius: 50%;
    cursor: pointer;
    font-size: var(--font-xxxmedium);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.zoom-level {
    color: var(--primary-color);
    font-size: var(--font-xmedium);
    min-width: 60px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When image is zoomed, allow scrolling */
.modal-image.zoomed {
    cursor: zoom-out;
}

.modal-image-wrapper:has(.modal-image[style*="scale(1.25)"]) ,
.modal-image-wrapper:has(.modal-image[style*="scale(1.5)"]) ,
.modal-image-wrapper:has(.modal-image[style*="scale(1.75)"]) ,
.modal-image-wrapper:has(.modal-image[style*="scale(2)"]) ,
.modal-image-wrapper:has(.modal-image[style*="scale(2.25)"]) ,
.modal-image-wrapper:has(.modal-image[style*="scale(2.5)"]) ,
.modal-image-wrapper:has(.modal-image[style*="scale(2.75)"]) ,
.modal-image-wrapper:has(.modal-image[style*="scale(3)"]) {
    overflow: auto;
}

    
/* ===== DESKTOP (1123px AND ABOVE) ===== */
@media (min-width: 1123px) {
    .nav-links {
        display: flex !important;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }

    .mobile-only {
        display: none !important;
    }

    .dropdown-toggle {
        width: auto;  /* Auto width on desktop */
        padding: 8px 0;
    }
}


/* ===== MOBILE MENU (1122px AND BELOW) ===== */
@media (max-width: 1122px) {
    .navbar-right {
        gap: 12px;
    }
    
    .quote-btn {
        padding: 8px 16px;
        font-size: var(--font-small);
        white-space: nowrap;
    }
    
    .mobile-menu-btn {
        display: flex !important;
    }
        
    .mobile-only {
        display: block !important;
    }

    .nav-links {
        display: none !important;
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background: var(--mobile-menu-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
        transform: translateX(100%);
        opacity: 0;
        z-index: 1000;
        overflow-y: auto;
        pointer-events: none;
    }
    
    .nav-links.active {
        display: flex !important;
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    .nav-links .nav-button {
        width: 100%;
        max-width: 400px;
        text-align: center;
        padding: 12px 0;
        font-size: var(--font-xxmedium);
        color: var(--primary-color);
        background: none;
        border: none;
        border-bottom: 1px solid var(--mobile-menu-border);
        display: flex;
        align-items: center;     /* Center vertically */
        justify-content: center; /* Center horizontally */
        line-height: 1.2;        /* Better text alignment */
        white-space: normal;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .nav-links .nav-button:hover {
        color: var(--nav-hover-color);
        background: var(--primary-hover);
    }
    
    .nav-links .nav-button::after {
        display: none;
    }
    
    .nav-links .nav-button:not(.cta-button):last-child {
        border-bottom: none;
    }
    
    .nav-links .nav-button.view-profile-btn,
    .nav-links .nav-button.cta-button {
        background: var(--cta-bg);
        color: var(--cta-text) !important;
        padding: 16px 32px;
        border-radius: 30px;
        border: 0px solid var(--cta-border);
        margin-top: 32px;
        font-size: var(--font-xxmedium);
        width: auto;
        white-space: nowrap;
    }
    
    .nav-links .nav-button.view-profile-btn:hover,
    .nav-links .nav-button.cta-button:hover {
        background: var(--cta-hover-bg);
        border-color: var(--cta-hover-border);
        transform: translateY(-2px);
        box-shadow: var(--cta-box-shadow);
    }

    .dropdown {
        width: 100%;
        display: block;
        text-align: center;  /* Center the content */
    }
    
    /* Optional: If you want the arrow to also use muted gold on hover */
    .dropdown:hover .dropdown-toggle i {
        color: var(--nav-hover-color);
    }

    .dropdown-toggle {
        width: 100%;
        display: inline-flex;
        justify-content: center;  /* Center the text and arrow */
        align-items: center;
        gap: 8px;  /* Space between text and arrow */
        padding: 16px 24px;
        background: none;
        border: none;
        font-size: var(--font-xxmedium);
        font-weight: bold;
        color: var(--primary-color);
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin: 0 auto;  /* Center the button itself */
    }
    
    .dropdown-toggle span {
        display: inline-block;
    }
    
    .dropdown-toggle i {
        font-size: var(--font-medium);
        transition: transform 0.3s ease;
        display: inline-block;
    }
    
    .dropdown.active .dropdown-toggle i {
        transform: rotate(180deg);
    }
    
    .dropdown-menu {
        display: none;  /* Hidden by default */
        width: 100%;
        background: var(--bg-light);
        padding: 8px 0;
        margin: 0;
        border: none;
        box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
        text-align: center;  /* Center the dropdown items */
    }
    
    .dropdown.active .dropdown-menu {
        display: block;  /* Show when active */
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .dropdown-item {
        display: block;
        width: 100%;
        padding: 8px 20px;
        background: none;
        border: none;
        font-size: var(--font-medium);
        font-weight: bold;
        color: var(--primary-color);
        cursor: pointer;
        transition: all 0.2s ease;
        text-transform: none;
        letter-spacing: normal;
        text-align: center;  /* Center the text */
        margin: 0 auto;  /* Ensure centering */
        text-transform: uppercase;
    }
    
    .dropdown-item:hover {
        background: rgba(180, 150, 60, 0.08);  /* Subtle gold background */
        color: var(--nav-hover-color);  /* Muted gold text */
    }
    
    .dropdown-item:active {
        background: rgba(255, 215, 0, 0.2);
    }
}


/* ===== MOBILE (UP TO 992px) ===== */
@media (max-width: 992px) {
    /* Layout & Overflow */
    body, .main, .content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    iframe, .content iframe {
        height: auto;
        min-height: 100%;
    }

    /* Container System - STACK VERTICALLY */
    .container {
        grid-template-rows: auto auto;
        height: auto;
        min-height: 100vh;
        overflow: visible !important;
        gap: 0;
    }
    
    .container-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: var(--justify, flex-start) !important;
        width: 100%;
        overflow-y: hidden !important;
        border: 0px solid green;
    }

    /* Section Titles - LEFT ALIGNED */
    .section-title {
        --title-align: left !important;
        --underline-position: 0 !important;
        --underline-transform: 0 !important;
        text-align: left !important;
        width: 100%;
        margin-top: 0;
        padding-top: 0;
    }

    .stat-number {
        font-size: var(--font-xlarge);
    }
    
    .stat-label {
        font-size: var(--font-medium);
    }

    .stats {
        height: var(--stats-height-992);
    }

    .home-slider {
        height: calc(100vh - var(--footer-height) - var(--stats-height-992));
    }

    .home-slide .home-content h2 {
        font-size: var(--font-xlarge);
        margin-bottom: 12px;
    }
    
    .home-slide .home-content h4 {
        font-size: var(--font-large);
        margin-bottom: 12px;
    }
    
    .home-slide .home-content p {
        font-size: var(--font-xxmedium);
        margin-bottom: 12px;
    }

    .cta-button {
        padding: 8px 16px;
        font-size: var(--font-small);
        white-space: nowrap;
    }

    .view-profile-btn {
        padding: 4px 8px;
        font-size: var(--font-xsmall);
        white-space: nowrap;
    }

    .portrait-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Badge */
    .badge {
        margin-left: 0 !important;
    }
    
    /* Forms */
    #enquiryForm {
        padding: 20px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ===== TABLET (768px AND BELOW) ===== */
@media (max-width: 768px) {
    .stat-number {
        font-size: var(--font-large);
    }
    
    .stat-label {
        font-size: var(--font-medium);
    }

    .stats {
        height: var(--stats-height-768);
    }

    .home-slider {
        height: calc(100vh - var(--footer-height) - var(--stats-height-768));
    }

    .home-slide .home-content h2 {
        font-size: var(--font-large);
    }
    
    .home-slide .home-content h4 {
        font-size: var(--font-xxxmedium);
    }
    
    .home-slide .home-content p {
        font-size: var(--font-xmedium);
    }

    .section-title h2 {
        font-size: var(--font-xlarge);
    }

    .section-title p {
        font-size: var(--font-xxmedium);
    }

    .badge-grid {
        grid-template-columns: 1fr;
    }

    .credential-card-portrait img {
        max-width: 180px;
        height: 240px;
    }

    .contact-container {
        grid-template-rows: auto auto;
        height: auto;
        min-height: 100vh;
        overflow: visible !important;
        gap: 0;
    }
    
    .contact-container-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        width: 100%;
        overflow-y: hidden !important;
    }
    
    .social-icons {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .modal-close-img {
        top: 15px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .modal-content {
        padding: 30px 20px;
    }

    .zoom-controls {
        bottom: 20px;
        padding: 8px 15px;
    }
}

/* ===== MOBILE SMALL (560px AND BELOW) ===== */
@media (max-width: 560px) {
    .nav-links {
        width: 100%;
    }

    .home-slider {
        height: calc(100vh - var(--footer-height) - var(--stats-height-480));
    }

    /* Force stacking */
    .home-slide {
        flex-direction: column !important;
        padding: 12px !important;
        gap: 8px !important;
    }
    
    /* Image takes 70% of the slide height */
    .home-slide .container-column.home-image {
        flex: 0 0 70% !important;
        width: 100%;
    }
    
    /* Text takes 30% of the slide height */
    .home-slide .container-column.home-text {
        flex: 0 0 30% !important;
        height: 30%;
        width: 100%;
        border: 0px solid red;
    }
    
    .home-slide .home-content h2 {
        font-size: var(--font-xxxmedium);
    }
    
    .home-slide .home-content h4 {
        font-size: var(--font-xxmedium);
    }
    
    .home-slide .home-content p {
        font-size: var(--font-xmedium);
    }

    .portrait-grid {
        grid-template-columns: 1fr;
    }

    .landscape-grid {
        grid-template-columns: 1fr;
    }

    /* Fix footer alignment */
    .footer {
        text-align: center !important;
    }
    
    .footer p {
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
}


/* ===== MOBILE SMALL (480px AND BELOW) ===== */
@media (max-width: 480px) {
    .navbar-container {
        padding: 16px 8px;
    }

    .navbar {
        height: var(--navbar-height-480);
    }

    .nav-links .nav-button {
        padding: 6px 0 !important;
        font-size: var(--font-medium) !important;
    }
    
    /* Ensure last button has space at bottom */
    .nav-links .nav-button:last-child {
        margin-bottom: 30px !important;
    }

    .logo img {
        height: var(--logo-height);
        width: auto;
        transition: var(--transition);
    }

    .logo-icons {
        display: grid;
        gap: 10px;
    }

    .cta-button,
    .quote-btn {
        padding: 3px 6px;
        font-size: var(--font-small);
    }
    
    .view-profile-btn {
        padding: 3px 6px;
        font-size: var(--font-xsmall);
    }
    
    .cta-button i,
    .quote-btn i {
        margin-right: 0px;
        font-size: var(--font-small);
    }
    
    .view-profile-btn i {
        margin-right: 0px;
        font-size: var(--font-xsmall);
    }
    
    .mobile-menu-btn {
        font-size: var(--font-xxxmedium);
        padding: 6px 3px;
    }

    .stats-grid {
        margin-top:10px;
    }

    .stat-number {
        font-size: var(--font-large);
    }
    
    .stat-label {
        font-size: var(--font-xsmall);
    }

    .stats {
        height: var(--stats-height-480);
    }

    .features {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Grid adjustments */
    .section-grid {
        grid-template-columns: 1fr;
    }

    .info-badge {
        padding: 12px;
    }

    .leader-profile {
        display: grid;
    }
}