/* Modern Commerce Tuition CSS - Improved Responsive Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Color Variables - Original Colors Maintained */
:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3a0ca3;
    --secondary: #f72585;
    --text-dark: #2b2d42;
    --text-light: #6c757d;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-3d: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-3d: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Enhanced Header */
.header-3d {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-3d);
}

.header-3d.sticky {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header-3d .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-3d {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: var(--transition-3d);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

.logo-3d:hover {
    transform: rotateY(20deg) rotateX(10deg);
    box-shadow: 0 15px 30px rgba(67, 97, 238, 0.4);
}

.logo-3d i {
    font-size: 2.4rem;
    color: var(--text-white);
}

.logo span {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

/* Navigation */
.menu {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-link-3d {
    position: relative;
    padding: 1rem 2rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: 1rem;
    transition: var(--transition-3d);
    transform-style: preserve-3d;
    touch-action: manipulation;
}

.nav-link-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 1rem;
    opacity: 0;
    transform: scale(0.8) translateZ(-10px);
    transition: var(--transition-3d);
    z-index: -1;
}

.nav-link-3d:hover {
    color: var(--text-white);
    transform: translateY(-3px) translateZ(10px);
}

.nav-link-3d:hover::before {
    opacity: 1;
    transform: scale(1) translateZ(-10px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.4rem;
    z-index: 1001;
    width: 3rem;
    height: 2.5rem;
    justify-content: space-between;
}

.mobile-menu-btn span {
    width: 100%;
    height: 0.3rem;
    background: var(--primary);
    border-radius: 0.2rem;
    transition: var(--transition);
    transform-origin: center;
}

/* Hero Section with Better Responsive */
.hero-modern {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 12rem 0 8rem;
    overflow: hidden;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    padding: 0 2rem;
}

/* Left Side - Content */
.hero-content-left {
    z-index: 2;
}

.hero-title-3d {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.title-line {
    display: block;
    transform: translateY(100px);
    opacity: 0;
    animation: slideInUp 1s ease-out forwards;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 4rem;
    max-width: 50rem;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease-out 0.4s forwards;
}

.hero-buttons {
    display: flex;
    gap: 2rem;
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease-out 0.6s forwards;
}

/* 3D Buttons */
.btn-3d {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 3rem;
    border-radius: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-3d);
    position: relative;
    transform-style: preserve-3d;
    overflow: hidden;
    font-size: 1.6rem;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-3d.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.3);
}

.btn-3d.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-3d:hover {
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 20px 40px rgba(67, 97, 238, 0.4);
}

.btn-3d.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 4rem;
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease-out 0.8s forwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.4rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

/* Right Side - Visual Elements */
.hero-visual-right {
    position: relative;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* 3D elements hidden */
.floating-book, .geometric-shape, .floating-symbol, .hero-3d-scene {
    display: none;
}

/* Background Elements */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(58, 12, 163, 0.05) 100%);
    animation: pulse 8s ease-in-out infinite;
}

.circle-1 {
    width: 30rem;
    height: 30rem;
    top: -15rem;
    right: -15rem;
    animation-delay: 0s;
}

.circle-2 {
    width: 20rem;
    height: 20rem;
    bottom: -10rem;
    left: -10rem;
    animation-delay: 2s;
}

.circle-3 {
    width: 25rem;
    height: 25rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

/* Subjects Section */
.subjects-3d {
    padding: 10rem 0;
    background: var(--bg-white);
    position: relative;
    overflow-x:hidden;
}

.subjects-3d::before {
    content: '';
    position: absolute;
    width: 40rem;
    height: 40rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.03) 0%, rgba(58, 12, 163, 0.03) 100%);
    border-radius: 50%;
    top: -20rem;
    right: -20rem;
    z-index: 0;
}

.section-title {
    text-align: center;
    margin-bottom: 8rem;
}

.title-3d {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.section-title p {
    font-size: 1.8rem;
    color: var(--text-light);
    max-width: 60rem;
    margin: 0 auto;
}

.subjects-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    position: relative;
    z-index: 1;
}

/* 3D Flip Cards for Subjects */
.subject-card-3d {
    height: 35rem;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: var(--transition-3d);
}

.subject-card-3d:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: var(--shadow-3d);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-front {
    background: var(--bg-white);
}

.card-back {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    transform: rotateY(180deg);
}

.subject-icon-3d {
    width: 10rem;
    height: 10rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(58, 12, 163, 0.1) 100%);
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: var(--transition-3d);
}

