:root {
  --primary-color: #1a2f75;
  --p-c-r: 26;
  --p-c-g: 47;
  --p-c-b: 117;
  --primary-color-dark: #0e205a;
  --primary-color-light: #4057a5;
  --primary-color-grey: #5A6B8D;

  --secondary-color: #bb5715;
  --s-c-r: 187;
  --s-c-g: 87;
  --s-c-b: 21;
  --secondary-color-light: #d8a64a;

  --white-toned-2: #E8ECF0;
  --white-toned: #FAFBFC;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--primary-color-dark);
    background-color: #FFFFFF;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--primary-color-dark);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--p-c-r), var(--p-c-g), var(--p-c-b), 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    font-size: 36px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-logo > img {
    height: 50px;
}

.nav-logo > span {
    display: block;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(var(--p-c-r), var(--p-c-g), var(--p-c-b), 0.05) 0%, rgba(var(--s-c-r), var(--s-c-g), var(--s-c-b), 0.05) 100%);
    padding-top: 80px;
    /*
    background: url('./img/background.jpg') center/cover no-repeat;
    background-attachment: fixed;
    background-color: rgba(255, 255, 255, 0.85);
    background-blend-mode: lighten;
    */
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 36px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--primary-color-dark);
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 32px;
    color: var(--primary-color-grey);
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--p-c-r), var(--p-c-g), var(--p-c-b), 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--s-c-r), var(--s-c-g), var(--s-c-b), 0.3);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 400px;
}

@-webkit-keyframes orbit {
    from {  -webkit-transform: rotate(0deg) translateX(150px) rotate(0deg); }
    to   {  -webkit-transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

@keyframes orbit {
    from { transform: rotate(0deg) translateX(150px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
}

.orbit {
    -webkit-animation-name: orbit;
    -webkit-animation-duration: 12s;
    -webkit-animation-timing-function: ease-in-out;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-fill-mode: both;

    animation-name: orbit;
    animation-duration: 12s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-fill-mode: both; /* keep the first frame during animation-delay to prevent jumping */
}

.floating-card {
    position: absolute;
    top: 35%;
    left: 40%;
    width: 100px;
    height: 100px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    /* animation: float 6s ease-in-out infinite; */
    transform-origin: center center; 
    /* set initial transform equal to the animation's first frame to avoid a jump when the animation starts (esp. when animation-delay is used) */
    transform: translate(-50%, -50%) rotate(0deg) translateX(150px) rotate(0deg) translateY(var(--parallax-y, 0px)); 
}

.card-1 {
    background: url('./img/card1.png') center/cover no-repeat;
    animation-delay: 8s;
    overflow: hidden;
}

.card-2 {
    background: url('./img/card2.png') center/cover no-repeat;
    animation-delay: 4s;
    overflow: hidden;
}

.card-3 {
    background: url('./img/card3.png') center/cover no-repeat;
    animation-delay: 0s;
    overflow: hidden;
}

.card-1::after, .card-2::after, .card-3::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    opacity: 0.5;
    transition: opacity 1s;
    pointer-events: none;
}
.card-1::after {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light));
}
.card-2::after {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-color-light));
}
.card-3::after {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}
.card-1:hover::after, .card-2:hover::after, .card-3:hover::after {
    opacity: 0;
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color-dark);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--primary-color-grey);
}

/* About Section */
.about {
    padding: 120px 0;
    background-color: var(--white-toned);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-content h3 {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color-dark);
    margin-bottom: 24px;
}

.about-content p, .about-content ul {
    font-size: 16px;
    line-height: 1.7;
    color: var(--primary-color-grey);
    margin-bottom: 32px;
}

.about-content ul {
    padding-left: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat {
    text-align: center;
    padding: 24px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--primary-color-grey);
}

.about-image, .contact-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 400px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
}

/*
.image-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}
*/


