:root {
    --primary-color: #0D2137;
    --secondary-color: #E6BE4C;
    --accent-color: #16A086;
    --light-bg: #F8F9FA;
    --dark-text: #2D3748;
    --white: #FFFFFF;
    --light-text: #718096;
    --dark-bg: #121212;
    --red-color: #E53935;
    --green-color: #43A047;
    --chart-grid: #2C3E50;
    --gradient-primary: linear-gradient(135deg, #0D2137 0%, #1E4976 100%);
    --box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    font-size: 15px; 
}

body {
    font-family: 'Montserrat', 'Arial', sans-serif;
    color: var(--dark-text);
    background-color: var(--dark-bg);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-top: 0;
    line-height: 1.3;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    transition: var(--transition);
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    margin: 5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 0.9rem;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover::after {
    height: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

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

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
    border: 2px solid var(--accent-color);
}

.btn-accent:hover {
    background-color: transparent;
    color: var(--accent-color);
}

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

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

header {
    background-color: var(--primary-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    padding: 5px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 60px;
}

.logo img {
    height: 65px;
    width: auto;
    transition: var(--transition);
}

.mobile-menu-btn {
    display: block;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 30px;
    position: relative;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 5px;
    padding: 5px;
    outline: none;
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.mobile-menu-btn span {
    width: 5px;
    height: 15px;
    background-color: #E6BE4C;
    position: relative;
    border-radius: 1px;
    transform-origin: bottom;
    transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) {
    height: 12px;
    background-color: #E53935;
}

.mobile-menu-btn span:nth-child(2) {
    height: 18px;
    background-color: #43A047;
}

.mobile-menu-btn span:nth-child(3) {
    height: 15px;
    background-color: #E53935;
}

.mobile-menu-btn span::before,
.mobile-menu-btn span::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 3px;
    background-color: inherit;
}

.mobile-menu-btn span::before {
    top: 0;
}

.mobile-menu-btn span::after {
    bottom: 0;
}

.mobile-menu-btn.active {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: scaleY(0.6) translateY(-2px);
    background-color: #43A047;
    height: 20px;
}

.mobile-menu-btn.active span:nth-child(2) {
    transform: scaleY(0.5);
    height: 10px;
    background-color: #E53935;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: scaleY(1.2) translateY(2px);
    background-color: #43A047;
}

@keyframes menu-candle-pulse {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(0.85); }
    100% { transform: scaleY(1); }
}

.mobile-menu-btn:hover span:nth-child(1) {
    animation: menu-candle-pulse 1s infinite ease-in-out;
    animation-delay: -0.4s;
}

.mobile-menu-btn:hover span:nth-child(2) {
    animation: menu-candle-pulse 1s infinite ease-in-out;
    animation-delay: -0.2s;
}

.mobile-menu-btn:hover span:nth-child(3) {
    animation: menu-candle-pulse 1s infinite ease-in-out;
    animation-delay: 0s;
}

.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a1827 100%);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 999;
    list-style: none;
    margin: 0;
    padding: 60px 0;
    overflow-y: auto;
}

.nav-links.active {
    right: 0;
}

body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 998;
    animation: fadeIn 0.3s ease-out forwards;
}

.nav-links li {
    margin: 1.5rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0s;
    width: 100%;
    text-align: center;
}

.nav-links.active li {
    opacity: 1;
    transform: translateY(0);
}

.nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
.nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
.nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
.nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
.nav-links.active li:nth-child(5) { transition-delay: 0.5s; }
.nav-links.active li:nth-child(6) { transition-delay: 0.6s; }

.nav-links a {
    color: var(--white);
    font-weight: 600;
    position: relative;
    padding: 8px 15px;
    font-size: 1.2rem;
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a i {
    margin-right: 6px;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.nav-links a:hover i {
    transform: translateY(-2px);
}

@media (min-width: 992px) {
    .nav-links a i {
        display: inline-block;
        margin-bottom: 5px;
        font-size: 1.1rem;
    }
}

.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(13, 33, 55, 0.75), rgba(13, 33, 55, 0.85));
}

.hero-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 3;
    position: relative;
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--white);
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.hero h1::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.hero p.tagline {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--white);
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    opacity: 0.95;
}

.hero p.institute-name {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--white);
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

section {
    padding: 70px 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.section-light {
    background-image: linear-gradient(to bottom right, var(--light-bg) 0%, #ffffff 100%);
}

.section-dark {
    background-image: linear-gradient(135deg, var(--primary-color) 0%, #0a1827 100%);
    color: var(--white);
}

.section-dark h2 {
    color: var(--white);
}

.section-accent {
    background-image: linear-gradient(135deg, var(--accent-color) 0%, #0d8b72 100%);
    color: var(--white);
}

.section-accent h2 {
    color: var(--white);
}

.container {
    width: 90%;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.section-header h2::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(230, 190, 76, 0.2);
    z-index: -1;
    left: -15px;
    top: -10px;
}

.section-subtitle {
    font-size: 1.1rem;
    max-width: 100%;
    margin: -15px auto 25px;
    color: rgba(255, 255, 255, 0.8);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.stat-box {
    text-align: center;
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
}

.stat-box i {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.stat-box:hover i {
    transform: scale(1.2);
}

.stat-box i::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(230, 190, 76, 0.1);
    z-index: -1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.stat-box .counter {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
}

.stat-box h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    opacity: 0.8;
}

.philosophy-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.philosophy-item {
    padding: 25px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.philosophy-item:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-10px);
}

.philosophy-item h2 {
    margin-bottom: 1.5rem;
    position: relative;
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 12px;
    display: inline-block;
}

.philosophy-item ul {
    padding-left: 1rem;
    list-style: none;
}

.philosophy-item li {
    margin-bottom: 1rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.8rem;
}

.philosophy-item li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

#about {
    position: relative;
    overflow: hidden;
    text-align: center;
}

#about::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(230, 190, 76, 0.05);
    top: -100px;
    left: -100px;
    z-index: 0;
}

#about::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(22, 160, 134, 0.05);
    bottom: -75px;
    right: -75px;
    z-index: 0;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 0 auto;
    max-width: 1200px; 
    position: relative;
    z-index: 2;
    text-align: left; /* Changed from center */
    align-items: flex-start; /* Changed from center */
    justify-content: flex-start; /* Changed from center */
    width: 100%;
}

.about-text {
    max-width: 1200px; /* Increased from 1000px */
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    background: linear-gradient(to bottom right, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
    width: 100% !important;
    position: relative;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    float: none !important;
}

.about-text h3 {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: left; /* Changed from center */
    width: 100%;
}

.about-text h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0; /* Changed from 50% */
    transform: none; /* Removed translateX(-50%) */
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, var(--secondary-color), transparent);
}

