/**
 * Footer Styles
 * Contains both admin settings styles and frontend footer styles
 */

/* ========================================
   FRONTEND FOOTER STYLES
   ======================================== */


/* Sticky Footer Layout */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

#page,
.site,
body.generatepress {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content,
#content,
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Ensure main content area expands */
.inside-article,
.container {
  flex: 1;
}

/* Ensure footer sticks to bottom */
.site-footer,
footer[data-elementor-type="footer"] {
  margin-top: auto;
}

/* Custom footer positioning */
footer[id^="footer"] {
  margin-top: auto;
}

/* Ensure our BARKODE footer sticks to bottom */
.footer-container {
  margin-top: auto;
  position: relative;
  z-index: 1;
  padding: 2em 0;
}

.site {
  background-color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.footer-title {
  font-weight: bold;
  color: #333;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 2.5em;
  display: flex;
  align-items: flex-start;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-link {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #333;
  text-decoration: underline;
}

.footer-email {
  font-weight: 500;
}

.footer-social {
  font-weight: 500;
}

.footer-social.footer-instagram:hover {
  color: #e4405f;
}

.footer-social.footer-facebook:hover {
  color: #1877f2;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.logo-icon {
  font-size: 20px;
  margin-right: 8px;
}

.logo-text {
  font-weight: bold;
  font-size: 18px;
  color: #333;
  letter-spacing: 1px;
}

.footer-copyright {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}

/* ========================================
   ADMIN FOOTER SETTINGS STYLES
   ======================================== */

/* Form styling */
.footer-settings-form .margin-top-10 {
    margin-top: 10px;
    display: inline-block;
}

.footer-settings-form .palette-color-row.hidden,
.footer-settings-form .custom-color-row.hidden {
    display: none;
}

/* Color preview styling */
.footer-settings-form .color-preview-container {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-settings-form .palette-color-preview,
.footer-settings-form .custom-color-preview {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Custom color input styling */
.footer-settings-form .custom-color-input-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-settings-form .custom-color-picker {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 4px;
}

/* Footer preview styling */
.footer-preview-section {
    margin-top: 30px;
}

.footer-preview-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.footer-preview-content {
    padding: 40px 20px 20px 20px;
    color: white;
}

/* Footer preview grid */
.footer-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-preview-section-title {
    margin: 0 0 15px 0;
    color: white;
    min-height:3em;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
}

.footer-preview-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-preview-list-item {
    margin-bottom: 8px;
}

.footer-preview-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-preview-placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Footer bottom section */
.footer-preview-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-preview-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-preview-logo-icon {
    font-size: 24px;
}

.footer-preview-logo-text {
    font-weight: bold;
}

.footer-preview-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Large Tablets and Small Desktops (max-width: 1024px) */
@media (max-width: 1024px) {
  /* Footer Styles */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .footer-container {
    padding: 30px 20px;
  }
}

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
  /* Frontend Footer Styles */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .footer-container {
    padding: 20px 15px;
  }

  .footer-title {
    font-size: 15px;
    margin-bottom: 15px;
  }

  .footer-link {
    font-size: 15px;
  }

  .footer-bottom {
    margin-top: 30px;
    padding-top: 15px;
  }

  .logo-text {
    font-size: 16px;
  }

  /* Admin Footer Settings Styles */
  .footer-preview-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
  }
  
  .footer-preview-content {
    padding: 30px 15px 15px 15px;
  }
  
  .footer-preview-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .footer-settings-form .custom-color-input-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
  /* Frontend Footer Styles */
  .footer-container {
    padding: 25px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .footer-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .footer-link {
    font-size: 14px;
  }

  .footer-links li {
    margin-bottom: 8px;
  }

  /* Ensure footer columns don't get too narrow on very small screens */
  .footer-column {
    min-width: 0;
  }

  /* Make footer bottom section more compact on mobile */
  .footer-bottom {
    margin-top: 20px;
    padding-top: 15px;
  }
}