.subject-icon-3d i {
    font-size: 4rem;
    color: var(--primary);
    transition: var(--transition-3d);
}

.card-front h3 {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.card-front p {
    color: var(--text-light);
    text-align: center;
    line-height: 1.7;
}

.card-back h4 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.card-back ul {
    list-style: none;
    text-align: center;
}

.card-back li {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    opacity: 0.9;
}

.card-back li::before {
    content: '✓';
    margin-right: 1rem;
    color: var(--secondary);
    font-weight: bold;
}

/* Results Section */
.results-3d {
    padding: 10rem 0;
    background: var(--bg-light);
    position: relative;
}

.results-navigation-3d {
    margin-bottom: 6rem;
}

.year-tabs-3d {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    list-style: none;
}

.year-tab-3d {
    padding: 1.5rem 3rem;
    background: var(--bg-white);
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-3d);
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    touch-action: manipulation;
}

.year-tab-3d:hover {
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: var(--shadow-3d);
}

.year-tab-3d.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
}

.results-container-3d {
    position: relative;
}

.year-results {
    display: none;
}

.year-results.active {
    display: block;
}

.students-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

/* Student Cards */
.student-card-3d {
    background: var(--bg-white);
    border-radius: 2rem;
    padding: 3rem;
    position: relative;
    cursor: pointer;
    transition: var(--transition-3d);
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    overflow: hidden;
}

.student-card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.5rem;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: var(--transition);
    transform: scaleX(0);
    transform-origin: left;
}

.student-card-3d:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--shadow-3d);
}

.student-card-3d:hover::before {
    transform: scaleX(1);
}

.rank-badge {
    position: absolute;
    top: -1rem;
    right: 2rem;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 700;
    font-size: 1.4rem;
    box-shadow: 0 5px 15px rgba(247, 37, 133, 0.3);
}

.rank-1 .rank-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: var(--text-dark);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.rank-2 .rank-badge {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: var(--text-dark);
    box-shadow: 0 5px 15px rgba(192, 192, 192, 0.4);
}

.rank-3 .rank-badge {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
    color: var(--text-white);
    box-shadow: 0 5px 15px rgba(205, 127, 50, 0.4);
}

.student-info h4 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.percentage {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

.subjects-mini {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.subjects-mini span {
    padding: 0.5rem 1rem;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 0.8rem;
    font-size: 1.2rem;
    color: var(--primary);
}

/* Reviews Section */
.reviews-3d {
    padding: 10rem 0;
    background: var(--bg-white);
}

.reviews-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 4rem;
}

.review-card-3d {
    background: var(--bg-white);
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: var(--shadow);
    transition: var(--transition-3d);
    position: relative;
    transform-style: preserve-3d;
}

.review-card-3d:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--shadow-3d);
}

.quote-icon {
    position: absolute;
    top: -1rem;
    left: 3rem;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.6rem;
}

.review-content {
    margin-bottom: 3rem;
}

