/*
-----------------------------
CAPABILITIES PAGE STYLES
-----------------------------
*/

/*
-----------------------------
NAVIGATION
-----------------------------
*/

.image-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
    z-index: 10; /* Higher than hex-canvas z-index: 2 */
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), url("../img/homepage/autostrada-nocturna-3.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -10;
}

.over-image-section {
    position: relative;
    z-index: 10;
    height: 100%;
    text-align: center;
}

.nav-section {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 10px;
}

.navbar-wrap {
    text-align: right;
}

.secondary-menu-navbar {
    display: inline-flex;
    flex-wrap: wrap;
}

.secondary-menu-link-navbar {
    padding: 2px 15px;
}

.secondary-menu-link-navbar a {
    color: var(--first-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.secondary-menu-link-navbar a:hover {
    font-weight: 800;
}

.primary-menu-navbar {
    display: inline-flex;
    flex-wrap: wrap;
}

.primary-menu-link-navbar {
    padding: 5px 15px;
}

.primary-menu-link-navbar a {
    font-size: 1.6rem;
    color: var(--third-color);
    font-weight: 500;
}

.primary-menu-link-navbar a:hover {
    color: var(--first-color);
}

.btn-menu-hamburger {
    display: none;
}

.hero-section-wrap {
    margin-top: 12vh;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.hero-section-content {
    text-align: center;
    width: 60%;
    max-width: 600px;
    min-width: 280px;
    padding: 4vw 4vw 4vw 4vw;
    background: none;
    float: none;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid linear-gradient(
        transparent,
        var(--first-color),
        transparent
    );
    box-shadow: 0 0 10px var(--first-color) inset;
    border-radius: 30px;
}

.hero-section-text {
    width: 100%;
    max-width: 600px;
}

.hero-section-text h1 {
    color: var(--first-color);
    margin-bottom: 18px;
    line-height: 1.1;
}

.hero-section-text p {
    color: #ffffff;
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.5;
}

.hero-section-buttons .btn-black {
    margin-right: 16px;
}

@media (max-width: 1023px) {
    .hero-section-wrap {
        margin-top: 7vh;
        min-height: 50vh;
        justify-content: center;
        padding-top: 4vh;
    }
    .hero-section-content {
        width: 90%;
        max-width: 95vw;
        padding: 4vw 0;
    }
    .hero-section-text {
        max-width: 100vw;
    }
    .hero-section-text h1 {
        font-size: 2.1rem;
    }
    .hero-section-text p {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .image-hero {
        height: 70vh;
    }

    .hero-section-wrap {
        margin-top: 2vh;
        min-height: 60vh;
        padding-top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .hero-section-content {
        width: 100%;
        max-width: 100vw;
        padding: 6vw 0 2vw 0;
    }
    .hero-section-text h1 {
        font-size: 3rem;
    }
    .hero-section-text p {
        font-size: var(--font-size-s);
    }
}

/*
-----------------------------
VISION AND MISSION SECTION
-----------------------------
*/

.our-vision {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--second-color);
    padding-top: 12vh;
    width: 100%;
}

.vision-mission-split {
    height: 100%;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-align-items: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 80%;
}

.vision-mission-section {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.vision-mission-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
}

.vision-mission-split h2 {
    color: var(--first-color);
    padding: 20px 0;
    font-size: var(--font-size-xl);
    text-align: center;
}

.vision-mission-split h3 {
    color: var(--third-color);
}

.vision-mission-split p {
    color: var(--third-color);
    font-size: var(--font-size-s);
    line-height: 1.4;
}

.vision-mission-split li {
    color: var(--third-color);
    font-size: var(--font-size-s);
    padding: 1% 0;
}

.vision-mission-split ul {
    padding: 10px 5%;
    list-style-type: disc;
}

@media (max-width: 1023px) {
    .nav-section {
        padding: 20px 0 10px;
    }

    .logo-header-navbar img {
        width: 140px !important;
    }

    .hero-section-wrap {
        margin-top: 8vh;
        min-height: 60vh;
        justify-content: center;
    }

    .hero-section-content {
        width: 90%;
        max-width: 95vw;
        padding: 4vw 0;
        text-align: center;
    }

    .hero-section-text h1 {
        font-size: 2.4rem;
    }

    .hero-section-text p {
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .vision-mission-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 90%;
    }

    .nav-section {
        padding: 40px 0 10px;
    }

    .logo-header-navbar img {
        width: 110px !important;
    }

    .navbar-wrap {
        display: none;
    }

    .btn-menu-hamburger {
        display: block;
    }

    .hero-section-wrap {
        margin-top: 4vh;
        min-height: 50vh;
        padding-top: 2vh;
    }

    .hero-section-content {
        width: 100%;
        max-width: 100vw;
        padding: 6vw 0 2vw 0;
        text-align: center;
    }

    .hero-section-text h1 {
        font-size: 3rem;
        margin-bottom: 15px;
        font-weight: 900;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    }

    .hero-section-text p {
        font-size: 2rem;
        margin-bottom: 25px;
    }

    .our-vision {
        height: auto;
        padding: 20px 0;
    }

    .our-vision .vision-mission-split {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    .our-vision .vision-mission-section {
        width: 100%;
        height: auto;
        padding-top: 20px;
    }

    .our-vision .vision-mission-content p {
        font-size: var(--font-size-s);
    }

    .vision-mission-split h2 {
        font-size: 3rem;
        font-weight: 900;
    }

    .vision-mission-split p {
        font-size: 1.4rem;
        line-height: 1.6;
        text-align: center;
        width: 90%;
    }

    .vision-mission-split li {
        font-size: 1.4rem;
    }
}

.logo-header-navbar img {
    width: 180px !important;
    max-width: 40vw;
    height: auto;
    display: block;
}

@media (max-width: 1023px) {
    .logo-header-navbar img {
        width: 140px !important;
    }
    .hero-section-content {
        padding-left: 16px;
    }
}

@media (max-width: 767px) {
    .logo-header-navbar img {
        width: 150px !important;
    }
    .hero-section-content {
        padding-left: 8px;
    }
}

/*
-----------------------------
CAPABILITIES SECTION
-----------------------------
*/

.capabilities-section {
    background-color: var(--second-color);
    padding: 12vh 0;
    min-height: 80vh;
    position: relative;
    /* No z-index - section stays below honeycomb */
}

/* Capabilities section on who-we-are page - custom padding */
body.who-we-are .capabilities-section,
.who-we-are .capabilities-section {
    padding: 0 0 12vh 0;
}

.capabilities-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.capabilities-title {
    text-align: center;
    margin-bottom: 80px;
}

.capabilities-title h2 {
    color: var(--first-color);
    font-size: var(--font-size-xl);
    line-height: 1.2;
    font-weight: 900;
}

.capabilities-cta {
    text-align: center;
    margin-top: 60px;
}

/* CTA in grid - fits in grid position without card wrapper */
.capability-cta-in-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    height: 250px;
    text-align: center;
}

.capability-cta-text {
    color: var(--third-color);
    font-size: var(--font-size-m);
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

.capability-cta-in-grid .btn-yellow {
    width: auto;
    margin: 0;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    width: 100%;
    align-items: stretch;
}

.capability-card {
    background-color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: visible;
    z-index: 10; /* Above honeycomb overlay (z-index: 2) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 250px;
}

/* Only flippable cards (with role="button") have interactive styles */
.capability-card[role="button"] {
    perspective: 1000px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Interactive cards only */
.capability-card[role="button"]:focus-visible {
    outline: 2px solid var(--first-color);
    outline-offset: 2px;
}

/* Card Peel Effect - Subtle Gray Folded Paper Corner */
.card-peel {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    z-index: 15;
    pointer-events: none;
    opacity: 0.55;
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease, box-shadow 0.3s ease;
}

/* Peel triangle shape with subtle gray gradient */
.card-peel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(220, 220, 220, 0.25) 0%,
        rgba(200, 200, 200, 0.22) 25%,
        rgba(240, 240, 240, 0.28) 50%,
        rgba(180, 180, 180, 0.2) 75%,
        rgba(160, 160, 160, 0.18) 100%
    );
    clip-path: polygon(100% 0, 100% 100%, 0 0);
    border-radius: 0 12px 0 0;
    box-shadow: 
        -1px 1px 2px rgba(0, 0, 0, 0.2),
        inset 0 0 4px rgba(255, 255, 255, 0.08);
}

/* Fold edge highlight with subtle gray */
.card-peel::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(250, 250, 250, 0.3) 0%,
        rgba(230, 230, 230, 0.25) 20%,
        rgba(255, 255, 255, 0.2) 35%,
        transparent 50%
    );
    clip-path: polygon(100% 0, calc(100% - 1.5px) 100%, 0 0);
    border-radius: 0 12px 0 0;
    filter: blur(0.8px);
}

/* Hover/Focus states - slightly more visible */
.capability-card[role="button"]:hover .card-peel,
.capability-card[role="button"]:focus-visible .card-peel {
    opacity: 0.75;
    width: 36px;
    height: 36px;
}

.capability-card[role="button"]:hover .card-peel::before,
.capability-card[role="button"]:focus-visible .card-peel::before {
    box-shadow: 
        -2px 2px 4px rgba(0, 0, 0, 0.25),
        inset 0 0 6px rgba(255, 255, 255, 0.12);
    background: linear-gradient(
        135deg,
        rgba(220, 220, 220, 0.3) 0%,
        rgba(200, 200, 200, 0.26) 25%,
        rgba(240, 240, 240, 0.32) 50%,
        rgba(180, 180, 180, 0.24) 75%,
        rgba(160, 160, 160, 0.22) 100%
    );
}

.capability-card[role="button"]:hover .card-peel::after,
.capability-card[role="button"]:focus-visible .card-peel::after {
    background: linear-gradient(
        135deg,
        rgba(250, 250, 250, 0.35) 0%,
        rgba(230, 230, 230, 0.3) 20%,
        rgba(255, 255, 255, 0.25) 35%,
        transparent 50%
    );
}


/* Card Inner Container for 3D Flip */
.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 600ms ease;
}

.capability-card.is-flipped .card-inner {
    transform: rotateY(180deg);
}

/* Card Front and Back Faces */
.card-front,
.card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    box-sizing: border-box;
}


.card-front {
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(180deg);
    background-color: #000000;
    border-radius: 12px;
    padding: 0 !important;
}

/* Card-back with images - extends to fill entire card, ignoring card padding (25px top/bottom, 20px left/right) */
.card-back:has(img) {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    display: block;
    position: absolute;
    top: -25px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 50px);
}

