/*
Theme Name: Aim High LLC
Theme URI: https://weaimhighllc.com/
Author: Elvis Ryan J. Millan
Author URI: https://ermillan.xyz/portfolio/
Description: A fully customizable WordPress theme with widget support and post thumbnails.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: customizable-theme
Tags: custom-background, custom-logo, custom-menu, featured-images, theme-options, elvis-ryan-millan
*/

@layer components {
  .go-up-btn {
    @apply fixed bottom-6 right-6 z-50 hidden p-3 rounded-full bg-primary text-white shadow-lg hover:bg-primary-dark transition duration-300;
  }
}


@layer components {
  .everest-forms input,
  .everest-forms textarea {
    @apply w-full rounded-md border-gray-300 shadow-sm focus:ring-orange-500 focus:border-orange-500;
  }

  .everest-forms label {
    @apply block text-sm font-medium text-gray-700;
  }

  .everest-forms button[type="submit"] {
    @apply bg-orange-500 text-white px-4 py-2 rounded-md hover:bg-orange-600;
  }
}


/* Main navigation styling */
#main-nav li {
    position: relative;
}

#main-nav .menu-item-container {
    position: relative;
}

/* Submenu styling */
#main-nav .sub-menu {
    position: absolute;
    min-width: 200px;
    top: 100%;
    left: 0;
    opacity: 0;
    visibility: hidden;
    background-color: #ffffff;
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    z-index: 999;
}

/* Show submenu on hover */
#main-nav li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
}

/* Submenu links */
#main-nav .sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #4a5568; /* gray-700 */
    text-decoration: none;
    transition: all 0.2s ease;
}

#main-nav .sub-menu a:hover {
    background-color: #edf2f7; /* gray-100 */
    color: #2d3748; /* gray-800 */
}

/* Position sub-submenus to the right */
#main-nav .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 0.01rem; /* small space between levels */
    border-radius: 0.375rem;
}

/* Ensure sub-submenus also show on hover */
#main-nav .sub-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
}



/* Mobile menu adjustments */
@media (max-width: 767px) {
    #main-nav .sub-menu {
        position: static;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none;
        width: 100%;
        background-color: transparent;
    }

    #main-nav .sub-menu a {
        padding-left: 2rem; /* Indent submenus */
    }

    #main-nav .sub-menu .sub-menu a {
        padding-left: 3rem; /* Deeper indentation for nested levels */
    }

    #main-nav .sub-menu .sub-menu .sub-menu a {
        padding-left: 4rem;
    }

    /* Animate arrow icon on hover */
    #main-nav li.menu-item-has-children > a i {
        transition: transform 0.3s ease;
    }

    /* Rotate arrow to the right when submenu is visible */
    #main-nav li:hover > a i {
        transform: rotate(-90deg); /* rotate to point right */
    }

}

/* For Header */