.review-content p {
    font-size: 1.6rem;
    line-height: 1.8;
    color: var(--text-dark);
    font-style: italic;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.author-avatar {
    width: 6rem;
    height: 6rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(58, 12, 163, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

.author-info h4 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.author-info p {
    color: var(--text-light);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.rating {
    color: #ffd700;
}

.rating i {
    margin-right: 0.3rem;
}

/* Contact Section - Only Information */
.contact-3d {
    padding: 10rem 0;
    background: var(--bg-light);
}

.contact-info-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.info-card-3d {
    background: var(--bg-white);
    padding: 4rem 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition-3d);
    transform-style: preserve-3d;
    text-align: center;
}

.info-card-3d:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: var(--shadow-3d);
}

.info-icon {
    width: 8rem;
    height: 8rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--text-white);
    font-size: 3rem;
}

.info-card-3d h3 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.info-card-3d p {
    color: var(--text-light);
    font-size: 1.6rem;
    line-height: 1.6;
}

/* Footer */
.footer-3d {
    background: linear-gradient(135deg, var(--text-dark) 0%, #1a1a2e 100%);
    color: var(--text-white);
    padding: 8rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.footer-3d::before {
    content: '';
    position: absolute;
    width: 50rem;
    height: 50rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 50%;
    top: -25rem;
    right: -25rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 5rem;
    margin-bottom: 5rem;
    position: relative;
    z-index: 1;
    text-align: left; /* सभी फुटर कंटेंट लेफ्ट अलाइन */
}

.footer-logo h3 {
    font-size: 2.4rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    max-width: 30rem;
}

.footer-links h3,
.footer-social h3 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    font-weight: 600;
    position: relative;
}

.footer-links h3::after,
.footer-social h3::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
    bottom: -1rem;
    left: 0; /* लेफ्ट अलाइन */
    transform: none; /* ट्रांसफॉर्म हटाया */
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 1.5rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-links ul li a:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

.social-icons-3d {
    display: flex;
    gap: 2rem;
    justify-content: flex-start; /* लेफ्ट अलाइन */
}

.social-link-3d {
    width: 5rem;
    height: 5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 2rem;
    transition: var(--transition-3d);
    transform-style: preserve-3d;
    text-decoration: none;
    touch-action: manipulation;
}

.social-link-3d:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
}

/* Back to Top Button */
.back-to-top-3d {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 6rem;
    height: 6rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    text-decoration: none;
    transition: var(--transition-3d);
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.3);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top-3d.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top-3d:hover {
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 15px 40px rgba(67, 97, 238, 0.4);
}

/* Result Popup */
.result-popup-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.result-popup-3d.active {
    opacity: 1;
    visibility: visible;
}

.popup-content-3d {
    background: var(--bg-white);
    border-radius: 2rem;
    width: 90%;
    max-width: 70rem;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-3d);
    transform: scale(0.8);
    transition: var(--transition-3d);
}

.result-popup-3d.active .popup-content-3d {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 4rem;
    height: 4rem;
    background: var(--secondary);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}

.popup-close:hover {
    transform: rotate(90deg);
}

.popup-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: 3rem;
    border-radius: 2rem 2rem 0 0;
}

.popup-header h3 {
    font-size: 2.4rem;
    font-weight: 600;
}

.popup-body {
    padding: 3rem;
}

.popup-footer {
    padding: 2rem 3rem 3rem;
    text-align: center;
    border-top: 1px solid #eee;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotateX(0) rotateY(0);
    }
    25% {
        transform: translateY(-20px) rotateX(10deg) rotateY(5deg);
    }
    50% {
        transform: translateY(-10px) rotateX(-5deg) rotateY(-10deg);
    }
    75% {
        transform: translateY(-15px) rotateX(5deg) rotateY(15deg);
    }
}

