/* Custom styles for Job Ready Computing */

/* --- GLOBAL STYLES --- */
body {
    /* Sets the default font and a light gray background color for the entire site. */
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb;
}

/* --- HEADER STYLES --- */
header {
    /* Enables a smooth transition for all properties when the header changes state (e.g., on scroll). */
    transition: all 0.3s ease;
}

/* Styles applied to the header when the user scrolls down the page. */
.header-scrolled {
    /* Makes the background slightly transparent white with a blur effect. */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari browser compatibility. */
    /* Adds a subtle shadow for depth. */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Changes text and icon colors to dark gray when the header is in the "scrolled" state. */
.header-scrolled a,
.header-scrolled .uppercase,
.header-scrolled .text-2xl,
.header-scrolled button svg,
.header-scrolled .md\:hidden svg {
    color: #1f2937;
    stroke: #1f2937;
}

/* Defines transition effects for the header's container and logo text when scrolling. */
#header .container,
#header .uppercase {
    transition: padding 0.3s ease-in-out, font-size 0.3s ease-in-out;
}

/* Reduces the vertical padding of the header container in the "scrolled" state. */
.header-scrolled .container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Reduces the font size of the logo text in the "scrolled" state. */
.header-scrolled .uppercase {
    font-size: 1.25rem;
}


/* --- GENERAL CARD STYLES --- */

/* Base styling for feature cards on the homepage. */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease;
    height: 100%; /* Ensures all cards in a row have the same height. */
}

/* Lifts and adds a more prominent shadow to the feature card on hover. */
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px rgba(0,0,0,0.1);
}

/* Base styling for simple cards used across the site. */
.simple-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Lifts and adds a shadow to the simple card on hover. */
.simple-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.07);
}

/* A universal card effect that adds a colored glow beneath the card on hover. */
.glow-card {
    position: relative;
}
/* Creates a pseudo-element that will act as the glow. It is positioned below the card and is initially hidden. */
.glow-card::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 5%;
    width: 90%;
    height: 20px;
    /* The glow is a radial gradient, blurred, scaled down, and made transparent. */
    background: radial-gradient(ellipse at center, var(--glow-color, rgba(37, 99, 235, 0.5)) 0%, transparent 70%);
    filter: blur(20px);
    transform: scale(0.8, 0.5);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: -1; /* Places the glow behind the card. */
}
/* On hover, the glow becomes visible and scales up to its full size. */
.glow-card:hover::after {
    opacity: 0.8;
    transform: scale(1.0, 1.0);
}


/* --- HERO SECTION STYLES --- */

