/**
 * Rotary Theme Custom CSS
 * 
 * Additional styles for the Rotary WordPress theme
 */

/* Event Card Styles */
.event-card {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  background-color: #fff;
  transition: all 0.3s ease;
  height: 100%;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.event-img {
  position: relative;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.event-img img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.event-date {
  position: absolute;
  bottom: 0;
  left: 20px;
  background-color: var(--primary-color);
  color: #fff;
  padding: 10px 15px;
  text-align: center;
  border-radius: 5px 5px 0 0;
  transform: translateY(0);
}

.event-date .day {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.event-date .month {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
}

.event-content {
  padding: 25px;
}

.event-content h3 {
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: 600;
}

.event-content h3 a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.event-content h3 a:hover {
  color: var(--primary-color);
}

.event-meta {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
}

.event-meta p {
  margin-right: 20px;
  margin-bottom: 5px;
  font-size: 14px;
  color: #666;
}

.event-meta p i {
  color: var(--primary-color);
  margin-right: 5px;
}

.event-description {
  margin-bottom: 20px;
  color: #666;
  font-size: 15px;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.read-more i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.read-more:hover {
  color: var(--secondary-color);
}

.read-more:hover i {
  transform: translateX(5px);
}

.past-event {
  opacity: 0.8;
}

/* Team Member Styles */
.team-member {
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  background-color: #fff;
  transition: all 0.3s ease;
  height: 100%;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.member-img {
  position: relative;
  overflow: hidden;
}

.member-img img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-member:hover .member-img img {
  transform: scale(1.05);
}

.member-img .social {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 15px 0;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
}

.team-member:hover .member-img .social {
  bottom: 0;
}

.member-img .social a {
  color: #fff;
  margin: 0 10px;
  font-size: 18px;
  transition: color 0.3s ease;
}

.member-img .social a:hover {
  color: var(--primary-color);
}

.member-info {
  padding: 25px 15px;
}

.member-info h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--heading-color);
}

.member-info span {
  display: block;
  font-size: 14px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.member-info p {
  font-size: 15px;
  color: #666;
}

/* Contact Page Styles */
.contact-info {
  padding: 30px;
  background-color: #f8f9fa;
  border-radius: 8px;
  height: 100%;
}

.contact-info h3 {
  margin-bottom: 20px;
  color: var(--heading-color);
}

.info-item {
  display: flex;
  margin-bottom: 25px;
}

.info-item i {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 20px;
  margin-top: 5px;
}

.info-item h4 {
  font-size: 18px;
  margin-bottom: 5px;
  color: var(--heading-color);
}

.info-item p {
  color: #666;
}

.contact-form {
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  height: 100%;
}

.header-scrolled {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.98) !important;
}

.contact-form h3 {
  margin-bottom: 20px;
  color: var(--heading-color);
}

.form-control {
  height: 48px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 15px;
  font-size: 15px;
  margin-bottom: 20px;
}

textarea.form-control {
  height: auto;
  min-height: 150px;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: none;
}

.php-email-form .loading {
  display: none;
  background: #fff;
  text-align: center;
  padding: 15px;
}

.php-email-form .error-message {
  display: none;
  color: #fff;
  background: #ed3c0d;
  text-align: center;
  padding: 15px;
  font-weight: 600;
}

.php-email-form .sent-message {
  display: none;
  color: #fff;
  background: #18d26e;
  text-align: center;
  padding: 15px;
  font-weight: 600;
}

.php-email-form button[type="submit"] {
  background: var(--primary-color);
  border: 0;
  padding: 12px 30px;
  color: #fff;
  transition: 0.4s;
  border-radius: 4px;
  font-weight: 600;
}

.php-email-form button[type="submit"]:hover {
  background: var(--secondary-color);
}

.map-section {
  padding: 0;
}

.map {
  width: 100%;
  height: 450px;
}

.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Event Detail Page Styles */
.event-detail .event-featured-image {
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
}

.event-detail .event-featured-image img {
  width: 100%;
  height: auto;
}

.event-meta-box {
  background-color: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.event-meta-item {
  display: flex;
  align-items: flex-start;
}

.event-meta-item i {
  font-size: 24px;
  color: var(--primary-color);
  margin-right: 15px;
  margin-top: 5px;
}

.event-meta-item h4 {
  font-size: 16px;
  margin-bottom: 5px;
  color: var(--heading-color);
}

.event-meta-item p {
  margin-bottom: 0;
  color: #666;
}

.event-main-content {
  margin-bottom: 30px;
}

.event-address, .event-map {
  margin-bottom: 30px;
}

.event-address h3, .event-map h3 {
  margin-bottom: 15px;
  font-size: 22px;
  color: var(--heading-color);
}

.map-container {
  height: 350px;
  border-radius: 8px;
  overflow: hidden;
}

.event-share h3 {
  margin-bottom: 15px;
  font-size: 22px;
  color: var(--heading-color);
}

.social-links {
  display: flex;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #f8f9fa;
  border-radius: 50%;
  margin-right: 10px;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* Sidebar Styles */
.sidebar-widget {
  margin-bottom: 40px;
  background-color: #fff;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
  font-size: 20px;
  color: var(--heading-color);
}

.sidebar-widget.upcoming-events .event-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget.upcoming-events .event-list li {
  display: flex;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.sidebar-widget.upcoming-events .event-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-widget.upcoming-events .event-date {
  position: relative;
  transform: none;
  left: auto;
  bottom: auto;
  margin-right: 15px;
  min-width: 60px;
}

.sidebar-widget.upcoming-events .event-info {
  flex: 1;
}

.sidebar-widget.upcoming-events .event-info h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.sidebar-widget.upcoming-events .event-info h4 a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.sidebar-widget.upcoming-events .event-info h4 a:hover {
  color: var(--primary-color);
}

.sidebar-widget.upcoming-events .event-info p {
  margin-bottom: 0;
  font-size: 14px;
  color: #666;
}

.sidebar-widget.upcoming-events .no-events {
  color: #666;
  font-style: italic;
}

.sidebar-widget.event-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget.event-categories ul li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.sidebar-widget.event-categories ul li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-widget.event-categories ul li a {
  display: flex;
  justify-content: space-between;
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.sidebar-widget.event-categories ul li a:hover {
  color: var(--primary-color);
}

.sidebar-widget.event-categories ul li.active a {
  color: var(--primary-color);
  font-weight: 600;
}

.sidebar-widget.event-categories ul li a span {
  color: #999;
}

.sidebar-widget.recent-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget.recent-posts ul li {
  display: flex;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.sidebar-widget.recent-posts ul li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.sidebar-widget.recent-posts .post-thumb {
  margin-right: 15px;
  flex-shrink: 0;
}

.sidebar-widget.recent-posts .post-thumb img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.sidebar-widget.recent-posts .post-info {
  flex: 1;
}

.sidebar-widget.recent-posts .post-info h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.sidebar-widget.recent-posts .post-info h4 a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.sidebar-widget.recent-posts .post-info h4 a:hover {
  color: var(--primary-color);
}

.sidebar-widget.recent-posts .post-date {
  font-size: 13px;
  color: #999;
}

.sidebar-widget.search-widget .input-group {
  position: relative;
}

.sidebar-widget.search-widget .form-control {
  padding-right: 50px;
}

.sidebar-widget.search-widget .btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 48px;
  width: 48px;
  border-radius: 0 4px 4px 0;
  z-index: 5;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .event-meta-box .row > div {
    margin-bottom: 20px;
  }
  
  .event-meta-box .row > div:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 767px) {
  .event-card .event-img img {
    height: 200px;
  }
  
  .team-member .member-img img {
    height: 250px;
  }
  
  .contact-info, .contact-form {
    margin-bottom: 30px;
  }
  
  .map {
    height: 350px;
  }
}

@media (max-width: 575px) {
  .event-meta-item {
    flex-direction: column;
  }
  
  .event-meta-item i {
    margin-bottom: 10px;
  }
  
  .event-date {
    left: 10px;
    padding: 8px 12px;
  }
  
  .event-date .day {
    font-size: 20px;
  }
  
  .event-date .month {
    font-size: 12px;
  }
}

/* Header Styles */
#header {
  background-color: var(--menu-background-color) !important;
  padding: 15px 0;
  transition: all 0.3s ease-in-out;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 997;
  height: 80px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Logo Styles */
.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.25rem;
}

.logo img {
  max-height: 50px;
  width: auto;
  height: auto;
  margin-right: 10px;
}

.sitename {
  margin: 0;
  font-size: 1.5rem;
  color: #fff;
}

/* Navigation Menu */
.navmenu {
  display: flex;
  align-items: center;
}

.navmenu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
}

.navmenu > ul > li {
  position: relative;
  padding: 0 12px;
}

.navmenu a {
  color: #fff;
  padding: 8px 15px;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  position: relative;
  transition: all 0.3s ease;
}

.navmenu > ul > li > a:before {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--accent-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navmenu > ul > li:hover > a:before,
.navmenu > ul > li.current-menu-item > a:before {
  width: 100%;
}

.navmenu > ul > li > a:hover,
.navmenu > ul > li.current-menu-item > a {
  color: var(--accent-color);
}

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: none;
  line-height: 0;
  transition: 0.5s;
  margin-left: 20px;
  z-index: 9999;
}

/* Header Scroll Style */
.header-scrolled {
  background-color: rgba(29, 67, 128, 0.95) !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  padding: 5px 0;
}

/* Dropdown Menus */
.navmenu .dropdown ul {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 99;
  min-width: 200px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.navmenu .dropdown:hover > ul {
  opacity: 1;
  visibility: visible;
}

.navmenu .dropdown ul li {
  padding: 0;
  width: 100%;
}

.navmenu .dropdown ul a {
  padding: 8px 20px;
  color: #2d465e;
  font-size: 14px;
  display: block;
  transition: all 0.3s ease;
}

.navmenu .dropdown ul a:hover {
  background: #f8f9fa;
  color: var(--accent-color);
  padding-left: 25px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  /* Mobile menu toggle button */
  .mobile-nav-toggle {
    display: inline-block !important;
    font-size: 28px;
    cursor: pointer;
    color: var(--accent-color) !important;
    transition: all 0.3s ease;
    z-index: 9999;
    position: absolute;
    right: 20px;
    top: 25px;
  }
  
  .mobile-nav-toggle:hover {
    color: var(--accent-color);
    transform: scale(1.1);
  }
  
  /* Mobile menu container - Overriding styles from style.css */
  .navmenu {
    position: fixed !important;
    top: 0 !important;
    right: -300px !important;
    bottom: 0 !important;
    width: 300px !important;
    padding: 70px 20px 20px !important; /* Extra top padding for logo */
    background: linear-gradient(135deg, #1d4380 0%, #2d5aa8 100%) !important;
    z-index: 9997 !important;
    transition: 0.3s !important;
    overflow-y: auto !important;
    opacity: 1 !important;
  }
  
  /* Mobile menu logo */
  .mobile-menu-logo {
    width: 100%;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
  }
  
  /* Hide mobile menu logo on desktop */
  @media (min-width: 1201px) {
    .mobile-menu-logo {
      display: none !important;
    }
  }
  
  .mobile-menu-logo img {
    max-height: 60px;
    width: auto;
  }
  
  .mobile-menu-logo .sitename {
    color: #ffffff;
    font-size: 24px;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  }
  
  .mobile-menu-logo .custom-logo {
    height: auto;
    max-width: 80%;
  }
  
  /* Active mobile menu */
  .navmenu.navmenu-active {
    right: 0 !important;
  }
  
  /* Mobile menu list structure - Overriding styles from style.css */
  .navmenu > ul {
    flex-direction: column !important;
    padding: 0 !important;
    position: relative !important;
    inset: auto !important;
    background-color: transparent !important;
    box-shadow: none !important;
    display: block !important;
    margin: 0 !important;
  }
  
  /* Mobile menu list items */
  .navmenu > ul > li {
    width: 100% !important;
    padding: 0 !important;
    margin-bottom: 15px !important;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative !important;
  }
  
  /* Mobile menu links */
  .navmenu a,
  .navmenu a:focus,
  .mobile-nav-active .navmenu a,
  .mobile-nav-active .navmenu a:focus {
    padding: 12px 5px !important;
    display: block !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    position: relative !important;
    transition: all 0.3s ease !important;
    justify-content: flex-start !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  }
  
  .navmenu a:hover,
  .navmenu .active,
  .navmenu .active:focus {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px !important;
    padding-left: 10px !important;
  }
  
  .navmenu > ul > li > a:before {
    display: none;
  }
     
  
  /* Dropdown indicator */
  .dropdown-indicator {
    font-size: 0.8em;
    margin-left: 5px;
    transition: transform 0.3s ease;
    display: inline-block;
    vertical-align: middle;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .dropdown.active > a .dropdown-indicator {
    transform: translateY(-50%) rotate(180deg);
  }
  
  /* Make sure dropdown links have space for the indicator */
  .navmenu .dropdown > a {
    display: block;
    position: relative;
    padding-right: 30px !important;
  }
  
  /* Dropdown menus */
  .navmenu .dropdown ul {
    position: static !important;
    display: block !important;
    opacity: 0;
    visibility: visible !important;
    transition: all 0.3s ease-in-out;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 0 0 15px !important;
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease, opacity 0.3s ease;
  }
  
  .navmenu .dropdown.active > ul {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    padding: 10px 0 10px 15px !important;
  }
  
  /* Dropdown menu links */
  .navmenu .dropdown ul a,
  .navmenu .dropdown ul a:focus {
    color: #ffffff !important;
    padding: 10px 5px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
  }
  
  .navmenu .dropdown ul a:hover,
  .navmenu .dropdown ul .active,
  .navmenu .dropdown ul .active:focus {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15) !important;
    padding-left: 15px !important;
    border-radius: 3px !important;
  }
  
  /* Mobile menu overlay */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.3s ease forwards;
  }
  
  /* Active menu styles */
  .navmenu.navmenu-active {
    right: 0 !important;
    z-index: 9998 !important;
  }
  
  .navmenu.navmenu-active > ul {
    display: block !important;
    width: 100% !important;
    position: relative !important;
    inset: auto !important;
    background-color: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    z-index: 9999 !important;
  }
  
  /* Make links more visible in mobile menu */
  .navmenu.navmenu-active a span,
  .navmenu.navmenu-active a:focus span {
    color: #ffffff !important;
    font-weight: 600 !important;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