.about-text ul {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 25px auto;
    padding: 15px;
    float: none !important;
    position: static !important;
    right: auto !important;
    display: block;
}

.about-text li {
    background-color: transparent; 
    color: var(--dark-text);
    padding: 8px 0 8px 30px;
    margin-bottom: 10px;
    border-radius: 0;
    list-style: none;
    position: relative;
    box-shadow: none;
    text-align: left;
    display: block;
}

.about-text li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Reset any float or alignment properties */
@media (min-width: 992px) {
    .about-text ul {
        border-left: none;
        padding-left: 0;
        box-shadow: none;
        display: block;
        float: none;
    }
}

.about-text p {
    color: var(--dark-text);
    font-size: 1rem;
    line-height: 1.7;
    text-align: left;
    max-width: 100%;
    margin-left: 0;
    margin-right: auto;
}

/* Media query for responsive design */
@media (min-width: 992px) {
    #about {
        text-align: left; /* Changed from center */
    }
    
    .about-content {
        text-align: left; /* Changed from center */
        align-items: flex-start; /* Changed from center */
    }
    
    .about-text {
        margin: 0 auto;
        text-align: left; /* Changed from center */
        padding: 35px 30px;
        max-width: 1400px;
    }
    
    .about-text h3 {
        text-align: left; /* Changed from center */
        margin-left: 0; /* Changed from auto */
        margin-right: auto;
    }
    
    .about-text h3::after {
        left: 0; /* Changed from 50% */
        transform: none; /* Removed translateX(-50%) */
    }
    
    .about-text p {
        text-align: left; /* Changed from center */
        max-width: 1450px;
        margin-left: 0; /* Changed from auto */
        margin-right: auto;
    }
}

.about-text:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.about-text h3 {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: left;
    width: 100%;
}

.about-text h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 60px;
    background: linear-gradient(90deg, var(--secondary-color), transparent);
}

.about-text ul {
    background: rgba(255, 255, 255, 0.5);
    padding: 15px 15px 15px 40px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: inline-block;
    text-align: left;
    display: inline-block;
    text-align: left;
    max-width: 650px;
    margin: 20px auto;
    width: 100%;
    box-sizing: border-box;
}

/* For all mobile devices */
@media (max-width: 767px) {
    .about-text, .aaaaprofile {
        padding: 30px 20px;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    #about .container {
        width: 90%;
        padding: 0 10px;
    }
}

/* Founder Profile - Updated Structure */
.founder-profile {
    position: relative;
    background: var(--white);
    padding: 40px 20px 25px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    overflow: visible;
    width: 100%;
    max-width: 800px;
    text-align: left;
    margin: 0 auto;
    box-sizing: border-box;
}

.founder-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 15px auto 25px;
}

.founder-logo {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.founder-logo:hover {
    transform: scale(1.05);
}

.founder-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.founder-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.founder-right {
    text-align: left;
}

.founder-profile::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, var(--secondary-color), var(--accent-color));
    border-radius: 0 15px 15px 0;
}

.founder-profile::after {
    content: '"';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 80px;
    line-height: 0;
    font-family: Georgia, serif;
    color: rgba(230, 190, 76, 0.1);
    z-index: 1;
}

.founder-image {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 3;
}

/* Certificates - Mobile First */
.certificates-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
}

.certificates-container h5 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
    display: inline-block;
    position: relative;
}

.certificates-container h5::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.certificates {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px 0;
    width: 100%;
}

/* Tablet view - 2x2 grid */
@media (min-width: 768px) {
    .certificates {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop view - 4 in a row */
@media (min-width: 992px) {
    .certificates {
        grid-template-columns: repeat(4, 1fr);
    }
}

.certificate {
    width: 100%;
    max-width: 100%;
    height: auto;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Desktop layout for founder profile */
@media (min-width: 768px) {
    .founder-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .founder-left {
        width: 40%;
    }
    
    .founder-right {
        width: 60%;
        padding-left: 30px;
    }
    
    .founder-right p {
        text-align: left;
    }
}

/* Founder Profile - Centered Design */
.founder-profile {
    position: relative;
    background: var(--white);
    padding: 40px 20px 25px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    overflow: visible;
    width: 100%;
    max-width: 800px;
    text-align: left;
    margin: 0 auto;
    box-sizing: border-box;
}

.founder-profile::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, var(--secondary-color), var(--accent-color));
    border-radius: 0 15px 15px 0;
}

.founder-profile::after {
    content: '"';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 80px;
    line-height: 0;
    font-family: Georgia, serif;
    color: rgba(230, 190, 76, 0.1);
    z-index: 1;
}

.founder-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 3;
}

.founder-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-profile h3 {
    position: relative;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.6rem;
    z-index: 2;
    text-align: left;
}

.founder-profile h4 {
    position: relative;
    display: inline-block;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    padding-bottom: 8px;
    z-index: 2;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.founder-profile h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100px;
    height: 2px;
    background: var(--accent-color);
}

