/* assets/css/layout/front-page.css */

/* Hero Section Styles */
.hero-section {
    height: calc(100svh - var(--header-height));
    background: radial-gradient(circle at center bottom, var(--color-secondary-light) 25%, var(--color-secondary-dark) 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.hero-content {
    height: calc(80svh - var(--header-height));
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-lg) 0;
    overflow: hidden;
    position: relative;
}

.hero-content .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    text-align: center;
    width: 100%;
}

@media (min-width: 768px) {
    .hero-content .container {
        grid-template-columns: 1fr 1fr;
        text-align: right;
        gap: var(--spacing-2xl);
    }
}

.hero-text h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-text h1 {
        font-size: var(--font-size-5xl);
    }
}

.hero-text .highlight {
    color: var(--color-accent);
}

.hero-text p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
    .hero-text p {
        font-size: var(--font-size-xl);
    }
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-buttons {
        justify-content: flex-start;
        gap: var(--spacing-md);
    }
}

.hero-image {
    position: relative;
    display: none;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-image {
        order: 0;
        display: flex;
    }
}

.hero-actual-image {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: var(--border-radius);
    opacity: 0.7;
}

@media (min-width: 768px) {
    .hero-actual-image {
        max-width: 500px;
    }
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    color: rgba(255, 255, 255, 0.4);
    animation: twinkle 3s infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Projects Bar (at the bottom of Hero) Styles */
.projects-bar {
    background-color: var(--color-primary-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    position: relative;
    flex-shrink: 0;
}

.projects-bar-inner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.projects-bar-main-title {
    color: var(--color-accent);
    text-align: center;
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-lg);
    font-weight: 500;
    flex-shrink: 0;
}

.projects-bar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    gap: 0;
    flex-grow: 1;
    align-items: stretch;
}

.project-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    position: relative;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-off-white);
    border: none;
    background-color: transparent;
}

.project-bar-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    top: var(--spacing-md);
    bottom: var(--spacing-md);
    width: 1px;
    opacity: 0.2;
    background: var(--color-accent);
}

.projects-bar-grid[style*="grid-template-columns: repeat(4"] .project-bar-item:nth-child(4n)::after {
    display: none;
}

.project-bar-item:hover {
    background-color: var(--color-primary);
    transform: translateY(-3px);
    text-decoration: none;
}

.project-bar-item:hover .project-bar-title {
    color: var(--color-accent-light);
}

.project-bar-icon {
    height: 4rem;
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-bar-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--color-accent);
    transition: var(--transition);
    opacity: 0.8;
}

.project-bar-item:hover .project-bar-icon svg {
    opacity: 1;
    transform: scale(1.1);
}

.project-bar-title {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--color-off-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    transition: color 0.3s ease;
    line-height: 1.3;
}

/* Mobile Responsive for Projects Bar */
@media (max-width: 768px) {
    .hero-content {
        height: calc(75svh - var(--header-height));
        padding-top: var(--spacing-sm);
        padding-bottom: var(--spacing-sm);
    }

    .projects-bar {
        height: auto;
        padding: var(--spacing-sm) 0;
    }

    .projects-bar-main-title {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-md);
    }

    .projects-bar-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
    }

    .project-bar-item {
        flex-direction: row-reverse;
        padding: var(--spacing-sm);
        justify-content: flex-start;
        align-items: center;
    }

    .project-bar-icon {
        height: 3rem;
        margin-bottom: 0;
        margin-left: var(--spacing-sm);
        flex-shrink: 0;
    }

    .project-bar-title {
        font-size: var(--font-size-lg);
        text-align: right;
        flex-grow: 1;
        word-break: break-word;
        text-transform: none;
        letter-spacing: normal;
        line-height: 1.4;
    }

    .project-bar-item::after,
    .project-bar-item::before {
        display: none;
    }

    .projects-bar-grid .project-bar-item:nth-child(odd)::after {
        content: '';
        position: absolute;
        left: 0;
        top: var(--spacing-xs);
        bottom: var(--spacing-xs);
        width: 1px;
        opacity: 0.2;
        background: var(--color-accent);
        display: block;
    }

    .projects-bar-grid[style*="grid-template-columns: repeat(2"] .project-bar-item:nth-child(2n)::after {
        display: none;
    }

    .projects-bar-grid .project-bar-item:nth-child(1)::before,
    .projects-bar-grid .project-bar-item:nth-child(2)::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: var(--spacing-xs);
        right: var(--spacing-xs);
        height: 1px;
        opacity: 0.2;
        background: var(--color-accent);
        display: block;
    }
}

@media (max-width: 480px) {
    .project-bar-icon {
        height: 3.5rem;
        margin-left: var(--spacing-xs);
    }

    .project-bar-title {
        font-size: var(--font-size-base);
    }

    .projects-bar-grid {
        max-width: 100%;
    }
}

/*
=========================================
About Us Section Styles - WITH CHANGES
=========================================
*/
.about-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-light);
}

