/* About Us Page Specific Styles */

/* About Hero Section */
.about-hero {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    color: var(--white);
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
}

.about-hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.about-hero-content {
    flex: 1;
    max-width: 550px;
    z-index: 2;
}

.about-hero-content h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.about-hero-content p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.9;
}

.about-hero-image {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3D Floating Cube */
.floating-cube {
    width: 200px;
    height: 200px;
    perspective: 1000px;
    position: relative;
    transform-style: preserve-3d;
    animation: floatingCube 15s infinite linear;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    backface-visibility: visible;
    transform-style: preserve-3d;
}

.cube-face::after {
    content: "";
    position: absolute;
    width: 80%;
    height: 80%;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.cube-face.front {
    transform: translateZ(100px);
    background-image: url(/assets/img/1.jpg);
    background-size: cover;
    background-position: center;
    opacity: 0.8;
}

.cube-face.back {
    transform: rotateY(180deg) translateZ(100px);
    background-image: url(/assets/img/2.jpg);
    background-size: cover;
    background-position: center;
    opacity: 0.8;
}

.cube-face.right {
    transform: rotateY(90deg) translateZ(100px);
    background-image: url(/assets/img/3.jpg);
    background-size: cover;
    background-position: center;
    opacity: 0.8;
}

.cube-face.left {
    transform: rotateY(-90deg) translateZ(100px);
    background-image: url(/assets/img/4.jpg);
    background-size: cover;
    background-position: center;
    opacity: 0.8;
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(100px);
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    opacity: 0.9;
}

.cube-face.bottom {
    transform: rotateX(-90deg) translateZ(100px);
    background: linear-gradient(
        135deg,
        var(--secondary-color),
        var(--primary-color)
    );
    opacity: 0.9;
}

/* Fixed/Completed Floating Cube Animation */
@keyframes floatingCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateY(0px);
    }
    25% {
        transform: rotateX(90deg) rotateY(90deg) rotateZ(45deg)
            translateY(-20px);
    }
    50% {
        transform: rotateX(180deg) rotateY(180deg) rotateZ(90deg)
            translateY(0px);
    }
    75% {
        transform: rotateX(270deg) rotateY(270deg) rotateZ(135deg)
            translateY(-20px);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(180deg)
            translateY(0px);
    }
}

/* Shape Divider - Updated for new position after Features section */
.shape-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2; /* Ensure it's above any subsequent content */
    transform: rotateX(180deg);
}

.shape-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
    transform: rotateY(
        180deg
    ); /* Optional: flip horizontally for different look */
}

.shape-divider .shape-fill {
    fill: #ffffff; /* Match the color of the next section (Team section) */
}

/* Alert Styles for Form Submission */
.alert-success {
    background-color: rgba(25, 135, 84, 0.9);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.5s forwards;
    font-weight: 600;
    display: none;
    position: relative;
}

.alert-success::before {
    content: "\f058";
    font-family: "Font Awesome 5 Free";
    margin-right: 10px;
    font-weight: 900;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Our Vision Section */
.our-vision {
    padding: 100px 0;
    background-color: #fff;
}

.vision-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 50px;
}

.vision-image {
    flex: 1;
    position: relative;
    height: 400px;
}

.orbs-container {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1200px;
}

.orb {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient);
    box-shadow: 0 0 30px rgba(0, 70, 80, 0.4),
        inset 0 0 15px rgba(255, 255, 255, 0.8);
}

.orb-1 {
    width: 160px;
    height: 160px;
    top: 20%;
    left: 20%;
    animation: floatOrb 6s infinite alternate ease-in-out;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        rgba(0, 70, 80, 0.7)
    );
}

.orb-2 {
    width: 120px;
    height: 120px;
    top: 50%;
    right: 10%;
    animation: floatOrb 8s infinite alternate-reverse ease-in-out;
    background: linear-gradient(
        135deg,
        var(--secondary-color),
        rgba(188, 95, 66, 0.7)
    );
}

.orb-3 {
    width: 90px;
    height: 90px;
    bottom: 10%;
    left: 30%;
    animation: floatOrb 7s infinite alternate ease-in-out 1s;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
}

.connecting-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.connecting-lines::before,
.connecting-lines::after {
    content: "";
    position: absolute;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary-color) 50%,
        transparent
    );
    height: 2px;
    animation: pulseLine 4s infinite;
}

.connecting-lines::before {
    top: 30%;
    left: 25%;
    width: 60%;
    transform: rotate(30deg);
}

.connecting-lines::after {
    top: 60%;
    left: 15%;
    width: 70%;
    transform: rotate(-20deg);
}

@keyframes floatOrb {
    0% {
        transform: translateY(0) translateZ(0) rotateY(0deg);
        box-shadow: 0 0 30px rgba(0, 70, 80, 0.4),
            inset 0 0 15px rgba(255, 255, 255, 0.8);
    }
    100% {
        transform: translateY(-20px) translateZ(50px) rotateY(180deg);
        box-shadow: 0 0 40px rgba(188, 95, 66, 0.6),
            inset 0 0 25px rgba(255, 255, 255, 0.9);
    }
}

@keyframes pulseLine {
    0%,
    100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
}

.vision-text {
    flex: 1;
}

.vision-text h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.vision-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 16px;
}

/* Features Section - Updated to handle shape divider at bottom */
.features {
    background-color: #f9f5ff;
    padding: 100px 0 120px; /* Increased bottom padding to accommodate the shape */
    position: relative;
    z-index: 1;
    margin-bottom: -1px; /* Fix any potential gap */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.feature-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 40px 25px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s ease;
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover h3,
.feature-card:hover p {
    color: var(--white);
}

.feature-icon {
    margin-bottom: 25px;
}

.rotating-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.6s ease;
}