@layer components {
	  /* Navigation Effects */
	  .nav-link {
		@apply relative after:absolute after:bottom-0 after:left-0 after:h-0.5 after:w-0 after:bg-primary after:transition-all after:duration-300 hover:after:w-full;
	  }

	  .sticky-nav {
		@apply fixed top-0 left-0 right-0 z-50 transition-all duration-300 shadow-md bg-white/90 backdrop-blur-sm;
	  }

	  .hero-slide {
		@apply absolute inset-0 opacity-0 transition-all duration-1000;
	  }

	  .hero-slide.active {
		@apply opacity-100;
	  }

	  /* Everest Forms */
	  .everest-forms input,
	  .everest-forms textarea {
		@apply w-full rounded-md border-gray-300 shadow-sm focus:ring-orange-500 focus:border-orange-500;
	  }

	  .everest-forms label {
		@apply block text-sm font-medium text-gray-700;
	  }

	  .everest-forms button[type="submit"] {
		@apply bg-orange-500 text-white px-4 py-2 rounded-md hover:bg-orange-600;
	  }

	  /* Image hover effect */
	  .gallery-image {
		@apply rounded-lg shadow transition-transform duration-300 hover:scale-105;
	  }

	  .image-caption {
		@apply text-sm text-gray-500 italic mt-1;
	  }

	  .swiper-container {
		@apply rounded-lg overflow-hidden mb-12;
	  }

	  .swiper-slide img {
		@apply w-full object-cover;
	  }

	  .post-article {
		@apply bg-white rounded-xl shadow-md overflow-hidden;
	  }

	  .post-padding {
		@apply p-6 md:p-10;
	  }

	  .post-title {
		@apply text-2xl md:text-3xl font-extrabold text-gray-800 mb-4;
	  }

	  .post-meta {
		@apply text-sm text-gray-500 mb-6;
	  }

	  .post-prose {
		@apply prose max-w-none prose-gray mb-10;
	  }

	  .figure-full {
		@apply col-span-full;
	  }

	  .page-container {
		@apply container mx-auto px-4;
	  }
	}

	/* Navigation - Submenu */
	#main-nav li,
	#main-nav .menu-item-container {
	  position: relative;
	}

	#main-nav .sub-menu {
	  position: absolute;
	  min-width: 200px;
	  top: 100%;
	  left: 0;
	  opacity: 0;
	  visibility: hidden;
	  background-color: #fff;
	  border-radius: 0.375rem;
	  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
				  0 4px 6px -2px rgba(0, 0, 0, 0.05);
	  transition: all 0.3s ease;
	  z-index: 999;
	}

	#main-nav li:hover > .sub-menu,
	#main-nav .sub-menu li:hover > .sub-menu {
	  opacity: 1;
	  visibility: visible;
	}

	#main-nav .sub-menu a {
	  display: block;
	  padding: 0.5rem 1rem;
	  color: #4a5568;
	  text-decoration: none;
	  transition: all 0.2s ease;
	}

	#main-nav .sub-menu a:hover {
	  background-color: #edf2f7;
	  color: #2d3748;
	}

	#main-nav .sub-menu .sub-menu {
	  top: 0;
	  left: 100%;
	  margin-left: 0.01rem;
	  border-radius: 0.375rem;
	}

	/* Mobile Menu */
	@media (max-width: 767px) {
	  #main-nav .sub-menu {
		position: static;
		opacity: 1 !important;
		visibility: visible !important;
		box-shadow: none;
		width: 100%;
		background-color: transparent;
	  }

	  #main-nav .sub-menu a {
		padding-left: 2rem;
	  }

	  #main-nav .sub-menu .sub-menu a {
		padding-left: 3rem;
	  }

	  #main-nav .sub-menu .sub-menu .sub-menu a {
		padding-left: 4rem;
	  }

	  #main-nav li.menu-item-has-children > a i {
		transition: transform 0.3s ease;
	  }

	  #main-nav li:hover > a i {
		transform: rotate(-90deg);
	  }
	}

	/* Hero Banner */
	.hero-banner {
	  position: relative;
	  width: 100%;
	  height: 16rem;
	  overflow: hidden;
	  margin-bottom: 2rem;
	}

	@media (min-width: 768px) {
	  .hero-banner {
		height: 20rem;
	  }
	}

	@media (min-width: 1024px) {
	  .hero-banner {
		height: 24rem;
	  }
	}

	.hero-banner .hero-image {
	  position: absolute;
	  inset: 0;
	  width: 100%;
	  height: 100%;
	  object-fit: cover;
	  object-position: top;
	  filter: sepia(1) brightness(0.75);
	}

	.hero-banner .overlay {
	  position: relative;
	  z-index: 10;
	  display: flex;
	  flex-direction: column;
	  justify-content: center;
	  align-items: center;
	  height: 100%;
	  padding: 1rem;
	  text-align: center;
	  background-color: rgba(0, 0, 0, 0.4);
	  color: white;
	}

	.hero-banner .overlay h1 {
	  font-size: 2.25rem;
	  font-weight: 800;
	  margin-bottom: 1rem;
	}

	@media (min-width: 768px) {
	  .hero-banner .overlay h1 {
		font-size: 3rem;
	  }
	}

	.hero-banner .overlay .meta {
	  font-size: 0.875rem;
	  color: #e5e7eb;
	}

	/* Layout */
	.page-wrapper {
	  min-height: 100vh;
	  background-color: #f9fafb;
	  padding-bottom: 3rem;
	}

	/* Post Content */
	.post-content {
	  color: #374151;
	  padding-top: 4rem;
	  padding-bottom: 4rem;
	}

	.post-content section + section {
	  margin-top: 4rem;
	}

	.post-content h2 {
	  font-size: 1.875rem;
	  font-weight: 700;
	  color: #ea580c;
	  margin-bottom: 1.5rem;
	}

	.post-content p {
	  margin-bottom: 1rem;
	  line-height: 1.75;
	}

	.post-content ul {
	  list-style-type: disc;
	  padding-left: 1.25rem;
	  margin-bottom: 1rem;
	}

	.post-content li {
	  font-size: 1rem;
	  margin-bottom: 0.5rem;
	  line-height: 1.6;
	}

	.post-content blockquote {
	  border-left: 4px solid #fb923c;
	  padding-left: 1rem;
	  font-style: italic;
	  font-weight: 600;
	  color: #c2410c;
	  margin-bottom: 1rem;
	}

	/* Bold Text */
	.wp-block-list b,
	.wp-block-list strong {
	  color: #ea580c;
	}

	/* Single Success Story Page */
	.prose p {
	  margin-bottom: 1rem;
	  line-height: 1.75;
	}

	.prose blockquote {
		border-left: 4px solid #fb923c;
		padding-left: 1rem;
		font-style: italic;
		font-weight: 600;
		color: #c2410c;
		margin-bottom: 1rem;
	}


	/* Image Gallery Scroll */
	.image-gallery-scroll {
	  position: relative;
	  overflow: hidden;
	  margin: 2rem 0;
	}

	.image-row {
	  display: flex;
	  gap: 1rem;
	  overflow-x: auto;
	  padding: 1rem;
	  scroll-behavior: smooth;
	  scrollbar-width: none;
	}

	.image-row::-webkit-scrollbar {
	  display: none;
	}

	.image-row img {
	  flex: 0 0 auto;
	  height: 200px;
	  border-radius: 0.5rem;
	  transition: transform 0.3s ease;
	  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	}

	.image-row img:hover {
	  transform: scale(1.05);
	}

	/* Faded Edges */
	.image-gallery-scroll::before,
	.image-gallery-scroll::after {
	  content: '';
	  position: absolute;
	  top: 0;
	  width: 40px;
	  height: 100%;
	  z-index: 2;
	  pointer-events: none;
	}

	.image-gallery-scroll::before {
	  left: 0;
	  background: linear-gradient(to right, #f9fafb, transparent);
	}

	.image-gallery-scroll::after {
	  right: 0;
	  background: linear-gradient(to left, #f9fafb, transparent);
	}

	/* Responsive Image Gallery */
	.image-gallery {
	  display: flex;
	  justify-content: space-between;
	  gap: 1.5rem;
	  margin-top: 2rem;
	  flex-wrap: wrap;
	}

	.image-gallery img {
	  width: 100%;
	  height: auto;
	  display: block;
	  border-radius: 8px;
	  box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
	  object-fit: cover;
	  aspect-ratio: 1 / 1;
	  max-width: 32%;
	  transition: transform 0.3s ease;
	  cursor: pointer;
	}

	.image-gallery img:hover,
	.image-gallery img:focus {
	  transform: scale(1.05);
	  box-shadow: 0 8px 16px rgb(0 0 0 / 0.15);
	  outline: none;
	}

	/* Modal */
	.modal {
	  display: none;
	  position: fixed;
	  z-index: 1000;
	  left: 0;
	  top: 0;
	  width: 100%;
	  height: 100%;
	  overflow: auto;
	  background-color: rgba(0, 0, 0, 0.9);
	  padding-top: 60px;
	}

	.modal-content {
	  margin: auto;
	  display: block;
	  width: 70%;
	  max-width: 700px;
	}

	.close {
	  position: absolute;
	  top: 15px;
	  right: 35px;
	  color: #fff;
	  font-size: 40px;
	  font-weight: bold;
	  transition: 0.3s;
	}

	.close:hover,
	.close:focus {
	  color: #bbb;
	  text-decoration: none;
	  cursor: pointer;
	}

	.nav-button {
	  position: absolute;
	  top: 50%;
	  transform: translateY(-50%);
	  color: white;
	  font-size: 30px;
	  cursor: pointer;
	  user-select: none;
	}

	.prev {
	  left: 10px;
	}

	.next {
	  right: 10px;
	}

	/* Responsive */
	@media (max-width: 768px) {
	  .image-gallery img {
		max-width: 48%;
		margin-bottom: 1rem;
	  }
	}

	@media (max-width: 480px) {
	  .image-gallery {
		justify-content: center;
	  }

	  .image-gallery img {
		max-width: 100%;
		margin-bottom: 1rem;
	  }
	}
