/* Project Page Layout - General structure for all folder items */

/* CSS Custom Properties - Comprehensive Design System */
:root {
  /* Color System */
  --color-primary: #FF7DCB;
  --color-primary-light: #FFBBC1;
  --color-primary-lighter: #FFCCF1;
  --color-primary-dark: #EA2CFF;
  --color-background: #FFF5F8;
  --color-background-light: #FCDFE3;
  --color-background-lighter: #FCE8FF;
  --color-text: #000000;
  --color-text-muted: #666666;
  --color-text-light: #9e9e9e;
  --color-text-white: #ffffff;
  --color-border: #e9ecef;
  --color-border-light: #d1d1d1;
  --color-accent: #3b4eff;
  --color-accent-light: #f8f9fa;
  --color-accent-muted: #6c757d;
  
  /* Spacing System */
  --space-xs: 0.25rem;    /* 4px */
  --space-sm: 0.5rem;     /* 8px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  
  /* Typography */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  
  /* Shadows */
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 0 25px 35px rgba(255, 125, 203, 0.15);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.3);
  --shadow-lightbox: 0 20px 40px rgba(0, 0, 0, 0.3);
  
  /* Project Page Specific */
  --flower-height: 6em;
  --flower-margin-top: 2rem;
  --flower-margin-bottom: 1.5rem;
  --flower-min-dimension: 10px; /* Minimum valid dimension for flower elements */
  --image-container-border-radius: var(--border-radius-lg); /* Border radius for upper corners of main image container */
  --title-padding-vertical: 2px; /* Vertical padding for title container */
  --title-padding-horizontal: 4px; /* Horizontal padding for title container */
  --wrapper-image-border-radius: 6px; /* Border radius for image wrapper */
  --title-border-radius: 4px; /* Border radius for title container */
  --image-title-gap: var(--space-md); /* 16px gap between image and title */
  
  /* Animation Timing System */
  --animation-fast: 100ms;
  --animation-medium: 200ms;
  --animation-medium-fast: 400ms;
  --animation-smooth: 300ms;
  --animation-slow: 500ms;
  --animation-slow-plus: 700ms;
  --animation-very-slow: 800ms;
  --animation-slow-plus-plus: 900ms;
  --animation-very-slow-plus: 1000ms;
  --animation-very-slow-plus-plus: 1100ms;
  
  /* Easing Functions */
  --ease-out-cubic: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-back: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Transition Presets */
  --transition-fast: 0.15s var(--ease-out-cubic);
  --transition-smooth: 0.3s var(--ease-out-cubic);
  --transition-slow: 0.5s var(--ease-in-out);
  
  /* Animation Factors */
  --velocity-damping: 0.95;
  --lerp-factor: 0.05;
  --scroll-multiplier: 0.25;
}

/* Flower logo styles - Using .flower class with custom implementation */

.project-page-container {
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--color-background-light) 0%, var(--color-background) 25%);
    position: relative;
}

/* Allow scrolling but prevent page-level scroll behavior */
body.project-page {
    /* Calculate height dynamically based on content - will be set by JavaScript */
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.project-name {
    font-family: 'ABC Diatype', sans-serif;
    font-size: clamp(2.5rem, 12vw, 18vw);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    word-wrap: normal;
    overflow-wrap: normal;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    padding: 0;
    box-sizing: border-box;
    text-align: left;
    width: 100%;
}

.project-intro {
    font-family: 'ABC Diatype', sans-serif;
    font-size: var(--font-size-lg);
    color: var(--color-text);
    max-width: 100%;
    margin-top: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: left;
    width: 100%;
}

.image-list {
    list-style: none;
    padding: calc(var(--flower-height) + var(--space-md)) var(--space-lg) var(--space-lg) var(--space-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: var(--space-lg);
    align-items: start;
    justify-content: center;
}

.image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--image-title-gap); /* 16px gap between wrapper image and title */
    transition: all var(--transition-fast);
    cursor: pointer;
    padding: 0;
    position: relative;
}

