/* core/static/core/assets/css/gallery.css */
*{
	box-sizing: border-box;	
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 5px 0;
}

p {
 	margin: 0 0 20px 0;
}

/* Wrapper: keeps gallery centered & contained */
.gallery-wrapper {
    max-width: 670px;   /* adjust as needed */
    margin: 0 auto;      /* center horizontally */
    padding: 0 12px;     /* small side padding */
    position: relative; /* ensures CTA positions relative to this */

}

/* Keep your existing .third rules */
.third {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    height: auto;
    grid-auto-flow: dense;
	position: relative;
    perspective: 1000px;
	perspective-origin: center;
}

.item_third{
	overflow: hidden;
	display: grid;
	grid-template-columns: 1;
	grid-template-rows: 1;
	
}

.item_third {
  backface-visibility: hidden;
  will-change: transform;
}

.item_third img {
  backface-visibility: hidden;
}

.item_third:first-child {
  transform: rotateY(20deg); 
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}


.item_third:first-child:hover {
  transform: rotateY(0deg);
}



.item_third:nth-child(2) {
  transform: scale(0.9);
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  backface-visibility: hidden;
  opacity: 0.9;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.item_third:nth-child(2):hover {
  transform: scale(1);
  opacity: 1;
}

.item_third:nth-child(3) {
  transform: scale(1) ;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.item_third:nth-child(4) {
  transform: scale(1); 
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.item_third:nth-child(3):hover {
  transform: scale(1.1);
}

.item_third:nth-child(4):hover {
  transform: scale(1.1);
}

.item_third img{
	grid-column: 1/ -1;
	grid-row: 1/ -1;
	width: 100%;
	height: 100%;
}


.item_third.h1{
	grid-column: span 1;
}


.overlay_third{
	position: fixed;
	background: rgba(0, 0, 0, 0.7);
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: none;
	z-index: 2;
}

.overlay_third.open{
	display: grid;
	align-items: center;
	justify-items: left;
	padding: 10px;
}

.overlay_third-inner {
	background: #fff;
	width: 100%;
    max-width: 100%;
    padding: 1px;
    margin-top: 55px;
    border-radius: 0;
}

.overlay_third img {
 	width: 100%;
    height: 300px;
	max-height: 666px;
    /* object-fit: cover; */
    border-radius: 0;
    z-index: 3;
	position: relative;
}

.item_third__overlay .view{
	color: #fff;
    background-color: #fff;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    transition-property: background-color,border-color,color,box-shadow,filter;
    transition-duration: .6s;
    letter-spacing: 3px;
    min-width: auto;
    text-transform: capitalize;
    white-space: normal;
 	outline: 0;
}

section#login_galleryThird_Section {
	overflow: visible;
    overflow-x: clip;
}

#login_galleryThird_Section .third {
  position: relative;
  z-index: 1;
}


.text-shadow {
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.animate-slide-up {
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 1s forwards 0.5s;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Animated Gradient Overlay */
.hero-gradient-overlay {
    background: linear-gradient(135deg, #6a11cb, #2575fc, #ff416c, #ff8c00);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: 0;
    opacity: 0.7;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Skill Bubbles */
.skill-bubbles {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

.skill-bubbles .bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.4rem 0.7rem;
    border-radius: 50px;
    font-size: 0.85rem;
    white-space: nowrap;
    animation: floatBubble linear infinite;

    border: 1px solid rgba(255,255,255,0.3); /* optional glow/border */
    backdrop-filter: blur(2px); /* optional frosted look */
}

@keyframes floatBubble {
    0% { transform: translateY(100vh) scale(0.5); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

/* .skill-bubbles .bubble {
    background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb);
    background-size: 200% 200%;
    animation: floatBubble linear infinite, bubbleGradient 5s ease infinite;
}

@keyframes bubbleGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
} */


/* Hero text animations */
.animate-slide-up {
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 1s forwards;
}
.animate-slide-up.delay-1 { animation-delay: 0.3s; }
.animate-slide-up.delay-2 { animation-delay: 0.6s; }

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* CTA button hover effect */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0,0,0,0.35);
}

/* Text shadow for readability */
.text-shadow {
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}




/* Mobile (≤ 575px) */
@media screen and (max-width: 575px) {
    .third {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        max-height: 90vh; 
        overflow: visible;
        align-content: start; 
    }

    .third .item_third {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }

    .third .item_third img.cover {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Instagram-like */
    }

    /* Featured tall item */
    .item_third.v1 {
        grid-row: span 13;      /* taller than normal */
        min-height: 20vh;       
        margin-top: auto;       /* pushes it downward in the grid */
        margin-bottom: auto;       /* lock it at bottom */
    }
}


/* Small tablets (576px – 766px) */
@media (min-width: 576px) and (max-width: 766px) {
    .third {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        height: auto;
        max-height: none;

        justify-content: center;
        max-width: 600px;
        margin: 0 auto;
    }

    .third .item_third {
        width: 100%;
        height: auto;
    }

    .third .item_third img.cover {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

/* Tablets & up (≥ 767px, covers up to 991px and beyond until next breakpoint) */
@media (min-width: 767px) {
    .third {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
        gap: 12px;
        justify-content: center;
        max-width: 600px;
        margin: 0 auto;
    }

    .third .item_third {
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }

    .third .item_third img.cover {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}


/* Large screens (≥ 992px) */
@media (min-width: 992px) {
    .third {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        height: auto;
        max-height: none; /* no restriction */
    }

    .third .item_third {
        position: relative;
        width: 100%;
        height: auto;
        background:#fff;
    }

    .third .item_third img.cover {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}
