@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary: #D72638;
    --primary-light: #F04052;
    --primary-dark: #A61A2A;
    --primary-gradient: linear-gradient(135deg, #D72638 0%, #FF6B6B 100%);
    
    /* Neutrals */
    --bg-main: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;
    --text-primary: #000000; /* Pure Black */
    --text-secondary: #000000; /* Pure Black */
    --text-muted: #000000; /* Pure Black */
    --border-color: #000000; /* Adjust borders to black if needed, or keep light? Kept light #E8ECEF to avoid messy thick borders everywhere. Wait, let's keep border light so cards don't look weird. */
    --border-color: #E8ECEF;
    --white: #FFFFFF;
    
    /* Semantic */
    --danger: #C0392B;
    --success: #27AE60;
    --warning: #F39C12;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing Grid (8px) */
    --sp-1: 8px;
    --sp-2: 16px;
    --sp-3: 24px;
    --sp-4: 32px;
    --sp-5: 40px;
    --sp-6: 48px;
    --sp-8: 64px;
    --sp-10: 80px;
    --sp-15: 120px;
    
    /* Radii */
    --rad-sm: 8px;
    --rad-md: 12px;
    --rad-lg: 16px;
    --rad-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08); /* Requested soft box shadow */
    --shadow-lg: 0 12px 30px rgba(215, 38, 56, 0.15); /* Primary glow */
    --shadow-card-hover: 0 16px 32px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --trans-fast: 0.2s var(--ease-out);
    --trans-med: 0.4s var(--ease-out);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--trans-fast);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-3);
}

/* =========================================
   Typography Scale
   ========================================= */
.h1 { font-size: clamp(32px, 5vw, 48px); }
.h2 { font-size: clamp(28px, 4vw, 40px); }
.h3 { font-size: clamp(20px, 3vw, 24px); }
.p-lead { font-size: 20px; font-weight: 400; color: var(--text-secondary); }
.p-body { font-size: 16px; }
.p-small { font-size: 14px; }
.p-micro { font-size: 12px; }

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--text-muted); }
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.margin-bottom-sm { margin-bottom: var(--sp-2); }
.margin-bottom-md { margin-bottom: var(--sp-4); }

/* =========================================
   Buttons & CTAs
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all var(--trans-fast);
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(215, 38, 56, 0.2);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(215, 38, 56, 0.5);
    background: linear-gradient(135deg, #b31b2b 0%, #d72638 100%);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0;
}

.btn-text:hover {
    color: var(--primary);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    transition: transform var(--trans-fast);
}

.btn:hover .btn-icon svg {
    transform: translateX(4px);
}

/* =========================================
   Navigation Bar
   ========================================= */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    transition: padding var(--trans-fast);
}

.navbar.scrolled {
    padding: 5px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    transition: height 0.3s ease;
}

.navbar.scrolled .container {
    height: 70px;
}

.ibre-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-decoration: none;
}
.ibre-blocks { display: flex; gap: 4px; }
.ibre-logo .ibre-blocks span {
    background-color: var(--primary); color: white !important;
    font-size: 2.5rem; font-weight: 800;
    width: 3rem; height: 3rem;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.ibre-tagline {
    font-size: 0.6rem; font-weight: 600; letter-spacing: 0.04em;
    color: var(--text-secondary); text-transform: uppercase; white-space: nowrap;
}
.ibre-tagline .text-primary { color: var(--primary) !important; }

.nav-menu {
    display: flex;
    gap: var(--sp-5);
    align-items: center;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-link-primary {
    color: var(--primary);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    gap: var(--sp-2);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    padding: var(--sp-8) 0 var(--sp-6);
    background: url('hero_bg.png') no-repeat center center/cover;
    background-color: var(--bg-main);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.7) 100%);
    z-index: 1;
}

.hero::after {
    content: ""; /* Animated abstract shapes */
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.03;
    filter: blur(50px);
    animation: float 10s ease-in-out infinite alternate;
}

@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(50px) translateX(-30px); }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(215, 38, 56, 0.08);
    color: var(--primary);
    border-radius: var(--rad-full);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--sp-3);
}

.hero-title {
    margin-bottom: var(--sp-3);
    letter-spacing: -1px;
}

.hero-subtitle {
    margin-bottom: var(--sp-5);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    gap: var(--sp-2);
    justify-content: center;
}