.rotating-icon::before {
    content: "";
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.7);
    animation: spinRing 12s linear infinite;
}

.feature-card:hover .rotating-icon {
    transform: rotateY(180deg);
}

.feature-card .rotating-icon i {
    font-size: 30px;
    color: var(--white);
    transition: all 0.5s ease;
}

.feature-card:hover .rotating-icon i {
    transform: scale(1.2);
}

@keyframes spinRing {
    0% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(360deg);
    }
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    transition: color 0.5s ease;
}

.feature-card p {
    font-size: 15px;
    line-height: 1.7;
    transition: color 0.5s ease;
}

/* Team Section */
.team {
    padding: 100px 0;
    background-color: var(--white);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.team-member {
    background-color: #f9f5ff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
}

.team-member:hover {
    transform: rotateY(10deg) translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.team-member::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    background: linear-gradient(
        135deg,
        transparent 50%,
        rgba(0, 70, 80, 0.05) 100%
    );
    pointer-events: none;
    transition: opacity 0.6s ease;
    opacity: 0;
}

.team-member:hover::after {
    opacity: 1;
}

.member-image {
    height: 300px;
    position: relative;
    overflow: hidden;
}

.image-wrapper {
    width: 100%;
    height: 100%;
    transform: scale(1);
    transition: transform 0.6s ease;
}

.team-member:hover .image-wrapper {
    transform: scale(1.05);
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.member-info {
    padding: 25px;
    text-align: center;
}

.member-info h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.member-info span {
    display: block;
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.member-info p {
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.7;
}

.member-social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.member-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    border-radius: 50%;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.member-social a:hover {
    background: var(--gradient);
    color: var(--white);
    transform: translateY(-5px);
}

/* Counter Section */
.counter {
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    padding: 80px 0;
    color: var(--white);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.counter::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.1) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    z-index: -1;
    opacity: 0.1;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.counter-item {
    text-align: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    transition: transform 0.5s ease;
}

.counter-item:hover {
    transform: translateY(-10px);
}

.counter-number {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #fff, #f5f5f5);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.counter-label {
    font-size: 18px;
    font-weight: 600;
}

/* Contact Form Section */
.contact-us {
    padding: 100px 0;
    background-color: #f9f5ff;
}

.contact-container {
    display: flex;
    gap: 50px;
    margin-top: 50px;
}

.contact-info {
    flex: 1;
    background: linear-gradient(
        135deg,
        var(--primary-color),
        var(--secondary-color)
    );
    border-radius: 15px;
    padding: 40px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 22px;
    background-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.info-item h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.info-item p {
    opacity: 0.9;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-5px);
}

.contact-form {
    flex: 2;
    background-color: var(--white);
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-family: "Cairo", sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-group textarea {
    height: 150px;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 70, 80, 0.1);
    outline: none;
    background-color: #fff;
}

/* Enhancing the Submit Button */
.contact-form button[type="submit"] {
    width: 100%;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.contact-form button[type="submit"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.7s ease;
    z-index: -1;
}

.contact-form button[type="submit"]:hover::before {
    left: 100%;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .counter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .about-hero .container,
    .vision-content,
    .contact-container {
        flex-direction: column;
    }

    .about-hero-content,
    .vision-text,
    .vision-image {
        max-width: 100%;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .floating-cube {
        margin-top: 40px;
    }

    .vision-image {
        height: 300px;
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .features-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        flex-direction: column;
        gap: 30px;
    }

    .floating-cube {
        width: 150px;
        height: 150px;
    }

    .cube-face {
        width: 150px;
        height: 150px;
    }

    .cube-face.front,
    .cube-face.back,
    .cube-face.right,
    .cube-face.left,
    .cube-face.top,
    .cube-face.bottom {
        transform: translateZ(75px);
    }

    .cube-face.back {
        transform: rotateY(180deg) translateZ(75px);
    }

    .cube-face.right {
        transform: rotateY(90deg) translateZ(75px);
    }

    .cube-face.left {
        transform: rotateY(-90deg) translateZ(75px);
    }

    .cube-face.top {
        transform: rotateX(90deg) translateZ(75px);
    }

    .cube-face.bottom {
        transform: rotateX(-90deg) translateZ(75px);
    }
}

@media (max-width: 576px) {
    .about-hero-content h1 {
        font-size: 36px;
    }

    .counter-grid {
        grid-template-columns: 1fr;
    }

    .counter-number {
        font-size: 40px;
    }

    .vision-content {
        margin-top: 30px;
    }

    .orb-1 {
        width: 120px;
        height: 120px;
    }

    .orb-2 {
        width: 90px;
        height: 90px;
    }

    .orb-3 {
        width: 70px;
        height: 70px;
    }

    .floating-cube {
        width: 120px;
        height: 120px;
    }

    .cube-face {
        width: 120px;
        height: 120px;
    }

    .cube-face.front,
    .cube-face.back,
    .cube-face.right,
    .cube-face.left,
    .cube-face.top,
    .cube-face.bottom {
        transform: translateZ(60px);
    }

    .cube-face.back {
        transform: rotateY(180deg) translateZ(60px);
    }

    .cube-face.right {
        transform: rotateY(90deg) translateZ(60px);
    }

    .cube-face.left {
        transform: rotateY(-90deg) translateZ(60px);
    }

    .cube-face.top {
        transform: rotateX(90deg) translateZ(60px);
    }

    .cube-face.bottom {
        transform: rotateX(-90deg) translateZ(60px);
    }
}

/* Print Styles */
@media print {
    .about-hero {
        background: none !important;
        color: black !important;
        padding: 20px 0 !important;
    }

    .floating-cube,
    .shape-divider,
    .features-grid .feature-icon,
    .team-member .member-social,
    .counter,
    .contact-us {
        display: none !important;
    }
}
