/* Custom CSS for X Center New Design */
:root {
    --primary-color: #3498db;
    --secondary-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --physics-color: #3498db;
    --chemistry-color: #e74c3c;
    --gradient: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

/* Global Styles */
body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark-color);
    background-color: #f8f9fa;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
}

.section-padding {
    padding: 80px 0;
}

.divider {
    width: 80px;
    height: 4px;
    background: var(--gradient);
    margin: 0 auto;
}

/* Navbar Styles */
.navbar {
    background-color: rgba(44, 62, 80, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.x-logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.center-logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--light-color);
}

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: var(--gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.x-highlight {
    color: var(--secondary-color);
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.x-highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-weight: 500;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    padding: 10px 30px;
    font-weight: 500;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--dark-color);
    transform: translateY(-3px);
}

/* 3D X Cube */
.x-cubed-3d {
    width: 200px;
    height: 200px;
    perspective: 1000px;
    margin: 0 auto;
}

.x-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 20s infinite linear;
}

.face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(231, 76, 60, 0.8);
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 100px;
    font-weight: 800;
    color: white;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.cube-face-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.front { transform: translateZ(100px); }
.back { transform: rotateY(180deg) translateZ(100px); }
.right { transform: rotateY(90deg) translateZ(100px); }
.left { transform: rotateY(-90deg) translateZ(100px); }
.top { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotate {
    0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* Subjects Section */
.subjects-section {
    background-color: #f8f9fa;
    position: relative;
}

.x-center-connector {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.x-center-node {
    background: var(--gradient);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.x-center-node::after {
    content: '';
    position: absolute;
    top: 60px;
    left: 50%;
    width: 2px;
    height: 50px;
    background-color: var(--dark-color);
    transform: translateX(-50%);
}

.subject-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient);
}

.physics-card::before {
    background: var(--physics-color);
}

.chemistry-card::before {
    background: var(--chemistry-color);
}

.subject-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.subject-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
    color: white;
}

.physics-card .subject-icon {
    background-color: var(--physics-color);
}

.chemistry-card .subject-icon {
    background-color: var(--chemistry-color);
}

.subject-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #f8f9fa;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.subject-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.subject-card:hover .subject-image img {
    transform: scale(1.1);
}

.subject-card h3 {
    margin-bottom: 15px;
    font-weight: 700;
}

.subject-card p {
    margin-bottom: 20px;
    color: #6c757d;
}

.subject-card .btn {
    border-radius: 30px;
    padding: 8px 25px;
    font-weight: 500;
}

.physics-card .btn-outline-light {
    color: var(--physics-color);
    border-color: var(--physics-color);
}

.physics-card .btn-outline-light:hover {
    background-color: var(--physics-color);
    color: white;
}

.chemistry-card .btn-outline-light {
    color: var(--chemistry-color);
    border-color: var(--chemistry-color);
}

.chemistry-card .btn-outline-light:hover {
    background-color: var(--chemistry-color);
    color: white;
}

/* About Section */
.about-section {
    background-color: white;
}

.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0.7;
    z-index: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.stat-box {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-box h3 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* Contact Section */
.contact-section {
    background-color: #f8f9fa;
}

.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contact-form .form-control {
    border-radius: 10px;
    border: 1px solid #e9ecef;
    padding: 12px 15px;
    font-weight: 500;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.contact-info {
    padding-left: 30px;
}

.contact-item {
    display: flex;
    margin-bottom: 30px;
}

.contact-item .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.contact-item .content h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--dark-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-section {
        text-align: center;
    }

    .hero-section .display-3 {
        font-size: 2.5rem;
    }

    .x-cubed-3d {
        margin-top: 50px;
    }
}

@media (max-width: 768px) {
    .x-center-connector {
        display: none;
    }

    .subject-card {
        margin-bottom: 30px;
    }

    .contact-info {
        margin-top: 30px;
        padding-left: 0;
    }
}

@media (max-width: 576px) {
    .x-cubed-3d {
        width: 150px;
        height: 150px;
    }

    .face {
        width: 150px;
        height: 150px;
        font-size: 70px;
    }

    .front { transform: translateZ(75px); }
    .back { transform: rotateY(180deg) translateZ(75px); }
    .right { transform: rotateY(90deg) translateZ(75px); }
    .left { transform: rotateY(-90deg) translateZ(75px); }
    .top { transform: rotateX(90deg) translateZ(75px); }
    .bottom { transform: rotateX(-90deg) translateZ(75px); }
}