.founder-profile p {
    position: relative;
    color: var(--dark-text);
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 1rem;
    z-index: 2;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

/* Media query to center about section layout on PC */
@media (min-width: 992px) {
    #about {
        text-align: center;
    }
    
    #about .section-header {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        max-width: 1200px; /* Increased from 1000px */
    }

    #about .section-header h2 {
        display: inline-block;
        position: relative;
    }
    
    #about .section-header h2::after {
        left: 50%;
        transform: translateX(-50%);
        margin: 0 auto;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .about-text {
        margin: 0 auto;
        text-align: left; /* Changed from center */
        padding: 35px 30px;
        max-width: 1400px; /* Increased from 800px */
    }
    
    .about-text h3 {
        text-align: left; /* Changed from center */
        margin-left: 0; /* Changed from auto */
        margin-right: auto;
    }
    
    .about-text h3::after {
        left: 0; /* Changed from 50% */
        transform: none; /* Removed translateX(-50%) */
    }
    
    .about-text p {
        text-align: left; /* Changed from center */
        max-width: 1450px;
        margin-left: 0; /* Changed from auto */
        margin-right: auto;
    }
    
    .about-text ul {
        padding-left: 0;
        text-align: left;
        max-width: 1450px;
        margin: 20px auto;
        display: inline-block;
    }
    
    .founder-profile {
        max-width: 1400px;
        margin: 0 auto;
        text-align: left;
    }
    
    .founder-profile h4 {
        margin-left: 0;
        margin-right: 0;
        text-align: left;
        display: block;
    }
    
    .founder-profile h4::after {
        left: 0;
        transform: none;
        width: 100px;
    }
    
    .founder-profile p {
        text-align: left;
        max-width: 950px;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Certificates - Mobile First */
.certificates-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
}

.certificates-container h5 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
    display: inline-block;
    position: relative;
}

.certificates-container h5::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.certificates {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px 0;
    width: 100%;
}

/* Tablet view - 2x2 grid */
@media (min-width: 768px) {
    .certificates {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop view - 4 in a row */
@media (min-width: 992px) {
    .certificates {
        grid-template-columns: repeat(4, 1fr);
    }
}

.certificate {
    width: 100%;
    max-width: 100%;
    height: auto;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Training Section Styles */
#training {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a1827 100%);
    overflow: hidden;
    position: relative;
    padding-bottom: 10px; /* Greatly reduced padding at bottom */
}

#training::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(230, 190, 76, 0.03);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    z-index: 0;
}

#training::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(22, 160, 134, 0.03);
    border-radius: 50%;
    bottom: -125px;
    left: -125px;
    z-index: 0;
}

.training-container {
    position: relative;
    z-index: 2;
    padding: 20px 0 0 0; /* Removed bottom padding */
}

.training-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, minmax(320px, auto)); /* Set minimum row height */
    gap: 30px 15px; /* Increased row gap */
    margin-bottom: 0;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

#training .section-title {
    color: var(--white);
}

#training .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* Tablet view - 2x2 grid but larger */
@media (min-width: 768px) and (max-width: 991px) {
    .training-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, minmax(350px, auto)); /* Larger minimum height */
        gap: 35px 20px; /* Increased vertical gap even more */
        max-width: 700px;
        margin-bottom: 0;
    }
}

/* Desktop - 4 cards in a row */
@media (min-width: 992px) {
    .training-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: minmax(380px, auto); /* Taller cards on desktop */
        gap: 30px 20px;
        max-width: 1200px;
        margin-bottom: 0;
    }
}

@media (max-width: 575px) {
    .training-grid {
        gap: 30px 12px; /* Increased vertical gap */
        max-width: 300px;
        grid-template-rows: repeat(2, minmax(300px, auto));
    }
    
    .training-card {
        padding: 20px 12px; /* Reduced padding for better mobile fit */
        min-height: 300px; /* Ensure minimum height */
        height: 100%; /* Fill the grid cell */
    }
    
    .training-card p {
        font-size: 0.85rem; /* Smaller text */
        line-height: 1.4;
        margin-bottom: 15px;
        height: auto; /* Allow text to flow naturally */
    }
}

/* Override the conflicting media query with large gaps */
@media (max-width: 991px) {
    .training-grid {
        gap: 30px 15px; /* Increased row gap */
    }
}

@media (max-width: 767px) {
    .training-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, minmax(320px, auto));
        max-width: 350px;
        gap: 30px 15px; /* Increased vertical gap */
    }
}

.training-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px 15px; /* Reduced padding */
    text-align: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Fill the available height */
    min-height: 320px; /* Increased minimum height */
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0;
    box-sizing: border-box; /* Include padding in height calculation */
}

.training-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    transition: all 0.6s ease;
}

.training-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.training-card:hover::before {
    left: 100%;
}

.card-icon {
    margin: 0 auto 15px; /* Reduced bottom margin */
    width: 65px; /* Reduced size */
    height: 65px; /* Reduced size */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    transition: all 0.5s ease;
    animation: float 6s ease-in-out infinite;
}

.card-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.card-icon i {
    font-size: 1.8rem; /* Slightly reduced size */
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.training-card:hover .card-icon {
    transform: scale(1.1);
}

.training-card:hover .card-icon i {
    color: var(--white);
}

.training-card h3 {
    font-size: 1.25rem; /* Smaller font size */
    color: var(--white);
    margin-bottom: 10px; /* Reduced margin */
    font-weight: 700;
}

.training-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem; /* Reduced font size */
    line-height: 1.4; /* Tighter line height */
    margin-bottom: 15px;
    flex-grow: 1;
}

.card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px; /* Smaller padding */
    background: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem; /* Smaller text */
    margin-top: auto; /* Push to bottom */
    text-decoration: none;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Remove redundant media queries that were causing conflicts */
@media (max-width: 991px) {
    section#training {
        padding: 50px 0 20px 0;
    }
}

@media (max-width: 767px) {
    section#training {
        padding: 50px 0 10px 0;
    }
}

section#training {
    padding: 70px 0 20px 0; /* Reset padding for training section */
}

/* Enhanced YouTube Video in CTA Section */
.video-container-cta {
    position: relative;
    width: 100%;
    max-width: 660px;
    margin: 40px auto;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
}

.video-container-cta::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--secondary-color), 
        var(--accent-color), 
        var(--secondary-color));
    z-index: -1;
    border-radius: 17px;
    opacity: 0.7;
}

