/* Projects & Digital Marketing CSS */

/* Hero Carousel */
.hero-carousel-container {
    position: relative;
    height: 480px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    perspective: 1200px;
    margin-bottom: 2rem;
    overflow: visible;
}

.hero-carousel {
    position: relative;
    width: 360px;
    height: 456px;
    transform-style: preserve-3d;
}

.hero-carousel-card {
    position: absolute;
    width: 312px;
    height: 432px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    top: 50%;
    left: 50%;
    transform-origin: center center; /* better for the flip effect */
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s, z-index 0.6s;
    overflow: hidden;
    cursor: pointer;
    margin-left: -156px; /* half of width */
    margin-top: -216px; /* half of height */
    will-change: transform, opacity;
}

.hero-carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Prevent image drag */
}

/* Card states based on offset from active center card */
.hero-carousel-card[data-offset="-2"] {
    transform: translate(-260px, 50px) rotate(-15deg) scale(0.85);
    z-index: 1;
    opacity: 0.6;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.hero-carousel-card[data-offset="-1"] {
    transform: translate(-140px, 25px) rotate(-7.5deg) scale(0.92);
    z-index: 2;
    opacity: 0.85;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
.hero-carousel-card[data-offset="0"] {
    transform: translate(0, 0) rotate(0deg) scale(1.05);
    z-index: 5;
    opacity: 1;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}
.hero-carousel-card[data-offset="1"] {
    transform: translate(140px, 25px) rotate(7.5deg) scale(0.92);
    z-index: 2;
    opacity: 0.85;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
.hero-carousel-card[data-offset="2"] {
    transform: translate(260px, 50px) rotate(15deg) scale(0.85);
    z-index: 1;
    opacity: 0.6;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .hero-carousel-container {
        height: 300px;
    }
    .hero-carousel-card {
        width: 180px;
        height: 250px;
        margin-left: -90px;
        margin-top: -125px;
    }
    
    .hero-carousel-card[data-offset="-2"] {
        transform: translate(-100px, 30px) rotate(-15deg) scale(0.85);
    }
    .hero-carousel-card[data-offset="-1"] {
        transform: translate(-60px, 15px) rotate(-7.5deg) scale(0.92);
    }
    .hero-carousel-card[data-offset="0"] {
        transform: translate(0, 0) rotate(0deg) scale(1.05);
    }
    .hero-carousel-card[data-offset="1"] {
        transform: translate(60px, 15px) rotate(7.5deg) scale(0.92);
    }
    .hero-carousel-card[data-offset="2"] {
        transform: translate(100px, 30px) rotate(15deg) scale(0.85);
    }
}

/* Grid and Layouts */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    position: relative;
    border-radius: 16px;
    background: #fff;
    /* Remove padding to allow image to bleed to edges */
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 350px;
    overflow: hidden; /* Rounds the outer corners */
    box-shadow: inset 2px 2px 14.6px rgba(0, 0, 0, 0.11);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-media {
    position: relative;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
}

.card-media img,
.card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-media img {
    transform: scale(1.05);
}

/* The White Cutout (Notch) */
.notch-wrapper {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 190px;
    height: 70px;
    background: #fff; /* Matches page background to look like a cutout */
    border-top-left-radius: 20px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Inverted rounded corners for the fluid notch effect */
.notch-wrapper::before {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 25px;
    height: 25px;
    background: transparent;
    border-bottom-right-radius: 25px;
    box-shadow: 10px 10px 0 10px #fff;
    pointer-events: none;
}

.notch-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 100%;
    width: 25px;
    height: 25px;
    background: transparent;
    border-bottom-right-radius: 25px;
    box-shadow: 10px 10px 0 10px #fff;
    pointer-events: none;
}

/* The Button inside the Notch */
.btn-notch {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 20px;
    width: 166px;
    height: 46px; /* approximate button height */
    background: #0C3C01;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    text-align: center;
    color: #FFFFFF;
    text-decoration: none;
    z-index: 10;
    transition: background 0.3s ease, transform 0.2s ease;
    /* Optional glow matching Figma Rectangle 92 */
    box-shadow: 0 4px 10px rgba(91, 109, 73, 0.4);
}

.btn-notch:hover {
    background: #072501;
    transform: translateY(-2px);
}

/* Social Card */
.social-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    aspect-ratio: 1 / 1;
}

.social-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-card-content {
    padding: 20px;
    text-align: center;
}

.social-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* slightly lighter overlay */
    display: flex;
    align-items: center;
    justify-content: flex-end; /* align to the right */
    padding-right: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.social-icons {
    display: flex;
    flex-direction: column; /* Stack vertically */
    gap: 15px;
    transform: translateX(20px); /* Slide in from right */
    transition: transform 0.3s ease;
}

.social-icons a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
}

.social-icons a:hover {
    background: #28a745;
    color: #fff;
}

.social-card:hover .social-card-overlay {
    opacity: 1;
}

.social-card:hover .social-icons {
    transform: translateX(0); /* Slide to normal position */
}

/* Touch Device Fallback for Social Cards */
@media (hover: none) {
    .social-card-overlay {
        opacity: 1;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
        top: auto;
        height: 100px;
    }

    .social-icons {
        transform: none;
    }
}

/* Filters */
.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 8px 20px;
    border-radius: 25px;
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-filter.active,
.btn-filter:hover {
    background: #145a20; /* Darker green to match UI */
    color: #fff;
    border-color: #145a20;
}

/* Media Elements */
.media-element {
    width: 100%;
    border-radius: 8px;
    max-height: 500px;
    object-fit: cover;
}

.youtube-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Project Detail Hero */
.project-detail-hero .hero-media-wrapper {
    max-height: 60vh;
    overflow: hidden;
}

.project-detail-hero .hero-media-wrapper img,
.project-detail-hero .hero-media-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

/* Utilities */
.bg-light {
    background-color: #f8f9fa;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

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

.text-muted {
    color: #6c757d;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.w-100 {
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #28a745;
    color: white;
}

.btn-primary:hover {
    background-color: #218838;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-outline-primary {
    border: 2px solid #28a745;
    color: #28a745;
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: #28a745;
    color: white;
}

/* Flexbox Grid (Simple) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-6 {
    width: 50%;
    padding: 0 15px;
}

.col-md-8 {
    width: 66.666%;
    padding: 0 15px;
}

.justify-content-center {
    justify-content: center;
}

.flex-md-row-reverse {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {

    .col-md-6,
    .col-md-8 {
        width: 100%;
    }

    .flex-md-row-reverse {
        flex-direction: column;
    }

    .text-content {
        margin-bottom: 20px;
    }

    .filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Project Sections Styling (Figma match) */
.project-section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #000;
}

.project-section .content-body {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4a4a4a;
}

.project-section .media-content {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.project-section .media-content img, 
.project-section .media-content video {
    width: 100%;
    display: block;
}

.layout-text_left_media_right .text-content {
    padding-right: 5%;
}

.layout-media_left_text_right .text-content {
    padding-left: 5%;
}