@keyframes rotate3d {
    0% {
        transform: rotateX(0) rotateY(0) rotateZ(0);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

@keyframes floatSymbol {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.7;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 1400px) {
    .hero-container {
        gap: 5rem;
    }
    
    .hero-title-3d {
        font-size: 5rem;
    }
    
    .hero-visual-right {
        height: 55rem;
    }
    
    .floating-book {
        transform: scale(0.95);
    }
}

@media (max-width: 1200px) {
    html {
        font-size: 58%;
    }

    .hero-container {
        gap: 4rem;
    }

    .container {
        width: 95%;
        padding: 0 2rem;
    }
    
    .hero-title-3d {
        font-size: 4.5rem;
    }
    
    .hero-visual-right {
        height: 50rem;
    }
    
    .floating-book {
        transform: scale(0.9);
    }
    
    /* 3D elements scale and position adjustment */
    .book-1 {
        top: 15%;
        left: 15%;
    }
    
    .book-2 {
        top: 35%;
        right: 15%;
    }
    
    .book-3 {
        bottom: 25%;
        left: 15%;
    }
    
    .geometric-shape {
        transform: scale(0.9);
    }
    
    .subject-card-3d {
        height: 32rem;
    }
}

@media (max-width: 992px) {
    html {
        font-size: 55%;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
        margin-top:30px;
    }

    .hero-content-left {
        order: 0;
    }

    .hero-visual-right {
        order: 0;
        margin: 0 auto;
        max-width: 100%;
        padding: 0 2rem;
    }
    
    .hero-image {
        max-width: 100%;
        height: auto;
    }

    .hero-stats {
        justify-content: center;
        gap: 3rem;
    }

    .subjects-grid-3d {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 3rem;
    }

    .students-grid-3d {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2.5rem;
    }

    .contact-info-3d {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: left;
    }
    
    .footer-links, .footer-social, .footer-logo {
        text-align: left;
    }
    
    .social-icons-3d {
        justify-content: flex-start;
    }
    
    /* Better rotation for 3D cards */
    .subject-card-3d:hover .card-inner {
        transform: rotateY(170deg);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 52%;
    }

    .header-3d .container {
        padding: 0 2rem;
    }

    .menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 8rem 2rem 2rem;
        box-shadow: var(--shadow);
        transition: var(--transition);
        z-index: 999;
        justify-content: flex-start;
        align-items: center;
    }

    .menu.active {
        right: 0;
    }

    .menu li {
        margin: 1.5rem 0;
        width: 100%;
        text-align: center;
    }
    
    .menu li a {
        display: block;
        padding: 1.2rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero-modern {
        padding: 10rem 0 6rem;
    }

    .hero-title-3d {
        font-size: 3.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .btn-3d {
        width: 100%;
        max-width: 30rem;
        justify-content: center;
    }

    .hero-stats {
        gap: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-item {
        width: 45%;
    }
    
    /* Better touch interaction for 3D cards */
    .subject-card-3d {
        height: 30rem;
    }
    
    .subject-card-3d .card-inner {
        transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    .reviews-grid-3d,
    .subjects-grid-3d,
    .students-grid-3d,
    .contact-info-3d {
        gap: 2.5rem;
    }

    .year-tabs-3d {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .year-tab-3d {
        padding: 1.2rem 2.5rem;
        font-size: 1.5rem;
        flex: 1 1 auto;
        min-width: 10rem;
        text-align: center;
    }
    
    .review-author {
        flex-direction: column;
        text-align: center;
    }
    
    .author-info {
        text-align: center;
    }
    
    .rating {
        justify-content: center;
        display: flex;
    }
    
    .back-to-top-3d {
        width: 5rem;
        height: 5rem;
        bottom: 2rem;
        right: 2rem;
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 50%;
    }

    .container {
        width: 100%;
        padding: 0 2rem;
    }

    .hero-modern {
        padding: 8rem 0 5rem;
    }

    .hero-title-3d {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.6rem;
    }

    .subjects-grid-3d,
    .students-grid-3d,
    .reviews-grid-3d {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info-3d {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: left;
    }

    .social-icons-3d {
        gap: 1.5rem;
    }
    
    .social-link-3d {
        width: 4.5rem;
        height: 4.5rem;
    }

    .popup-content-3d {
        width: 95%;
        max-height: 90vh;
    }

    .popup-header,
    .popup-body {
        padding: 2rem;
    }

    .popup-footer {
        padding: 1.5rem 2rem 2rem;
    }
    
    .section-title h2 {
        font-size: 2.8rem;
    }
    
    .section-title p {
        font-size: 1.6rem;
    }
    
    .subject-card-3d {
        height: auto;
        min-height: 30rem;
    }
    
    .year-tabs-3d {
        gap: 1rem;
    }
    
    .year-tab-3d {
        padding: 1rem 1.5rem;
        font-size: 1.4rem;
        min-width: auto;
    }
    
    .review-card-3d,
    .info-card-3d {
        padding: 2.5rem 2rem;
    }
    
    .back-to-top-3d {
        width: 4.5rem;
        height: 4.5rem;
        right: 2rem;
        bottom: 2rem;
    }
}

@media (max-width: 400px) {
    .hero-title-3d {
        font-size: 10vw;
        
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-item {
        width: 45%;
    }

    .year-tabs-3d {
        gap: 0.8rem;
    }

    .year-tab-3d {
        padding: 0.8rem 1.2rem;
        font-size: 1.3rem;
    }
    
    /* Better mobile layout for 3D elements */
    .floating-book {
        transform: scale(0.55);
    }
    
    .book-1 {
        top: 5%;
        left: 5%;
    }
    
    .book-2 {
        top: 35%;
        right: 5%;
    }
    
    .book-3 {
        bottom: 5%;
        left: 25%;
    }
    
    .geometric-shape {
        transform: scale(0.5);
    }
    
    .subjects-grid-3d,
    .students-grid-3d,
    .reviews-grid-3d,
    .contact-info-3d,
    .footer-content {
        gap: 2rem;
    }
    
    .social-icons-3d {
        gap: 1rem;
    }
    
    .logo span {
        font-size: 1.6rem;
    }
    
    .logo-3d {
        width: 4.5rem;
        height: 4.5rem;
    }
    
    .info-icon {
        width: 6rem;
        height: 6rem;
        font-size: 2.5rem;
    }
    
    .popup-content-3d {
        width: 95%;
    }
}

/* मोबाइल फिक्स */
@media (max-width: 480px) {
    html {
        font-size: 50%;
    }
    
    .header-3d .container {
        padding: 0 2rem;
    }
    
    .logo-3d {
        width: 4rem;
        height: 4rem;
    }
    
    .logo span {
        font-size: 1.6rem;
    }
    
    .hero-title-3d {
        font-size: 10vw;
    }
    
    .hero-description {
        font-size: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .hero-buttons {
        margin-bottom: 3rem;
    }
    
    .stat-item {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .section-title h2 {
        font-size: 2.5rem;
    }
    
    .section-title p {
        font-size: 1.4rem;
    }
    
    .subjects-grid-3d,
    .students-grid-3d,
    .reviews-grid-3d,
    .contact-info-3d {
        gap: 2rem;
    }
    
    .review-card-3d,
    .info-card-3d {
        padding: 2rem 1.5rem;
    }
    
    .author-avatar {
        width: 5rem;
        height: 5rem;
    }
    
    .footer-content {
        gap: 2.5rem;
    }
    
    .footer-links h3, 
    .footer-social h3 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .footer-links ul li {
        margin-bottom: 1rem;
    }
    
    .social-icons-3d {
        gap: 1rem;
    }
    
    .social-link-3d {
        width: 4rem;
        height: 4rem;
    }
}

/* मोबाइल फिक्स */
@media (max-width: 480px) {
    html {
        font-size: 50%;
    }
    
    .header-3d .container {
        padding: 0 2rem;
        
    }
    
    .logo-3d {
        width: 4rem;
        height: 4rem;
    }
    
    .logo span {
        font-size: 1.6rem;
    }
    
    .hero-title-3d {
        font-size: 10vw;
        padding-inline:5px;
    }
    
    .hero-description {
        font-size: 4vw;
        margin-bottom: 3rem;
        text-align:center;
        padding-inline:10px;
    }
    
    .hero-buttons {
        margin-bottom: 3rem;
    }
    
    .stat-item {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .section-title h2 {
        font-size: 2.5rem;
    }
    
    .section-title p {
        font-size: 1.4rem;
    }
    
    .subjects-grid-3d,
    .students-grid-3d,
    .reviews-grid-3d,
    .contact-info-3d {
        gap: 2rem;
    }
    
    .review-card-3d,
    .info-card-3d {
        padding: 2rem 1.5rem;
    }
    
    .author-avatar {
        width: 5rem;
        height: 5rem;
    }
    
    .footer-content {
        gap: 2.5rem;
    }
    
    .footer-links h3, 
    .footer-social h3 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .footer-links ul li {
        margin-bottom: 1rem;
    }
    
    .social-icons-3d {
        gap: 1rem;
    }
    
    .social-link-3d {
        width: 4rem;
        height: 4rem;
    }
}

/* Add touch-friendly improvements */
@media (hover: none) {
    .nav-link-3d:hover {
        transform: translateY(-2px);
    }
    
    .nav-link-3d:active {
        color: var(--text-white);
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    }
    
    .btn-3d:hover {
        transform: translateY(-3px);
    }
    
    .btn-3d:active {
        transform: translateY(0);
    }
    
    .subject-card-3d .card-inner {
        transform: rotateY(0deg);
    }
    
    .subject-card-3d:hover .card-inner {
        transform: rotateY(170deg);
    }
    
    .subject-card-3d:active .card-inner {
        transform: rotateY(180deg);
    }
    
    .review-card-3d:hover,
    .info-card-3d:hover,
    .social-link-3d:hover {
        transform: translateY(-5px);
    }
}

/* Fix for Safari */
@supports (-webkit-touch-callout: none) {
    .hero-modern {
        min-height: -webkit-fill-available;
    }
}

/* High-density screens optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .shadow-3d {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    }
}

/* Optimize images and heavy elements */
img, video {
    max-width: 100%;
    height: auto;
}

/* Improve form elements on mobile */
input, select, textarea, button {
    font-size: 16px; /* Prevents zoom on focus in iOS */
}