.image .wrapper-image {
    flex-shrink: 0;
    width: 245px; /* Fixed dimensions */
    height: 210px; /* Fixed dimensions */
    padding: var(--space-sm);
    border-radius: var(--wrapper-image-border-radius); /* 6px border radius */
    transition: all var(--transition-fast);
}

.image .wrapper-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: var(--space-sm) solid white;
    filter: drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.1));
    background-color: var(--color-background-lighter);
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

/* Hover effects */
.image:hover .wrapper-image {
    background-color: rgba(29, 28, 29, 0.06); /* Subtle dark overlay */
    border-radius: var(--wrapper-image-border-radius); /* Use our 6px variable */
    transition: all var(--transition-fast);
}

.image:hover .title span {
    background-color: rgba(29, 28, 29, 0.06); /* Subtle dark overlay */
    border-radius: var(--title-border-radius); /* Use our 4px variable */
    display: inline-block;
    transition: all var(--transition-fast);
}

/* Title styles */
.image .title {
    text-align: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0; /* Ensure no top margin interferes with gap */
    margin-bottom: 0; /* Ensure no bottom margin interferes with gap */
    position: relative;
}

.image .title span {
    font-size: var(--font-size-lg);
    color: var(--color-text);
    font-weight: 400;
    transition: all var(--transition-fast);
    padding: 0 var(--title-padding-horizontal); /* 0 vertical, 4px horizontal - removed vertical padding to prevent position shift */
    border-radius: var(--title-border-radius); /* 4px border radius */
}

/* PROJECT CONTENT AREA - Clear, defined styling */
.project-content-area {
  margin: 0;
  padding: 2rem; /* Standard 2rem padding on all sides */
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg); /* 24px spacing between description and credits */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  height: var(--content-area-height, 100vh); /* Use calculated height from JavaScript */
  overflow: visible;
  box-sizing: border-box;
}



/* Project text block styling */
.project-text-block {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Make description expand to fill available space */
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Link styling within project descriptions */
.project-description a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

.project-description a:hover {
  color: var(--color-primary);
}

.project-description {
  font-family: 'Editorial Old', sans-serif;
  font-weight: 25;
  font-variation-settings: 'wght' 25;
  line-height: 1.5; /* Increased from 0.75 to 1.5 for better readability */
  color: var(--color-text);
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
  text-indent: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* Ensure no layout shifts during slant */
  position: relative;
  /* Ensure proper word wrapping */
  word-break: normal;
  white-space: normal;
  /* Ensure text respects container boundaries */
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}



/* Individual letter styling for project descriptions - override conflicting .letter rules */
.project-description .letter {
  display: inline-block;
  /* Removed transition to allow JavaScript to control slant changes */
  letter-spacing: normal;
  opacity: 1;
  animation: none;
  /* Prevent layout shifts during slant */
  position: relative;
  transform-origin: left center;
  /* Ensure no unwanted spacing */
  margin: 0;
  padding: 0;
}

/* Word container styling - prevents word breaking */
.project-description .word {
  display: inline-block;
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

/* Empty line break styling - creates visual separation between paragraphs */
.empty-line-break {
  height: 0.6em; /* Reduced from 1.2em to be more reasonable */
  margin: 0;
  padding: 0;
  /* Ensure this doesn't participate in any slanting effects */
  pointer-events: none;
}

/* Ensure first letter has no left margin */
.project-description .letter:first-child {
  margin-left: 0;
  padding-left: 0;
}



/* Project credits styling */
.project-credits {
  margin: 0;
  padding: 0;
  width: 100%;
}

.credits-text {
  font-family: 'ABC Diatype', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  color: var(--color-text);
  text-align: left;
  opacity: 0.8;
  transition: font-variation-settings var(--animation-smooth) ease-out;
  position: relative;
}



/* Project images styling */
.project-images {
  margin-top: var(--space-xl);
}

.project-images img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-subtle);
}