/* Glassmorphism Stats Banner */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--sp-6);
    margin-top: var(--sp-8);
    padding: var(--sp-3) var(--sp-5);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--white);
    border-radius: var(--rad-lg);
    box-shadow: var(--shadow-sm);
    max-width: max-content;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   Why Choose IBRE (Cards)
   ========================================= */
.section {
    padding: var(--sp-10) 0;
}

.section-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.05) 50%, transparent 100%);
    width: 80%;
    margin: 0 auto;
}

.section-bg-light {
    background-color: var(--bg-secondary);
}

.section-pattern {
    background-image: radial-gradient(rgba(215, 38, 56, 0.05) 2px, transparent 2px);
    background-size: 30px 30px;
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: var(--sp-8);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--sp-4);
}

.benefit-card {
    background: var(--white);
    padding: var(--sp-5);
    border-radius: var(--rad-lg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--trans-med);
    border-top: 4px solid var(--border-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(215, 38, 56, 0.1);
    border-top-color: var(--primary);
}

.benefit-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-secondary);
    border-radius: 50%;
    margin: 0 auto var(--sp-3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.benefit-card h3 {
    margin-bottom: var(--sp-1);
    font-size: 18px;
}

.benefit-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* =========================================
   How It Works
   ========================================= */
#how-it-works {
    position: relative;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

#how-it-works::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(215,38,56,0.03) 0%, transparent 70%);
    z-index: 0;
}

#how-it-works .container {
    position: relative;
    z-index: 1;
}

.workflow-grid, .workflow-grid-3 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
    position: relative;
    margin-top: var(--sp-6);
}

.workflow-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Connecting Line */
.workflow-grid::before {
    content: '';
    position: absolute;
    top: 45px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--border-color) 0%, var(--primary-light) 50%, var(--border-color) 100%);
    z-index: 1;
}

.workflow-step {
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 90px;
    height: 90px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--sp-3);
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    border: 4px solid var(--white);
    transition: var(--trans-fast);
}

.workflow-step:hover .step-number {
    transform: scale(1.1);
    background: var(--primary);
    color: var(--white);
}

/* =========================================
   Service Category Grid
   ========================================= */
.service-filters {
    display: flex;
    justify-content: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-5);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--rad-full);
    font-size: 14px;
    cursor: pointer;
    transition: var(--trans-fast);
    font-family: var(--font-body);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--text-primary);
    color: var(--white);
    border-color: var(--text-primary);
}

.service-card {
    background: var(--white);
    border-radius: var(--rad-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--trans-med);
    position: relative;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-5px);
}

.service-banner {
    height: 120px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    position: relative;
}

/* Micro-interaction on card hover */
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--trans-fast);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-content {
    padding: var(--sp-3);
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--sp-1);
    font-size: 12px;
    color: var(--text-muted);
}

.category-tag {
    background: rgba(215, 38, 56, 0.1);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: var(--rad-full);
    font-weight: 600;
}

.service-card h4 {
    font-size: 18px;
    margin-bottom: var(--sp-1);
}

.service-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--sp-2);
}

/* =========================================
   CTA Banner
   ========================================= */
.cta-banner {
    background: url('cta_bg.png') no-repeat center center/cover;
    background-color: var(--text-primary);
    border-radius: var(--rad-lg);
    padding: var(--sp-8) var(--sp-4);
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin: var(--sp-10) 0;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139,0,0,0.9) 0%, rgba(215, 38, 56, 0.85) 100%);
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-banner h2 {
    color: var(--white);
    margin-bottom: var(--sp-2);
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-bottom: var(--sp-4);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--bg-secondary);
    padding: var(--sp-8) 0 var(--sp-4);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: var(--sp-5);
    margin-bottom: var(--sp-6);
    align-items: flex-start;
}

.footer-col {
    color: #4A4A4A;
}

.footer-col p, .footer-col span, .footer-col li, .footer-col i {
    color: #4A4A4A !important;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--sp-3);
    color: #333333;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.footer-links a {
    color: #4A4A4A;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px; /* subtle shift */
}

.footer-bottom {
    padding-top: var(--sp-4);
    border-top: 1px solid #D1D5DB;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: #4A4A4A;
    text-align: center;
}

.social-links {
    display: flex;
    gap: var(--sp-2);
}

.social-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
}

.social-circle:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px) scale(1.05);
}

/* =========================================
   Forms (Join & Login)
   ========================================= */