/* Defines a large, animated gradient background for the hero section. */
.bg-gradient-hero {
    background-image: linear-gradient(135deg, #2563EB 0%, #14B8A6 100%);
    background-size: 200% 200%; /* Background is twice the size to allow for movement. */
    animation: animate-gradient 15s ease infinite; /* Applies the animation. */
}
/* Keyframes for the gradient animation, moving the background position over time. */
@keyframes animate-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Base styling for decorative shapes in the hero section. */
.shape {
    position: absolute;
    color: rgba(255, 255, 255, 0.15);
    transition: transform 0.1s ease-out; /* For smooth movement with mouse interaction. */
}
/* Positions and sizes for each individual shape. */
.shape-1 { font-size: 10rem; top: 10%; left: 5%; }
.shape-2 { font-size: 5rem; top: 20%; right: 10%; }
.shape-3 { font-size: 7.5rem; bottom: 15%; left: 25%; }
.shape-4 { font-size: 4.375rem; bottom: 5%; right: 20%; }


/* --- SCROLL ANIMATION STYLES --- */

/* The initial state for elements that will fade in on scroll. They start transparent and slightly moved down. */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
/* The final state when the element becomes visible in the viewport. */
.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- ANIMATED HEADLINE STYLES --- */

/* A container for each word in the animated headline. */
.animate-word {
    display: inline-block;
    overflow: hidden; /* Hides the part of the text that is outside the container. */
    vertical-align: top;
    margin-right: 0.5rem;
}
/* The actual text element, initially positioned below the visible area. */
.animate-word > span {
    display: block;
    transform: translateY(110%);
    opacity: 0;
    animation: slideUpWord 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards; /* Applies the slide-up animation. */
}
/* Keyframes to animate the word sliding up and fading in. */
@keyframes slideUpWord {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Applies a staggered delay to each word for a sequential animation effect. */
.animate-word:nth-child(1) > span { animation-delay: 0.2s; }
.animate-word:nth-child(2) > span { animation-delay: 0.4s; }
.animate-word:nth-child(3) > span { animation-delay: 0.6s; }


/* --- HOMEPAGE FEATURES GRID INTERACTION --- */

/* Styles applied to non-hovered cards when another card in the grid is hovered. */
#features-grid .feature-card.is-inactive {
    opacity: 0.5;
    transform: scale(0.95);
}


/* --- NAVIGATION LINK STYLES --- */
nav .nav-link {
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}
/* Creates an underline pseudo-element for each nav link, initially scaled to zero width. */
nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
/* The underline scales to full width on hover. */
nav .nav-link:hover::after {
    transform: scaleX(1);
}
/* Styles for the link corresponding to the current page. */
nav .nav-link.is-active {
    font-weight: 600;
}
/* The underline is always visible for the active link. */
nav .nav-link.is-active::after {
    transform: scaleX(1);
}
/* Changes the underline color to blue when the header is in the "scrolled" state. */
.header-scrolled nav .nav-link::after {
    background-color: #2563EB;
}
/* Ensures text color remains dark on hover when header is scrolled. */
.header-scrolled nav .nav-link:hover {
    color: #1f2937;
}


/* --- MOBILE MENU STYLES --- */

/* Styles the active link in the mobile slide-out menu. */
#mobile-menu .nav-link.is-active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

/* --- SCROLL TO TOP BUTTON STYLES --- */
#scroll-to-top-button {
    /* The button starts hidden, transparent, and moved down. */
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
/* The button becomes visible when the user scrolls down. */
#scroll-to-top-button.is-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}


/* --- PORTFOLIO PAGE STYLES --- */

/* Styles for the main content area of the portfolio page. */
#portfolio-display-area {
    transition: opacity 0.4s ease-in-out;
}
/* Fades out the content area when switching views (e.g., from grid to project details). */
#portfolio-display-area.is-hiding {
    opacity: 0;
}

/* The combined "Card Lift & Glow" effect for portfolio items. */
.portfolio-item {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
/* Lifts the card and adds a shadow on hover. */
.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
/* Creates the pseudo-element for the glow effect, initially hidden. */
.portfolio-item::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 5%;
    width: 90%;
    height: 20px;
    background: radial-gradient(ellipse at center, var(--glow-color, rgba(37, 99, 235, 0.5)) 0%, transparent 70%);
    filter: blur(20px);
    transform: scale(0.8, 0.5);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: -1;
}
/* Makes the glow visible on hover. */
.portfolio-item:hover::after {
    opacity: 0.8;
    transform: scale(1.0, 1.0);
}

/* Styles for the "Call to Action" text and icon that appear on portfolio item hover. */
.cta-text-icon {
    color: white;
    font-weight: 500;
    letter-spacing: 0.05em;
}
/* The arrow icon inside the CTA. */
.cta-text-icon .fa-arrow-right {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}
/* Moves the arrow slightly to the right on hover for a subtle animation. */
.group:hover .cta-text-icon .fa-arrow-right {
    transform: translateX(4px);
}

/* Ensures portfolio images cover their container perfectly. */
.portfolio-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Hides and scales down portfolio items when they are filtered out. */
.portfolio-item.is-hidden {
    transform: scale(0.8);
    opacity: 0;
    display: none;
}

/* Styles for thumbnail images in project detail views. */
.thumb {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* A container for images that scroll vertically on hover. */
.image-showcase-container {
    max-height: 450px;
    overflow: hidden; /* Hides the part of the image that overflows the container. */
    border-radius: 0.5rem;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
/* The image inside the showcase container. */
.image-showcase-container img {
    transition: transform 10s ease-in-out; /* A long transition for a slow scroll effect. */
}
/* On hover, the image is translated vertically to reveal its full height. */
.image-showcase-container:hover img {
    transform: translateY(calc(-100% + 450px));
}

/* Changes the cursor style when interacting with a zoomed lightbox image. */
.gslide-image.gzoomed img {
    cursor: grab;
}
.gslide-image.gzoomed img:active {
    cursor: grabbing;
}


/* --- SERVICE PAGE CARD STYLES --- */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Lifts the service card and adds a shadow on hover. */
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.07);
}
/* The icon container inside the service card. */
.service-card .icon-container {
    transition: transform 0.3s ease;
}
/* Scales up the icon slightly on hover. */
.service-card:hover .icon-container {
    transform: scale(1.1);
}
/* The arrow icon inside the service card. */
.service-card .fa-arrow-right {
    transition: transform 0.3s ease;
}
/* Moves the arrow to the right on hover. */
.service-card:hover .fa-arrow-right {
    transform: translateX(5px);
}