/* Project Images Work Container - Exact copy of home page work container */
.project-images-section {
  position: absolute;
  left: 0; /* Explicit left positioning like homepage work-section */
  right: 0; /* Explicit right positioning like homepage work-section */
  /* top position will be set dynamically by JavaScript based on flower dimensions */
  background-color: rgba(254, 243, 249, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-style: none;
  z-index: 1001;
  border-top-left-radius: var(--image-container-border-radius);
  border-top-right-radius: var(--image-container-border-radius);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-medium);
  /* Remove width: 100% since left: 0 + right: 0 handles the width */
  padding: 0; /* No padding - children handle their own spacing */
  overflow-x: hidden;
  overflow-y: hidden;
  /* Hide scrollbar for macOS */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
  /* Disable browser back/forward gestures */
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
  
  /* Debug: Current position is relative, not absolute like homepage */
  /* This might be causing the scroll behavior difference */
}

/* Animation coordination support */
.project-images-section.animation-paused {
  transition: none;
}

.project-images-section::-webkit-scrollbar {
  display: none;
}

/* Quick Look Style Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    pointer-events: none;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: var(--shadow-strong);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
      background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: var(--font-size-2xl);
  width: var(--space-3xl);
  height: var(--space-3xl);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--animation-medium) cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Make project images clickable - more specific to avoid conflicts */
.image .wrapper-image img {
    cursor: pointer;
}

/* Popup Configuration - CSS Custom Properties */
:root {
    --popup-z-index: 10000;
    --popup-min-width: 400px;
    --popup-border-radius: 12px;
    --popup-bg-color: #f4f4f4;
    --popup-nav-padding: 15px 30px;
    --popup-button-size: 16px;
    --popup-button-margin: 5px;
    --popup-button-group-left: 15px;
    --popup-button-group-top: 22px;
    --popup-drag-area-left: 60px;
    --popup-drag-area-right: 60px;
    --popup-close-color: #ff5f57;
    --popup-button-disabled-color: #d1d1d1;
    --popup-shadow: 0 0 0.5rem rgba(0,0,0,0.2);
    --popup-image-padding: 20px; /* macOS Preview-style padding around images */
}

/* macOS Style Image Center Popup - Completely Self-Contained */
.image-center-popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--popup-z-index, 10000);
    /* Self-contained scrolling - never affects body */
    overflow: hidden;
    width: auto;
    min-width: var(--popup-min-width, 400px);
    min-height: 300px; /* Ensure minimum height for content visibility */
    padding: 0;
    border-radius: var(--popup-border-radius, 12px);
    -webkit-filter: drop-shadow(var(--popup-shadow, 0 0 0.5rem rgba(0,0,0,0.2)));
    filter: drop-shadow(var(--popup-shadow, 0 0 0.5rem rgba(0,0,0,0.2)));
    background-color: var(--popup-bg-color, #f4f4f4);
    /* Create isolated stacking context */
    transform-style: preserve-3d;
    /* Prevent any layout impact on other elements */
    contain: layout style paint;
    /* macOS Preview structure: separate navigation and content areas */
    flex-direction: column;
    /* Ensure popup is visible when active */
    visibility: visible;
    opacity: 1;
}