.form-container {
    max-width: 600px;
    margin: var(--sp-8) auto;
    background: var(--bg-card);
    padding: var(--sp-5);
    border-radius: var(--rad-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: var(--sp-3);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--rad-sm);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--trans-fast);
    background: var(--bg-main);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.1);
}

/* =========================================
   Timeline & Flowchart (How It Works)
   ========================================= */
.timeline-vertical {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--sp-4) 0;
}

.timeline-vertical::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(215, 38, 56, 0.2);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    margin-bottom: var(--sp-6);
    width: 100%;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-content {
    width: calc(50% - 40px);
    background: var(--white);
    padding: var(--sp-4);
    border-radius: var(--rad-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    transition: all var(--trans-fast);
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(215, 38, 56, 0.1);
    border-color: rgba(215, 38, 56, 0.3);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
    text-align: right;
}

.timeline-icon-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--white);
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: var(--primary);
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(215, 38, 56, 0.2);
    transition: all var(--trans-fast);
}

.timeline-item:hover .timeline-icon-wrapper {
    transform: translateX(-50%) scale(1.1);
    background: var(--primary);
    color: var(--white);
}

.timeline-step-num {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--sp-1);
    display: block;
}

.flowchart-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.flowchart-node {
    background: var(--white);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--rad-full);
    border: 2px solid var(--primary-light);
    font-weight: 600;
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    flex: 1;
    text-align: center;
    min-width: 150px;
    transition: all var(--trans-fast);
}

.flowchart-node:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(215, 38, 56, 0.15);
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.flowchart-arrow {
    color: var(--primary);
    font-size: 24px;
}

.feature-card {
    display: flex; 
    align-items: center; 
    gap: 12px; 
    background: var(--white); 
    border: 1px solid var(--border-color); 
    box-shadow: var(--shadow-sm); 
    padding: 16px 24px; 
    border-radius: 12px;
    transition: all var(--trans-fast);
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 6px 15px rgba(215, 38, 56, 0.1);
}

.feature-card:hover i {
    transform: scale(1.1);
}

.feature-card i {
    transition: transform var(--trans-fast);
}

.features-grid {
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: var(--sp-5); 
    max-width: 900px; 
    margin: 0 auto;
}

.user-flow-card {
    background: var(--bg-secondary); 
    padding: var(--sp-5); 
    border-radius: var(--rad-lg); 
    border-top: 4px solid var(--border-color);
    transition: all var(--trans-fast);
}

.user-flow-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* =========================================
   Responsive Breakpoints
   ========================================= */
@media (max-width: 992px) {
    .h1 { font-size: 40px; }
    .workflow-grid, .workflow-grid-3 { grid-template-columns: 1fr; }
    .workflow-grid::before, .workflow-grid-3::before { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    #about .container { grid-template-columns: 1fr !important; text-align: center; }
    #about .section-header { text-align: center !important; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .section { padding: var(--sp-6) 0; }
    
    .nav-menu {
        display: none; /* Hide for mobile by default */
        position: absolute; 
        top: 80px; 
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: var(--sp-4);
        box-shadow: var(--shadow-md);
        text-align: center;
    }
    
    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease forwards;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .nav-actions { display: flex; }
    .hamburger { display: block; }
    .hero-stats { flex-direction: column; gap: var(--sp-3); }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: var(--sp-2); text-align: center; }
    
    .timeline-vertical::before {
        left: 30px;
    }
    .timeline-icon-wrapper {
        left: 30px;
    }
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
        margin-right: 0 !important;
        text-align: left !important;
    }
    .flowchart-arrow {
        transform: rotate(90deg);
        margin: var(--sp-2) auto;
    }
    .flowchart-horizontal {
        flex-direction: column;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================
   Animations
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.cta-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: bounce-subtle 2s infinite ease-in-out;
}

.cta-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    animation-play-state: paused;
}

.cta-whatsapp {
    background: #25D366;
}

.cta-call {
    background: var(--primary);
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* =========================================
   New Refinements (Task Additions)
   ========================================= */

/* Typography Utils */
.max-w-700 {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Category Grid (Strict 3 columns on desktop) */
.cards-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
}

/* Hover Accent Colors for Icons */
.benefit-card:hover .benefit-icon {
    background: var(--primary);
    color: var(--white);
}

.feature-card:hover i {
    color: var(--primary) !important;
}

/* Glowing CTA */
.cta-glow {
    position: relative;
}
.cta-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(215,38,56,0.3) 0%, transparent 60%);
    animation: glow-pulse 4s infinite alternate;
    z-index: 0;
    pointer-events: none;
}
.cta-glow .cta-content {
    position: relative;
    z-index: 2;
}