.image-slider {
    width: 400px;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.slider-img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transition: opacity 1s;
    pointer-events: none;
}
.slider-img.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* Services Section */
.services {
    padding: 120px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 32px;
}

.service-card {
    background: #FFFFFF;
    padding: 40px 32px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--p-c-r), var(--p-c-g), var(--p-c-b), 0.1), rgba(var(--s-c-r), var(--s-c-g), var(--s-c-b), 0.1));
    border-radius: 20px;
}

.service-footer {
    margin-top: 50px;
    text-align: center;
    color: var(--primary-color-grey);
    font-size: 16px;
}

/* Partner logos: consistent visual height and responsive object-fit */
.partner-logos {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.partner-logo {
    display: block;
    height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain; /* preserve aspect ratio */
    background: transparent;
    opacity: 0.95;
    transition: transform 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.partner-logo:hover {
    transform: translateY(-4px) scale(1.03);
    opacity: 1;
}

@media (max-width: 768px) {
    .partner-logo { height: 54px; max-width: 160px; }
}

@media (max-width: 480px) {
    .partner-logo { height: 44px; max-width: 140px; }
}

/* Gallery styles */
.gallery {
    padding: 80px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.gallery-item {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
}

/* Force gallery previews to be square (1:1) at any grid size */
.gallery-item {
    aspect-ratio: 1 / 1;
    display: block;
}

/* Remove the default focus ring that can remain after closing the lightbox; keep focus-visible for keyboard users */
.gallery-item:focus { outline: none; }
.gallery-item:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 4px; }

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* fill the square, cropping as needed */
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

/* Lightbox modal */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.lightbox.active {
    display: flex;
}
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img {
    /* Constrain by both viewport width and height to avoid overflow */
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    display: block;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
}
.lightbox-close { top: 12px; right: 12px; transform: none; }
.lightbox-prev { left: -56px; }
.lightbox-next { right: -56px; }

@media (max-width: 600px) {
    .lightbox-prev, .lightbox-next { display: none; }
}

.icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.icon-web { background: linear-gradient(135deg, var(--primary-color), var(--primary-color-light)); }
.icon-mobile { background: linear-gradient(135deg, var(--secondary-color), var(--secondary-color-light)); }
.icon-cloud { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }
.icon-analytics { background: linear-gradient(135deg, var(--primary-color-light), var(--primary-color)); }
.icon-security { background: linear-gradient(135deg, var(--secondary-color-light), var(--secondary-color)); }
.icon-consulting { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }

.service-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-color-dark);
    margin-bottom: 16px;
}

.service-card p, .service-card ul {
    color: var(--primary-color-grey);
    line-height: 1.6;
}

.service-card ul {
    padding-left: 20px;
    text-align: left;
}

/* Contact Section */
.contact {
    padding: 120px 0;
    background-color: var(--white-toned);
}

.contact a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact a:hover {
    color: var(--secondary-color-light);
    text-decoration: none;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon .icon {
    width: 24px;
    height: 24px;
    background: #FFFFFF;
    border-radius: 4px;
}

.contact-details h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color-dark);
    margin-bottom: 4px;
}

.contact-details p {
    color: var(--primary-color-grey);
}

.contact-form {
    background: #FFFFFF;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-color-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--white-toned-2);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: var(--primary-color-dark);
    color: #FFFFFF;
    padding: 64px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
}

.footer-brand p {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    display: flex;
    gap: 64px;
    justify-content: flex-end;
}

.footer-column h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #FFFFFF;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--primary-color-dark);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 32px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-container {
        margin-top: 20px;
    }

    .hero-container,
    .about-grid,
    .contact-grid,
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-title {
        font-size: 30px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }

    .container {
        padding: 0 16px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .hero {
        text-align: center;
    }

    .about-grid {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 26px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .about-content h3 {
        font-size: 22px;
    }

    .image-slider, .image-placeholder {
        width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 24px 20px;
    }

    .contact-form {
        padding: 24px;
    }
}