.image-center-popup .popup-nav {
    background-color: var(--popup-bg-color, #f4f4f4);
    padding: var(--space-md) var(--space-xl);
    text-align: center;
    border-top-left-radius: var(--popup-border-radius, 12px);
    border-top-right-radius: var(--popup-border-radius, 12px);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-center-popup .popup-nav:active {
    cursor: grabbing;
}

.image-center-popup .popup-nav .wrapper-actions {
    position: absolute;
    left: var(--popup-button-group-left, 15px);
    overflow: auto;
    width: auto;
    padding: 0;
    display: inline-block;
}

/* Draggable area - excludes corners like native macOS */
.image-center-popup .popup-nav .draggable-area {
    position: absolute;
    left: var(--popup-drag-area-left, 60px); /* Right of the buttons */
    right: var(--popup-drag-area-right, 60px); /* Left of the right edge */
    top: 0;
    height: 100%;
    cursor: grab;
    pointer-events: auto;
    z-index: 1; /* Lower than resize handles */
}

.image-center-popup .popup-nav .popup-actions {
    float: left;
    border: 1px solid #000;
    height: var(--popup-button-size, 16px);
    width: var(--popup-button-size, 16px);
    font-size: 0;
    padding: 0;
    margin: 0 var(--popup-button-margin, 5px) 0 0;
    border-radius: 100%;
    cursor: pointer;
}

.image-center-popup .popup-nav .popup-actions.popup-minimise,
.image-center-popup .popup-nav .popup-actions.popup-expand {
    cursor: default;
}

.image-center-popup .popup-nav .popup-actions.popup-expand {
    background-color: var(--popup-button-disabled-color, #d1d1d1);
    border-color: var(--popup-button-disabled-color, #d1d1d1);
}

.image-center-popup .popup-nav .popup-actions.popup-minimise {
    background-color: var(--popup-button-disabled-color, #d1d1d1);
    border-color: var(--popup-button-disabled-color, #d1d1d1);
}

.image-center-popup .popup-nav .popup-actions.popup-close {
    position: relative;
      background-color: var(--popup-close-color, #ff5f57);
  border-color: var(--popup-close-color, #ff5f57);
}

.image-center-popup .popup-nav .popup-actions.popup-close:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: auto;
    width: auto;
    color: #000;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.image-center-popup .popup-nav .popup-actions.popup-close:hover:after {
    content: '×';
    opacity: 1;
}

.image-center-popup img {
    margin: 0 10px 10px;
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 130px);
    height: auto;
}

@media (min-width: 992px) {
    .image-center-popup img {
        height: calc(100vh - 130px);
    }
}

/* Show popup when active - Self-contained */
.image-center-popup.active {
    display: block;
    animation: popupEnter var(--animation-medium-fast) cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Prevent body scroll without changing body properties */
    /* This creates a scroll lock effect only for the popup */
    z-index: 10000;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Popup closing state - Self-contained animation */
.image-center-popup.closing {
    animation: popupExit var(--animation-medium-fast) cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Popup dragging state - Disable animations during drag */
.image-center-popup.dragging {
    animation: none;
    transition: none;
}

/* Popup resizing state - Disable animations during resize */
.image-center-popup.resizing {
    animation: none;
    transition: none;
}





/* Prevent transform conflicts when popup has been positioned by dragging */
.image-center-popup[style*="left"] {
    transform: none;
}

/* Prevent flickering when transitioning from dragging to normal state */
.image-center-popup.active[style*="left"]:not(.closing) {
    animation: none;
    opacity: 1;
    visibility: visible;
}

/* Ensure dragged popup stays visible and positioned during class changes */
.image-center-popup.active[style*="left"] {
    display: block;
}

/* Smooth GPU-accelerated interactions */
.image-center-popup {
    /* Enable GPU acceleration */
    will-change: transform, width, height;
    /* No transitions to avoid conflicts with dragging and resizing */
    /* Transitions are only applied during specific states when needed */
}

/* Prevent body scroll when popup is active - CSS-only approach */


/* Popup animation keyframes - Only apply transform during open/close, not during drag */
@keyframes popupEnter {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes popupExit {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.02);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
}



/* RESIZE ZONE: Image container - macOS Preview content area */
.popup-image-container {
    position: relative;
    overflow: visible; /* Allow image to extend beyond container if needed */
    width: 100%;
    /* macOS Preview: Take remaining space after navigation bar */
    height: calc(100% - 60px); /* Explicitly calculate height: popup height - navigation bar height */
    display: flex;
    align-items: center;
    justify-content: center;
    /* macOS Preview-style padding around the image */
    padding: var(--popup-image-padding, 20px);
    box-sizing: border-box;
    /* Ensure minimum height for content visibility */
    min-height: 200px;
}

/* TEXT POPUP: Text content area - macOS Text Editor style */
.popup-text-container {
    position: relative;
    overflow: auto; /* Allow scrolling for long text */
    width: 100%;
    /* Take remaining space after navigation bar */
    height: calc(100% - 60px); /* popup height - navigation bar height */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* macOS Text Editor: Clean white background */
    background-color: #ffffff;
    /* Ensure minimum height for content visibility */
    min-height: 200px;
}

/* Text content area with proper padding */
.popup-text-content {
    flex: 1;
    padding: var(--space-xl); /* 32px padding using our design system */
    box-sizing: border-box;
    /* Typography using our design system */
    font-family: inherit;
    line-height: 1.6;
    color: var(--color-text);
    /* Smooth scrolling */
    overflow-y: auto;
}

/* Text popup specific styling */
.popup-text-content h1,
.popup-text-content h2,
.popup-text-content h3 {
    margin: 0 0 var(--space-md) 0;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}

.popup-text-content p {
    margin: 0 0 var(--space-md) 0;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text);
}

.popup-text-content p:last-child {
    margin-bottom: 0;
}

/* Text popup state management */
.image-center-popup[data-popup-type="text"] .popup-image-container {
    display: none; /* Hide image container for text popups */
}

.image-center-popup[data-popup-type="text"] .popup-text-container {
    display: flex; /* Show text container for text popups */
}

/* Default state: show image container, hide text container */
.popup-image-container {
    display: flex;
}

.popup-text-container {
    display: none;
}

/* Ensure image scales properly within container */
.popup-image-container picture {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-image-container img {
    /* macOS Preview behavior: image scales within container while maintaining padding */
    max-width: calc(100% - 40px); /* Constrain to container size minus padding (20px on each side) */
    max-height: calc(100% - 40px); /* Constrain to container size minus padding (20px on each side) */
    width: auto;
    height: auto;
    object-fit: contain; /* Maintain aspect ratio within container */
    display: block;
}

/* RESIZE HANDLES: Four corner resize areas - positioned relative to popup container */
.resize-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 10001;
    pointer-events: auto;
}

.resize-handle-nw {
    top: 0;
    left: 0;
    cursor: nw-resize;
}

.resize-handle-ne {
    top: 0;
    right: 0;
    cursor: ne-resize;
}

.resize-handle-sw {
    bottom: 0;
    left: 0;
    cursor: sw-resize;
}

.resize-handle-se {
    bottom: 0;
    right: 0;
    cursor: se-resize;
}

/* NAVIGATION ZONES: Left/right image navigation (isolated) */
.popup-nav-left,
.popup-nav-right {
    position: absolute;
    top: var(--space-3xl); /* Below the navigation bar */
    height: calc(100% - var(--space-3xl));
    width: var(--space-3xl);
    z-index: 9999;
    pointer-events: auto;
    transition: background-color var(--animation-medium) ease;
}

.popup-nav-left {
    left: 0;
    cursor: w-resize;
}

.popup-nav-right {
    right: 0;
    cursor: e-resize;
}

/* Video Component Styles */
.video {
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-smooth);
}

.video:hover {
    transform: scale(1.02);
}

.wrapper-iframe {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 8px;
}

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

.responsive-iframe {
    position: relative;
    width: 100%;
    height: 100%;
}

.responsive-iframe.landscape {
    aspect-ratio: 16/9;
}

.responsive-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.video .title {
      margin-top: var(--space-md);
  font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-weight: 500;
}

.video .action {
    margin-top: var(--space-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Video popup styles */
.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.video-popup.active {
    opacity: 1;
    visibility: visible;
}

.video-popup-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
}

.video-popup iframe {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-lightbox);
}

.video-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
      font-size: var(--font-size-2xl);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--space-xs);
    transition: background-color var(--animation-medium) ease;
}

.video-popup-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Flower Logo */
.flower {
    display: inline-block;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--flower-height);
    height: var(--flower-height);
    cursor: pointer;
    animation-duration: 1s;
    transition: 2s ease-in-out transform;
    animation-fill-mode: both;
}

.flower[logo]:after {
    transition: background 1s;
    background: var(--color-background-lighter);
}

.flower[logo] .top:before,
.flower[logo] .top:after,
.flower[logo] .bottom:before,
.flower[logo] .bottom:after {
    transition: background 1s;
    background: var(--color-primary);
}

.flower:after {
    content: "";
    display: inline-block;
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    background: var(--color-background-lighter);
    position: absolute;
    border-radius: 100%;
    pointer-events: none;
}

.flower .top,
.flower .bottom {
    width: 100%;
    height: 100%;
    position: absolute;
}

.flower .top:before,
.flower .top:after,
.flower .bottom:before,
.flower .bottom:after {
    content: "";
    display: inline-block;
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: var(--color-primary);
    border-radius: 100%;
    animation-duration: 1s;
    animation-fill-mode: both;
}

.flower[intro] .top:before,
.flower[intro] .top:after,
.flower[intro] .bottom:before,
.flower[intro] .bottom:after {
    animation-direction: normal;
    animation-delay: 1.25s;
}

.flower[intro] .top:before {
    animation-name: topLeft;
}

.flower[intro] .top:after {
    animation-name: topRight;
}

.flower[intro] .bottom:before {
    animation-name: bottomLeft;
}

.flower[intro] .bottom:after {
    animation-name: bottomRight;
}

.flower[outro] .top:before {
    animation-name: topLeftOut;
}

.flower[outro] .top:after {
    animation-name: topRightOut;
}

.flower[outro] .bottom:before {
    animation-name: bottomLeftOut;
}

.flower[outro] .bottom:after {
    animation-name: bottomRightOut;
}

.flower-logo {
    top: 0;
    left: calc(50% - var(--flower-height/2));
    z-index: 20;
    animation: scaleUp 1s;
    animation-fill-mode: forwards;
}

/* Hover effect */
a.logo {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: all;
  text-align: center
}

a.logo:hover {
  border-bottom: none;
  animation: rotate 1s;
}

/* Keyframes */
@keyframes fadeIn {
  0% {
      transform: translate(-1%)
  }

  100% {
      transform: translate(0%)
  }
}

@keyframes fadeOut {
  0% {
      transform: translate(0%)
  }

  100% {
      transform: translate(-1%)
  }
}

@keyframes scaleUp {
    0% {
        transform: scale(0%, 0%) rotate(0);
    }

    100% {
        transform: scale(100%, 100%) rotate(1turn);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes topLeft {
    0% {
        transform: translate(0%, 0%);
    }

    100% {
        transform: translate(-50%, 50%);
    }
}

@keyframes bottomLeft {
    0% {
        transform: translate(0%, 0%);
    }

    100% {
        transform: translate(-50%, -50%);
    }
}

@keyframes topRight {
    0% {
        transform: translate(0%, 0%);
    }

    100% {
        transform: translate(50%, 50%);
    }
}

@keyframes bottomRight {
    0% {
        transform: translate(0%, 0%);
    }

    100% {
        transform: translate(50%, -50%);
    }
}

@keyframes scaleDown {
    0% {
        transform: scale(100%, 100%) rotate(1turn);
    }

    100% {
        transform: scale(0%, 0%) rotate(0);
    }
}

@keyframes topLeftOut {
    0% {
        transform: translate(-50%, 50%);
    }

    100% {
        transform: translate(0%, 0%);
    }
}

@keyframes bottomLeftOut {
    0% {
        transform: translate(-50%, -50%);
    }

    100% {
        transform: translate(0%, 0%);
    }
}

@keyframes topRightOut {
    0% {
        transform: translate(50%, 50%);
    }

    100% {
        transform: translate(0%, 0%);
    }
}

@keyframes bottomRightOut {
    0% {
        transform: translate(50%, -50%);
    }

    100% {
        transform: translate(0%, 0%);
    }
}