/* --- PRICING PAGE CARD STYLES --- */
.pricing-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Lifts the pricing card and adds a shadow on hover. */
.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.07);
}


/* --- MOBILE CAROUSEL (SWIPER) STYLES --- */
.swiper {
    /* Adds padding at the bottom to make space for the pagination dots. */
    padding-bottom: 40px;
}
/* On larger screens, the swiper is disabled and a grid layout is used instead. */
@media (min-width: 768px) {
    .swiper {
        padding-bottom: 0;
    }
    .swiper-wrapper {
        display: grid;
    }
}
/* Styles for the default pagination dots. */
.swiper-pagination-bullet {
    background-color: #d1d5db;
    opacity: 1;
}
/* Styles for the active pagination dot. */
.swiper-pagination-bullet-active {
    background-color: #2563EB;
}

/* A general-purpose container for images that scroll on hover. */
.scroll-on-hover-container {
    max-height: 450px;
    overflow: hidden;
    position: relative;
    display: block;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
.scroll-on-hover-container img {
    width: 100%;
    transition: transform 20s ease-in-out; /* Very slow transition for a subtle scroll effect. */
}
/* On hover, the image scrolls up and zooms in slightly for a parallax effect. */
.scroll-on-hover-container:hover img {
    transform: translateY(calc(-100% + 450px)) scale(1.03);
}


/* --- PRICING DETAILS MODAL STYLES --- */

/* Prevents the background content from scrolling when the modal is open. */
body.modal-open {
    overflow: hidden;
}
/* Hides the modal by default and adds a delay to the transition out. */
#details-modal {
    transition: visibility 0s 0.3s;
}
/* Makes the modal visible when it's open. */
#details-modal.is-open {
    visibility: visible;
    transition-delay: 0s;
}
/* The modal overlay starts transparent. */
#details-modal-overlay {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
/* The modal overlay fades in when the modal is open. */
#details-modal.is-open #details-modal-overlay {
    opacity: 1;
}
/* The modal content container starts transparent and moved down. */
#details-modal-container {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
/* On larger screens, the modal also starts slightly scaled down. */
@media (min-width: 640px) {
    #details-modal-container {
        transform: scale(0.95);
    }
}
/* The modal content fades in and moves into its final position when open. */
#details-modal.is-open #details-modal-container {
    opacity: 1;
    transform: translateY(0) scale(1);
}
/* Removes default list styling within the modal content area for custom styling. */
.prose ul {
    list-style-type: none;
    padding-left: 0;
}
.prose ul li {
    padding-left: 0;
}


/* --- QUIZ/RECOMMENDER STYLES --- */
.quiz-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    background-color: white;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    color: #374151; /* Default text color */
}
/* Styles for the quiz option button on hover. */
.quiz-option:hover {
    border-color: #2563EB;
    background-color: #eff6ff;
    color: #1e40af;
}

/* A modern, pill-shaped filter control for the portfolio grid. */
.grid-filter a {
    position: relative;
    z-index: 10; /* Ensures the text is above the background glider. */
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    color: #4b5563;
    border-radius: 9999px;
    transition: color 0.3s ease;
    cursor: pointer;
}
.grid-filter a:hover {
    color: #1f2937;
}
/* The active filter link has white text. */
.grid-filter a.active {
    color: white;
}
/* The "glider" is the blue background that slides behind the active filter link. */
.filter-glider {
    background-color: #2563EB;
    border-radius: 9999px;
    transition: width 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 5; /* Positioned behind the text but above the container. */
}






/* Footer Link Hover Effect */
.footer-link {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #3b82f6; /* Blue-500 */
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* --- Fix Portfolio Filter Visibility --- */
.grid-filter a {
    position: relative;
    z-index: 10; /* Keeps text on top of the sliding white pill */
    transition: color 0.2s ease;
}

/* When active, make text Dark Indigo (Readable on white) */
.grid-filter a.active {
    color: #4f46e5 !important; 
    font-weight: 700;
}

/* Hover state for non-active items */
.grid-filter a:hover:not(.active) {
    color: #111827; /* Dark Gray */
}