@keyframes glow-pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 1; }
}

@media (max-width: 992px) {
    .cards-grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* =========================================
   FAQ Section
   ========================================= */
.faq-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto var(--sp-6);
}
.faq-search input {
    width: 100%;
    padding: 16px 24px 16px 50px;
    border-radius: var(--rad-full);
    border: 1px solid var(--border-color);
    font-size: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--trans-fast);
}
.faq-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.1);
}
.faq-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 20px;
}

.faq-filters {
    display: flex;
    justify-content: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-8);
    flex-wrap: wrap;
}
.faq-filter-btn {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--rad-full);
    cursor: pointer;
    font-weight: 500;
    transition: var(--trans-fast);
}
.faq-filter-btn:hover, .faq-filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.accordion-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--rad-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--trans-fast);
}

.accordion-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    background: var(--white);
    transition: var(--trans-fast);
}
.accordion-header:hover {
    color: var(--primary);
    background: rgba(215, 38, 56, 0.02);
}

.accordion-icon {
    font-size: 20px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-body-inner {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.accordion-item.active {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}
.accordion-item.active .accordion-header {
    color: var(--primary);
}
.accordion-item.active .accordion-icon {
    transform: rotate(45deg); /* + becomes x */
}

/* =========================================
   Global Fixes for Buttons and Hover States
   ========================================= */

/* Fix social media icon hover color overridden by footer !important */
.social-circle:hover i {
    color: var(--white) !important;
}

/* Fix CTA Banner buttons hover effect overridden by inline styles */
.cta-banner .btn-primary:hover {
    background: var(--bg-secondary) !important;
    color: var(--primary-dark) !important;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
}

.cta-banner .btn-outline:hover {
    background: var(--white) !important;
    color: var(--primary) !important;
    transform: scale(1.05);
}

/* =========================================
   Blog System Styles
   ========================================= */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--sp-5);
}

.blog-card {
    background: var(--white);
    border-radius: var(--rad-lg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: var(--trans-med);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.blog-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.blog-card-content {
    padding: var(--sp-4);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-category {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.blog-title {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.blog-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--trans-fast);
}

.blog-title a:hover {
    color: var(--primary);
}

.blog-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--sp-4);
    flex: 1;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Featured Blog Card */
.featured-blog {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--white);
    border-radius: var(--rad-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: var(--sp-6);
    border: 1px solid var(--border-color);
}

.featured-blog-img {
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
}

.featured-blog-content {
    padding: var(--sp-6);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-blog-title {
    font-size: 2rem;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .featured-blog {
        grid-template-columns: 1fr;
    }
    .featured-blog-img {
        min-height: 250px;
    }
}

/* Blog Detail Page */
.blog-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--sp-5);
}

.blog-detail-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--rad-lg);
    margin-bottom: var(--sp-6);
    box-shadow: var(--shadow-sm);
}

.blog-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.blog-content h2, .blog-content h3 {
    color: var(--primary-dark);
    margin: var(--sp-5) 0 var(--sp-3);
}

.blog-content p {
    margin-bottom: var(--sp-3);
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--rad-md);
    margin: var(--sp-4) 0;
}

/* Admin Blog Table & Generic Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border-radius: var(--rad-md);
    overflow: hidden;
}

.admin-table th, .admin-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-published { background: #d1fae5; color: #065f46; }
.status-draft { background: #fef3c7; color: #92400e; }

/* Ensure social circles have a visible border on white backgrounds */
.social-circle {
    border: 1px solid var(--border-color);
}

/* =========================================
   Application Tracking System Styles
   ========================================= */

.track-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--rad-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: var(--sp-6);
    border: 1px solid var(--border-color);
}

.track-input-group {
    display: flex;
    gap: var(--sp-3);
    margin-bottom: var(--sp-5);
}

.track-input-group input {
    flex: 1;
}

@media (max-width: 576px) {
    .track-input-group {
        flex-direction: column;
    }
    .track-input-group button {
        width: 100%;
    }
}

.status-card {
    border-radius: var(--rad-md);
    padding: var(--sp-5);
    text-align: center;
    display: none; /* hidden by default */
    animation: fadeIn 0.4s ease-out;
}

.status-card.active {
    display: block;
}