.video-container-cta:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.video-container-cta iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}

/* Video play button overlay for a more interactive look */
.video-container-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
    pointer-events: none;
}

.video-container-cta:hover::after {
    background: rgba(0, 0, 0, 0);
}

/* Add pulsing effect to draw attention to the video */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 190, 76, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(230, 190, 76, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 190, 76, 0);
    }
}

/* Modified footer header styling to better integrate with video */
.footer-header {
    text-align: center;
    margin-bottom: 70px;
    padding: 0 20px;
    position: relative;
}

/* Custom styling for the CTA button below the video */
.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
    position: relative;
    z-index: 2;
}

.btn-outline-light {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
    padding: 15px 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline-light:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.btn-outline-light i {
    margin-right: 8px;
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.btn-outline-light:hover i {
    transform: scale(1.2);
}

@media (max-width: 767px) {
    .video-container-cta {
        margin: 30px auto;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    }
    
    .btn-outline-light {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

/* YouTube Video in CTA Section */
.video-container-cta {
    position: relative;
    width: 100%;
    max-width: 660px;
    margin: 30px auto;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.video-container-cta iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

@media (max-width: 767px) {
    .video-container-cta {
        margin: 25px auto;
    }
}

/* --- Footer CTA: Text & Video Side by Side (Unified, Clean) --- */
.footer-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  margin: 0 auto 32px auto;
  max-width: 900px;
  flex-wrap: wrap;
}
.footer-cta-text {
  flex: 0 1 320px;
  font-size: 1.15rem;
  color: var(--white);
  text-align: left;
  font-weight: 500;
  line-height: 1.2;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: unset;
  max-height: unset;
  height: auto;
  white-space: normal;
}
.footer-cta-video {
  flex: 0 1 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-iframe-wrapper {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  overflow: hidden;
  position: relative;
}
.footer-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 9/16;
  border-radius: 16px;
  border: none;
  display: block;
  background: #000;
}
@media (max-width: 900px) {
  .footer-cta-row {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .footer-cta-text {
    text-align: center;
    font-size: 1.05rem;
    padding: 2px 0;
    max-width: 220px;
    flex-basis: auto;
    margin: 0 auto;
    line-height: 1.1;
    min-height: unset;
    max-height: unset;
    height: auto;
    white-space: normal;
  }
  .footer-cta-video {
    max-width: 100%;
    justify-content: center;
  }
  .footer-iframe-wrapper {
    max-width: 260px;
    aspect-ratio: 9/16;
  }
}
@media (max-width: 600px) {
  .footer-cta-row {
    gap: 10px;
  }
  .footer-cta-text {
    max-width: 95vw;
    flex-basis: auto;
    font-size: 0.98rem;
    margin: 0 auto 10px auto;
    line-height: 1.05;
    padding: 1px 0;
    min-height: unset;
    max-height: unset;
    height: auto;
    white-space: normal;
  }
  .footer-iframe-wrapper {
    max-width: 100vw;
    min-width: 160px;
    aspect-ratio: 9/16;
    max-height: 220px;
  }
  .footer-iframe-wrapper iframe {
    max-height: 220px;
  }
}
/* --- End Footer CTA Section --- */

/* --- Footer Header Side Row: 9:16 Video Format, Double Size (Fix for Fixed Width) --- */
.footer-header-side-video .video-container-cta {
  width: 100%;
  max-width: 540px;
  aspect-ratio: 9/16;
  height: auto;
  position: relative;
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  padding-bottom: 0;
}
.footer-header-side-video .video-container-cta iframe {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 9/16;
  min-height: 720px;
  max-height: 960px;
  display: block;
  border-radius: 10px;
}
@media (max-width: 1100px) {
  .footer-header-side-video .video-container-cta iframe {
    min-height: 400px;
    max-height: 600px;
  }
}
@media (max-width: 700px) {
  .footer-header-side-video .video-container-cta {
    max-width: 100%;
  }
  .footer-header-side-video .video-container-cta iframe {
    min-height: 200px;
  }
}

/* --- Footer Header Side Row: 9:16 Video Format, Double Size --- */
.footer-header-side-video .video-container-cta {
  max-width: 540px;
  aspect-ratio: 9/16;
  padding-bottom: 0;
  height: 960px;
}
.footer-header-side-video .video-container-cta iframe {
  aspect-ratio: 9/16;
  width: 100%;
  height: 100%;
  min-height: 640px;
  border-radius: 10px;
}
@media (max-width: 1100px) {
  .footer-header-side-video .video-container-cta {
    max-width: 100%;
    height: 600px;
  }
  .footer-header-side-video .video-container-cta iframe {
    min-height: 400px;
  }
}
@media (max-width: 700px) {
  .footer-header-side-video .video-container-cta {
    max-width: 100%;
    height: 340px;
    aspect-ratio: 9/16;
  }
  .footer-header-side-video .video-container-cta iframe {
    min-height: 200px;
  }
}

/* --- Footer Video & Side Text: Clean Responsive 9:16 Layout --- */
.footer-header-side-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 24px 0 36px 0;
  flex-wrap: wrap;
}
.footer-header-side-text {
  flex: 0 1 320px;
  font-size: 1.15rem;
  color: var(--white);
  text-align: left;
  font-weight: 500;
  line-height: 1.5;
  padding: 0 10px;
}
.footer-header-side-video {
  flex: 0 1 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-header-side-video .video-container-cta {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 9/16;
  height: auto;
  margin: 0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  background: #000;
  position: relative;
  overflow: hidden;
}
.footer-header-side-video .video-container-cta iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 9/16;
  border-radius: 16px;
  border: none;
  display: block;
  background: #000;
}
@media (max-width: 900px) {
  .footer-header-side-row {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .footer-header-side-text {
    text-align: center;
    font-size: 1.05rem;
    padding: 0;
  }
  .footer-header-side-video {
    max-width: 100%;
    justify-content: center;
  }
  .footer-header-side-video .video-container-cta {
    max-width: 320px;
    aspect-ratio: 9/16;
  }
}
@media (max-width: 600px) {
  .footer-header-side-row {
    gap: 10px;
  }
  .footer-header-side-video .video-container-cta {
    max-width: 100vw;
    min-width: 180px;
    aspect-ratio: 9/16;
  }
}
/* --- End Footer Video & Side Text --- */

/* Financial Services Showcase Section */
#financial-services {
    padding: 80px 0 60px;
    background-image: linear-gradient(135deg, var(--primary-color) 0%, #091320 100%);
    overflow: hidden;
    position: relative;
}

/* Add animated background elements */
#financial-services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(61, 190, 255, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(206, 138, 234, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(112, 231, 134, 0.03) 0%, transparent 40%);
    z-index: 0;
}

#financial-services .container {
    position: relative;
    z-index: 1;
}

#financial-services .section-header {
    margin-bottom: 50px;
    position: relative;
}

#financial-services .section-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3DBEFF, #CE8AEA);
    border-radius: 3px;
}

#financial-services .section-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: -5px auto 30px;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    padding-top: 25px;
}