.card-back h3 {
    color: var(--first-color);
    font-size: var(--font-size-m);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.card-back p {
    color: #ffffff;
    font-size: var(--font-size-s);
    line-height: 1.6;
    margin: 0;
}

.card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 0;
    padding: 0;
}

.capability-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(253, 202, 11, 0.15),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 11;
    border-radius: 12px;
}

/* Hover effects only for interactive cards */
.capability-card[role="button"]:hover::before,
.capability-card[role="button"]:focus-visible::before {
    opacity: 1;
}

.capability-card[role="button"]:hover:not(.is-flipped),
.capability-card[role="button"]:focus-visible:not(.is-flipped) {
    background-color: #131313;
    border-color: rgba(253, 202, 11, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Photo cards don't have hover effects */
.capability-card.background-image-1:hover,
.capability-card.background-image-1:focus {
    transform: none;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.card-front h3,
.capability-card:not(.is-flipped) h3 {
    color: var(--first-color);
    font-size: var(--font-size-m);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    position: relative;
    z-index: 12;
}

.card-front p,
.capability-card:not(.is-flipped) p {
    color: #ffffff;
    font-size: var(--font-size-s);
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 12;
}


/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .card-inner {
        transition: none;
    }
    
    .capability-card {
        transition: border-color 0.1s ease, box-shadow 0.1s ease;
    }
    
    .capability-card[role="button"]:hover:not(.is-flipped),
    .capability-card[role="button"]:focus-visible:not(.is-flipped) {
        transform: none;
    }
}

/* Responsive Design */
@media (max-width: 1023px) {
    .capabilities-section {
        padding: 10vh 0;
    }

    .capabilities-container {
        padding: 0 30px;
    }

    .capabilities-title {
        margin-bottom: 60px;
    }

    .capabilities-title h2 {
        font-size: 3rem;
    }

    .capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .capability-card {
        padding: 20px 15px;
    }
    
    .card-front,
    .card-back {
        padding: 20px 15px;
    }

    .card-front h3,
    .card-back h3 {
        font-size: var(--font-size-m);
    }

    .card-front p,
    .card-back p {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 767px) {
    .capabilities-section {
        padding: 8vh 0;
    }

    .capabilities-container {
        padding: 0 20px;
    }

    .capabilities-title {
        margin-bottom: 50px;
    }

    .capabilities-title h2 {
        font-size: 2.5rem;
    }

    .capabilities-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .capability-card {
        padding: 20px 15px;
    }
    
    .card-front,
    .card-back {
        padding: 20px 15px;
    }

    .card-front h3,
    .card-back h3 {
        font-size: var(--font-size-m);
        margin-bottom: 15px;
    }

    .card-front p,
    .card-back p {
        font-size: var(--font-size-xs);
    }
}

/* Active state for capabilities navigation link */
.on-capabilities a {
    color: var(--first-color);
    font-weight: 900;
}