.status-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Pending */
.card-pending {
    background: #FFFBEB;
    border: 2px solid #FDE68A;
}
.card-pending .status-icon { color: #D97706; }
.card-pending h3 { color: #92400E; }

/* Approved */
.card-approved {
    background: #ECFDF5;
    border: 2px solid #A7F3D0;
}
.card-approved .status-icon { color: #059669; }
.card-approved h3 { color: #065F46; }

/* Rejected */
.card-rejected {
    background: #FEF2F2;
    border: 2px solid #FECACA;
}
.card-rejected .status-icon { color: #DC2626; }
.card-rejected h3 { color: #991B1B; }

.status-details {
    margin-top: var(--sp-4);
    padding-top: var(--sp-4);
    border-top: 1px solid rgba(0,0,0,0.1);
    text-align: left;
}

.status-details p {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.status-details strong {
    color: var(--text-primary);
}

/* Success Overlay (Join.html) */
.success-overlay {
    background: var(--white);
    border-radius: var(--rad-lg);
    padding: var(--sp-6);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    display: none; /* hidden by default */
}
.success-overlay.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.app-id-display {
    background: var(--bg-secondary);
    border: 2px dashed var(--primary);
    color: var(--primary-dark);
    font-size: 2rem;
    font-weight: 800;
    padding: 16px;
    border-radius: var(--rad-md);
    display: inline-block;
    margin: var(--sp-4) 0;
    letter-spacing: 2px;
}


/* =========================================
   Mobile Responsiveness Enhancements
   ========================================= */
/* Hero Title Scaling */
.hero-title-main {
    font-size: clamp(2rem, 5vw, 3.5rem) !important;
}
.hero-title-sub {
    font-size: clamp(1.2rem, 3vw, 2rem) !important;
}

/* Flex Grid Center for Why Choose IBRE */
.flex-grid-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-4);
}
.benefit-card-responsive {
    flex: 1 1 250px !important;
    max-width: 380px !important;
    min-height: 280px;
}

@media (max-width: 768px) {
    /* Section Padding Reduction */
    .section {
        padding: var(--sp-6) 0 !important;
    }
    .hero {
        padding: var(--sp-6) 0 var(--sp-5) !important;
    }
    
    /* Navbar Mobile Actions */
    .nav-actions { display: flex;
        flex-direction: column;
        width: 100%;
        gap: var(--sp-2);
        margin-top: var(--sp-4);
        border-top: 1px solid var(--border-color);
        padding-top: var(--sp-4);
    }
    .nav-actions .btn {
        width: 100%;
    }
    
    /* Hero Stats Banner */
    .hero-stats {
        flex-direction: column !important;
        gap: var(--sp-3) !important;
        padding: var(--sp-4) !important;
    }
}

@media (max-width: 480px) {
    /* Cards Grid Overrides for tiny screens */
    .cards-grid {
        grid-template-columns: 1fr !important;
    }
    .benefits-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Responsive Grid Utilities */
.responsive-grid {
    display: grid;
    gap: 16px;
}
.responsive-grid-2 {
    grid-template-columns: 1fr 1fr;
}
.responsive-grid-2-1 {
    grid-template-columns: 2fr 1fr;
}

@media (max-width: 768px) {
    .responsive-grid-2, .responsive-grid-2-1 {
        grid-template-columns: 1fr !important;
    }
    /* Dashboard specific */
    .dashboard-grid { grid-template-columns: 1fr !important; }
}



@media (max-width: 768px) {
    .navbar .container {
        justify-content: center !important;
        position: relative;
    }
    .hamburger {
        position: absolute !important;
        right: var(--sp-3);
        top: 50%;
        transform: translateY(-50%);
    }
    /* Ensure the logo itself is centered if it behaves as a flex item */
    .ibre-logo {
        margin: 0 auto;
    }
}

/* =========================================
   Google Ads Configuration
   ========================================= */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--sp-4) auto;
    padding: var(--sp-2);
    background-color: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--rad-md);
    position: relative;
    overflow: hidden;
    text-align: center;
    max-width: 100%;
}

.ad-container::before {
    content: 'Advertisement';
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-leaderboard {
    min-height: 90px;
    width: 100%;
    max-width: 970px;
}

.ad-rectangle {
    min-height: 250px;
    width: 100%;
    max-width: 300px;
}

.ad-responsive {
    min-height: 100px;
    width: 100%;
}

/* Ensure adsbygoogle ins tags are block level */
.adsbygoogle {
    display: block !important;
}