/* Financial Services Grid - Modern Layout */
.financial-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 40px; /* Increased from 30px for better spacing between cards */
    margin-bottom: 40px; /* Increased from 30px */
    padding: 10px; /* Added padding around the entire grid */
}

/* Tablet layout */
@media (max-width: 991px) {
    .financial-services-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 40px; /* Increased from 30px */
        padding: 10px; /* Added padding */
    }
}

/* Mobile layout */
@media (max-width: 767px) {
    .financial-services-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 45px; /* Increased from 35px for better mobile separation */
        padding: 5px; /* Reduced padding for mobile */
    }
}

/* Financial Services Cards - Improved Flip Card Effect */
.financial-card {
    position: relative;
    min-height: 320px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    background: transparent; /* Ensure the card background is transparent */
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    min-height: 320px;
    border-radius: 16px; /* Match parent border radius */
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 14px;
    overflow: visible;
    box-sizing: border-box; /* Ensure padding is included in dimensions */
}

.card-front {
    padding: 30px 25px 25px 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    text-align: left;
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    height: auto;
    min-height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Add subtle border to create visual separation */
    box-sizing: border-box;
    margin: 0; /* Reset margin to ensure proper alignment */
}

/* Smart Money card (wider card spanning two columns) */
.financial-card.smart-money {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
}

/* Technical card (wider card spanning two columns) */
.financial-card.technical {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
}

/* Ensure wider cards have enough height for content */
@media (min-width: 992px) {
    .financial-card.smart-money,
    .financial-card.technical {
        min-height: 320px;
    }
    
    .financial-card.smart-money .card-inner,
    .financial-card.technical .card-inner {
        min-height: 320px;
    }
}

/* Add gradient border effect */
.financial-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, 
        rgba(61, 190, 255, 0.7), 
        rgba(206, 138, 234, 0.7), 
        rgba(112, 231, 134, 0.7));
    z-index: -1;
    border-radius: 17px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.financial-card:hover::before {
    opacity: 1;
}

/* Add gradient overlay on card back */
.card-back::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.7) 0%, 
        rgba(0, 0, 0, 0.4) 50%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.financial-card:hover .card-back::after {
    opacity: 1;
}