@media (min-width: 768px) {
    .about-section {
        padding: var(--spacing-2xl) 0;
    }
}

.about-content {
    margin: 0 auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .about-content {
        display: grid;
        grid-template-columns: 3fr 2fr;
        gap: var(--spacing-lg);
        /* CHANGE: Removed 'align-items: center' to allow grid cells to stretch vertically */
    }
}

.about-text {
    order: 1;
}

.about-text p {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

@media (min-width: 768px) {
    .about-text p {
        font-size: var(--font-size-lg);
    }
}

.about-image-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 0;
    opacity: 0.7;
}

@media (min-width: 768px) {
    .about-image-container {
        order: 2;
        /* ADD: Make container fill the stretched grid cell height */
        height: 100%;
    }
}

.about-actual-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--border-radius);
}

@media (min-width: 768px) {
    .about-actual-image {
        max-width: 650px;
        /* ADD: Make image fill container height and crop to fit */
        height: 100%;
        object-fit: cover;
    }
}

/* Projects Showcase Section Styles */
.projects-section {
    padding: var(--spacing-xl) 0;
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .projects-section {
        padding: var(--spacing-2xl) 0;
    }
}

.projects-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,<svg id='patternId' width='100%' height='100%' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='40' height='40' patternTransform='scale(4) rotate(150)'><rect x='0' y='0' width='100%' height='100%' fill='%2329297500'/><path d='M23.222 25.097l-3.266-2.056-3.219 2.058.983-3.847-3.042-2.503 3.936-.18 1.52-3.668 1.342 3.578 3.846.312-2.996 2.505z'  stroke-linejoin='round' stroke-linecap='round' stroke-width='0.5' stroke='%233f51b5ff' fill='none'/><path d='M.133-5.1l-1.52 3.668-3.935.18 3.043 2.504-.985 3.848L-.043 3.04l3.264 2.057-.895-3.803L5.322-1.21l-3.845-.312L.133-5.1zm40 0l-1.52 3.668-3.935.18 3.043 2.504-.985 3.848 3.221-2.059 3.264 2.057-.895-3.803 2.996-2.504-3.845-.312L40.133-5.1zm-40 40l-1.52 3.668-3.935.18 3.043 2.504-.985 3.848 3.221-2.059 3.264 2.057-.895-3.803 2.996-2.504-3.845-.312L.133 34.9zm40 0l-1.52 3.668-3.935.18 3.043 2.504-.985 3.848 3.221-2.059 3.264 2.057-.895-3.803 2.996-2.504-3.845-.312-1.344-3.579z'  stroke-linejoin='round' stroke-linecap='round' stroke-width='0.5' stroke='%2303a9f4ff' fill='none'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
    opacity: 0.07;
    z-index: -1;
    pointer-events: none;
}

.projects-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .projects-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    animation: pulse 3.5s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(0.85);
        opacity: 0.4;
    }

    50% {
        transform: scale(1);
        opacity: 0.7;
    }
}

.project-card-icon-bg {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 100%;
    height: 100%;
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.project-card-icon-bg svg {
    width: 100%;
    height: 100%;
    fill: var(--color-white);
    max-width: 200px;
    max-height: 200px;
}

.project-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.project-card h3 {
    font-size: var(--font-size-xl);
    margin: 0;
    font-weight: 600;
    flex: 1;
    color: var(--color-white);
}

@media (min-width: 768px) {
    .project-card h3 {
        font-size: var(--font-size-2xl);
    }
}

.project-card-short-desc {
    font-size: var(--font-size-sm);
    color: var(--color-accent-light);
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

@media (min-width: 768px) {
    .project-card-short-desc {
        font-size: var(--font-size-base);
    }
}

.project-card-image {
    margin-bottom: var(--spacing-md);
    border-radius: calc(var(--border-radius) - 4px);
    overflow: hidden;
}

.project-card-image img {
    display: block;
    width: 100%;
    height: auto;
}

.project-card-description p {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    color: var(--color-white);
    flex-grow: 1;
}

@media (min-width: 768px) {
    .project-card-description {
        font-size: var(--font-size-base);
    }
}



.project-card-read-more {
    margin-top: auto;
    text-align: left;
}

.project-card-read-more .btn-secondary {
    border-color: var(--color-accent);
    color: var(--color-accent) !important;
    background-color: transparent;
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs) var(--spacing-md);
}

.project-card-read-more .btn-secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-primary-dark) !important;
    border-color: var(--color-accent);
}

.wave-separator svg,
.hero-custom-wave svg {
    height: 40px;
}

@media (min-width: 768px) {

    .wave-separator svg,
    .hero-custom-wave svg {
        height: 60px;
    }
}

@media (max-width: 480px) {

    .wave-separator svg,
    .hero-custom-wave svg {
        height: 30px;
    }
}

/* Prevent AOS animations from affecting width */
[data-aos] {
    overflow: hidden;
}