/* Add gradient finishes to each card type */
.financial-card.forex .card-front {
    background: linear-gradient(135deg, #091E34 0%, #1a3c64 100%);
}

.financial-card.options .card-front {
    background: linear-gradient(135deg, #6A1B9A 0%, #9c27b0 100%);
}

.financial-card.smart-money .card-front {
    background: linear-gradient(135deg, #1A1624 0%, #332747 100%);
}

.financial-card.technical .card-front {
    background: linear-gradient(135deg, #0D5243 0%, #16856d 100%);
}

.financial-card.equity .card-front {
    background: linear-gradient(135deg, #01726C 0%, #00bfb3 100%);
}

.financial-card.risk .card-front {
    background: linear-gradient(135deg, #8B3E05 0%, #c75e16 100%);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    min-height: 280px; /* Increased from 220px */
}

.financial-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 14px;
    overflow: hidden;
}

.card-front {
    padding: 30px 25px 25px 30px; /* Increased left padding from 25px to 30px */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    text-align: left;
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    height: auto;
    min-height: 100%;
}

@media (max-width: 767px) {
    .card-front {
        padding: 25px 20px 20px 25px; /* Increased left padding from 20px to 25px */
        height: auto;
        min-height: 100%;
    }
}

.card-back {
    transform: rotateY(180deg);
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 14px;
    overflow: hidden;
    background-color: #091E34; /* Fallback background color */
}

/* Critical fix for image display on back of cards */
.card-back img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    display: block; /* Ensure proper display */
}

.card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.5s ease;
}

.financial-card:hover .card-back img {
    transform: scale(1.1);
}

.financial-card h3 {
    position: relative;
    padding-bottom: 12px;
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.7px;
    font-size: 1.2rem;
    margin-bottom: 20px;
    margin-left: 2px; /* Added small left margin */
    color: var(--white);
    text-transform: uppercase;
}

.financial-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: currentColor;
    opacity: 0.8;
    border-radius: 3px;
}

.financial-card p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    margin-left: 2px; /* Added small left margin */
    line-height: 1.6;
    text-align: left;
    flex-grow: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Adjust BTC styling to match screenshot */
.crypto-pair {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.crypto-icon {
    width: 40px; /* Slightly larger */
    height: 40px; /* Slightly larger */
    margin-right: 15px; /* More spacing */
    background: transparent; /* Remove background */
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crypto-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.crypto-price {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.3px;
}

/* Chart bar adjustments to match screenshot */
.chart-mini {
    width: 100%;
    height: 50px; /* Taller */
    margin-top: 15px; /* More space above */
    position: relative;
    transition: opacity 0.3s ease;
}

.chart-bars {
    height: 100%;
    display: flex;
    align-items: flex-end;
    gap: 8px; /* Add gap between bars */
}

.chart-bars span {
    flex-grow: 1; /* Equal width bars */
    background-color: #3DBEFF;
    border-radius: 2px;
    box-shadow: none; /* Remove shadow */
}

/* Adjust card colors to match screenshot */
.financial-card.forex .card-front {
    background: #091E34; /* Darker blue */
}

.financial-card.options .card-front {
    background: #6A1B9A; /* Purple */
}

.financial-card.smart-money .card-front {
    background: #1A1624; /* Dark navy/purple */
}

.financial-card.technical .card-front {
    background: #0D5243; /* Dark teal */
}

.financial-card.equity .card-front {
    background: #01726C; /* Teal */
}

.financial-card.risk .card-front {
    background: #8B3E05; /* Brown */
}

/* Update button styling to match screenshot */
.btn-view {
    margin-top: auto;
    background: transparent;
    color: #fff;
    border: none; /* Remove border */
    padding: 0; /* Remove padding */
    border-radius: 0; /* Remove border radius */
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.btn-view i {
    display: none; /* Hide icon as per screenshot */
}

.btn-view:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

/* Card positioning for specific layouts */
.financial-card.forex {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.financial-card.options {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.financial-card.smart-money {
    grid-column: 3 / 5;
    grid-row: 1 / 2;
}

.financial-card.technical {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
}

.financial-card.equity {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.financial-card.risk {
    grid-column: 4 / 5;
    grid-row: 2 / 3;
}

/* Tablet layout */
@media (max-width: 991px) {
    .financial-services-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 30px; /* Increased from 20px to match original spacing */
    }
    
    .financial-card.forex {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
    
    .financial-card.options {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
    
    .financial-card.smart-money {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
    }
    
    .financial-card.technical {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
    }
    
    .financial-card.equity {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
    }
    
    .financial-card.risk {
        grid-column: 2 / 3;
        grid-row: 4 / 5;
    }
}

/* Mobile layout */
@media (max-width: 767px) {
    .financial-services-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 25px;
    }
    
    .financial-card {
        grid-column: 1 / 2 !important;
        min-height: 220px;
    }
    
    .financial-card.forex { grid-row: 1 / 2 !important; }
    .financial-card.options { grid-row: 2 / 3 !important; }
    .financial-card.smart-money { grid-row: 3 / 4 !important; }
    .financial-card.technical { grid-row: 4 / 5 !important; }
    .financial-card.equity { grid-row: 5 / 6 !important; }
    .financial-card.risk { grid-row: 6 / 7 !important; }
    
    .card-inner {
        min-height: 220px;
    }
}

/* Candlestick chart for Forex & Crypto card */
.candlestick-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    gap: 5px;
    position: relative;
}

.candle-stick {
    flex: 1;
    position: relative;
    border-radius: 2px;
    transition: height 0.5s ease;
}

.candle-stick.up {
    background-color: #43A047;
    height: 60%;
}

.candle-stick.down {
    background-color: #E53935;
    height: 40%;
}

.candle-stick .wick {
    position: absolute;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.8);
    left: 50%;
    transform: translateX(-50%);
}

.candle-stick.up .wick {
    bottom: 100%;
    height: 10px;
}

.candle-stick.down .wick {
    top: 100%;
    height: 8px;
}

/* Add animation to make candlesticks more lively */
.candle-stick:nth-child(1) { animation: candle-pulse 3s infinite; animation-delay: 0.1s; }
.candle-stick:nth-child(2) { animation: candle-pulse 3s infinite; animation-delay: 0.7s; }
.candle-stick:nth-child(3) { animation: candle-pulse 3s infinite; animation-delay: 1.3s; }
.candle-stick:nth-child(4) { animation: candle-pulse 3s infinite; animation-delay: 1.9s; }
.candle-stick:nth-child(5) { animation: candle-pulse 3s infinite; animation-delay: 0.3s; }
.candle-stick:nth-child(6) { animation: candle-pulse 3s infinite; animation-delay: 0.9s; }
.candle-stick:nth-child(7) { animation: candle-pulse 3s infinite; animation-delay: 1.5s; }
.candle-stick:nth-child(8) { animation: candle-pulse 3s infinite; animation-delay: 2.1s; }

@keyframes candle-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Services Section - Mobile First */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.25);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    position: relative;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.service-card h3 i {
    margin-right: 10px;
    color: var(--accent-color);
}

.service-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Footer and Contact - Mobile First */
footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 4rem 0 2rem;
    position: relative;
    width: 100%;
    margin-bottom: 0;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
}

/* New Footer Styles (2025 Redesign) */
#contact {
    position: relative;
    padding: 0;
    margin-top: 70px;
    background: linear-gradient(135deg, #0b1a2c 0%, #162b47 100%);
    color: var(--white);
    overflow: hidden;
}

.footer-wave {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.footer-wave svg {
    position: relative;
    display: block;
    width: 100%;
    height: 100px;
}

.footer-content {
    position: relative;
    z-index: 2;
    padding: 70px 0 30px;
}

.footer-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.footer-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    display: inline-block;
}

.footer-header h2::after {
    display: none;
}

.footer-header span {
    color: var(--secondary-color);
}

.footer-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-outline-light {
    background-color: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.footer-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

/* Brand Column */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    display: block;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 70px;
    width: auto;
}

.footer-tagline {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-about {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 400px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-links a:hover {
    transform: translateY(-5px);
}

.social-links a:hover:nth-child(1) {
    background: #C13584;
    box-shadow: 0 5px 15px rgba(193, 53, 132, 0.4);
}

.social-links a:hover:nth-child(2) {
    background: #25D366;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.social-links a:hover:nth-child(3) {
    background: #D44638;
    box-shadow: 0 5px 15px rgba(212, 70, 56, 0.4);
}

.social-links a:hover:nth-child(4) {
    background: #0077B5;
    box-shadow: 0 5px 15px rgba(0, 119, 181, 0.4);
}

.social-links a:hover:nth-child(5) {
    background: #1DA1F2;
    box-shadow: 0 5px 15px rgba(29, 161, 242, 0.4);
}

/* Links Columns */
.footer-links-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
}

.footer-links-group h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
    display: inline-block;
}

.footer-links-group h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.footer-links a:hover {
    color: var(--secondary-color);
    text-decoration: none;
    padding-left: 5px;
}

/* Contact Info Bar */
.contact-info-horizontal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.contact-item:hover i {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.contact-item div {
    display: flex;
    flex-direction: column;
}

.contact-item span {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.contact-item a {
    color: var(--white);
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    gap: 15px;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-credits {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-credits i {
    color: #ff6b6b;
    margin: 0 3px;
}

.footer-credits a {
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.footer-credits a:hover {
    color: var(--white);
}

/* Responsive Footer */
@media (min-width: 768px) {
    .footer-links-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 992px) {
    .footer-main-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 30px;
    }
    
    .footer-brand,
    .footer-links-container {
        text-align: left;
    }
    
    .footer-links-container {
        justify-self: center;
    }
    
    .footer-brand {
        align-items: flex-start;
    }
    
    .social-links {
        justify-content: flex-start;
    }
    
    .footer-links-group h4::after {
        left: 0;
        transform: none;
    }
    
    .footer-links-group h4 {
        text-align: left;
    }
    
    .contact-info-horizontal {
        justify-content: space-between;
    }
}

/* Form Styling - Clean Minimal Design */
.footer-contact-form {
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

.footer-contact-form h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
    display: inline-block;
}

.footer-contact-form h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
}

.form-group {
    margin-bottom: 15px;
    width: 100%;
}

/* Clean form element styling */
.footer-contact-form input,
.footer-contact-form textarea,
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.footer-contact-form input:focus,
.footer-contact-form textarea:focus,
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.footer-contact-form textarea,
.contact-form textarea {
    resize: none;
    min-height: 120px;
}

.footer-contact-form ::placeholder,
.contact-form ::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.recaptcha-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn i {
    transition: transform 0.3s ease;
}

.submit-btn:hover {
    background: #f0cb58;
    transform: translateY(-3px);
}

.submit-btn:hover i {
    transform: translateX(5px);
}

/* Simple responsive design without conflicting rules */
@media (min-width: 768px) {
    .footer-contact-form {
        max-width: 90%;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    .footer-contact-form {
        max-width: 450px;
        text-align: left;
    }
    
    .footer-contact-form h4 {
        text-align: left;
    }
    
    .footer-contact-form h4::after {
        left: 0;
        transform: none;
    }
}

/* Utility Classes */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }

.bg-primary { background-color: var(--primary-color); color: var(--white); }
.bg-secondary { background-color: var(--secondary-color); color: var(--white); }
.bg-accent { background-color: var(--accent-color); color: var(--white); }

/* Animations */
@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.animate-left { animation: slideInLeft 1s ease-out forwards; }
.animate-right { animation: slideInRight 1s ease-out forwards; }
.animate-up { animation: slideInUp 1s ease-out forwards; }

/* Fancybox Styling */
.fancybox__container {
    --fancybox-bg: rgba(24, 24, 27, 0.93);
    z-index: 1100;
}

.fancybox__backdrop {
    background-color: rgba(0, 0, 0, 0.9);
}

.fancybox__content {
    padding: 0;
}

.fancybox__slide {
    padding: 20px;
}

.fancybox__caption {
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 16px;
}

.fancybox-content img {
    display: block !important;
    max-width: 90% !important;
    max-height: 80vh !important;
    margin: 0 auto !important;
}

@keyframes fancybox-zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fancybox-zoomOut {
    to { opacity: 0; transform: scale(0.95); }
}

.fancybox-zoomIn {
    animation: fancybox-zoomIn .2s ease-out;
}

.fancybox-zoomOut {
    animation: fancybox-zoomOut .15s ease-in forwards;
}

/* Media Queries for Tablets */
@media (min-width: 576px) {
    html {
        font-size: 16px;
    }
      .hero h1 {
        font-size: 3.2rem;
    }
    
    .hero p.tagline {
        font-size: 1.3rem;
    }
    
    .hero p.institute-name {
        font-size: 1.1rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        gap: 2.5rem;
    }
    
    .founder-image {
        width: 240px;
        height: 240px;
    }
}

/* Media Queries for Medium Tablets */
@media (min-width: 768px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .container {
        width: 85%;
    }
    
    section {
        padding: 80px 0;
    }
    
    .philosophy-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-sections-wrapper {
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-right-section {
        order: unset;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* Media Queries for Desktop */
@media (min-width: 992px) {
    html {
        font-size: 17px;
    }
    
    header {
        background-color: transparent;
        padding: 10px 0;
    }
    
    header.scrolled {
        background-color: var(--primary-color);
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
        padding: 5px 0;
    }
    
    .logo img {
        height: 75px; /* Increased from 60px */
    }
    
    header.scrolled .logo img {
        height: 60px; /* Increased from 50px */
    }
    
    /* Hide mobile menu button completely on desktop */
    .mobile-menu-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        pointer-events: none !important;
    }
    
    /* Ensure nav links are properly displayed on desktop */
    .nav-links {
        position: static !important;
        display: flex !important;
        flex-direction: row !important;
        background: transparent !important;
        box-shadow: none !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        max-width: none !important;
        right: auto !important;
    }
    
    .nav-links li {
        margin: 0 0 0 2.5rem !important;
        opacity: 1 !important;
        transform: none !important;
        width: auto !important;
        text-align: left !important;
    }
    
    .nav-links a {
        font-size: 1rem;
    }
      .hero h1 {
        font-size: 4.5rem;
    }
    
    .hero p.tagline {
        font-size: 1.8rem;
    }
    
    .hero p.institute-name {
        font-size: 1.4rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .section-header {
        margin-bottom: 60px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-right-section {
        grid-template-columns: 1fr;
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Media Queries for Large Desktop */
@media (min-width: 1200px) {
    html {
        font-size: 18px;
    }
    
    .hero-content {
        max-width: 1000px;
    }
    
    .footer-content {
        gap: 3rem;
    }
}

/* WhatsApp QR Code Styles */
.whatsapp-qr-code {
    text-align: center;
    margin: 30px auto;
    max-width: 180px;
}

.whatsapp-image {
    width: 50%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.whatsapp-image:hover {
    transform: scale(1.05);
}

@media (max-width: 767px) {
    .whatsapp-qr-code {
        max-width: 50px;
        margin: 20px auto;
    }
}

/* --- Footer Brand Row: Logo & WhatsApp QR side by side --- */
.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
}
.footer-logo {
  display: flex;
  align-items: center;
}
.whatsapp-qr-code {
  margin: 0;
  max-width: 70px;
}
.whatsapp-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}
@media (max-width: 575px) {
  .footer-brand-row {
    flex-direction: column;
    gap: 10px;
  }
  .whatsapp-qr-code {
    max-width: 50px;
  }
}

/* --- Founder Title Centering & Certificate Overflow Fix (Override) --- */
.founder-profile h3 {
    text-align: center !important;
    margin-bottom: 15px !important;
    font-size: 1.6rem !important;
}
.certificates-container {
    margin-top: 20px !important;
    padding-top: 15px !important;
    width: 100% !important;
}
.certificates {
    gap: 15px !important;
    padding: 5px 0 !important;
    width: 100% !important;
}
.certificate {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 6px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
}
.certificate img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}
/* --- End Founder/Certificate Fix --- */

/* --- Footer Header Side Row: Text and Video Side by Side --- */
.footer-header-side-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 18px 0 32px 0;
  flex-wrap: wrap;
}
.footer-header-side-text {
  flex: 1 1 180px;
  min-width: 120px;
  max-width: 260px;
  font-size: 1rem;
  color: var(--white);
  text-align: left;
}
.footer-header-side-video {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 260px;
}
.footer-header-side-video .video-container-cta {
  max-width: 240px;
  margin: 0;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}
.footer-header-side-video .video-container-cta iframe {
  border-radius: 10px;
}
@media (max-width: 700px) {
  .footer-header-side-row {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .footer-header-side-text, .footer-header-side-video {
    max-width: 100%;
    min-width: 0;
    text-align: center;
  }
  .footer-header-side-video .video-container-cta {
    max-width: 100%;
  }
}

/* --- Floating Pop Button & Modal Form (Modern UI Update) --- */
.pop-form-modal {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 1300;
  right: 0;
  bottom: 0;
  /* width: 100vw; */
  /* height: 100vh; */
  /* background: rgba(0,0,0,0.45); */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pop-form-modal.active {
  opacity: 1;
}

.pop-form-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1200;
  background: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  box-shadow: 0 8px 32px rgba(22,160,134,0.18), 0 2px 8px rgba(0,0,0,0.10);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: popBtnPulse 2.5s infinite;
  outline: none;
}

.pop-form-btn .pop-form-cta-label {
  position: absolute;
  right: 70px;
  background: var(--primary-color);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.pop-form-btn:hover {
  transform: scale(1.1);
  background: var(--accent-color);
  color: var(--white);
}

.pop-form-btn:hover .pop-form-cta-label {
  opacity: 1;
  transform: translateX(0);
}

@keyframes popBtnPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(22,160,134,0.18), 0 2px 8px rgba(0,0,0,0.10); }
  50% { box-shadow: 0 12px 40px rgba(22,160,134,0.28), 0 4px 16px rgba(0,0,0,0.15); }
}

.pop-form-thankyou {
  text-align: center;
  padding: 20px 0;
}

.pop-form-thankyou h4 {
  font-size: 1.4rem;
  color: var(--accent-color);
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .pop-form-btn {
    bottom: 18px;
    right: 18px;
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  .pop-form-btn .pop-form-cta-label {
    display: none;
  }
}
/* --- End Floating Pop Button & Modal Form (Modern UI Update) --- */

/* --- Pop Form Modal Styling --- */
.pop-form-modal-content {
  background-color: var(--white);
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  padding: 25px 20px;
  position: relative;
  box-shadow: 0 5px 25px rgba(0,0,0,0.25);
  transform: translate(100%, 100%); /* Changed from translateY(30px) to come from bottom right */
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Added easing for smoother animation */
  color: var(--dark-text);
  max-height: 90vh;
  overflow-y: auto;
  word-break: break-word;
  box-sizing: border-box;
}

.pop-form-modal.active .pop-form-modal-content {
  transform: translate(0, 0); /* Keep centered when active */
}

.pop-form-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
}

.pop-form-close:hover {
  color: var(--primary-color);
}

.pop-form-modal-content h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 10px;
  font-weight: 700;
}

.pop-form-fields {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 100%;
  overflow: visible;
}

.pop-form-fields label {
  font-size: 0.9rem;
  color: var(--dark-text);
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
  word-break: break-word;
  max-width: 100%;
}

.pop-form-fields input,
.pop-form-fields select {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background-color: #f8f8f8;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}

.pop-form-fields input:focus,
.pop-form-fields select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(22, 160, 134, 0.2);
  outline: none;
  background-color: #fff;
}

.pop-form-submit {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
  margin-top: 10px;
  width: 100%;
}

.pop-form-submit:hover {
  background-color: var(--accent-color);
  color: var(--white);
  transform: translateY(-2px);
}

.pop-form-thankyou p {
  font-size: 1rem;
  color: var(--dark-text);
  line-height: 1.5;
}

@media (max-width: 500px) {
  .pop-form-modal-content {
    max-width: 98vw;
    padding: 16px 6px;
    font-size: 0.97rem;
  }
  
  .pop-form-fields input,
  .pop-form-fields select {
    font-size: 0.95rem;
    padding: 10px 8px;
  }
  
  .pop-form-fields label {
    font-size: 0.92rem;
  }
  
  .pop-form-submit {
    padding: 12px;
  }
}
/* --- End Pop Form Modal Styling --- */