/* =================================================================== */
/*    PARTIAL: LAYOUT                                                  */
/*    Contains: Styles for the main page structure, including the      */
/*    main content area, sidebar, article containers, and footer.      */
/* =================================================================== */

main {
    margin: 15px 12px;
    margin-bottom: 100px;
    min-width: 259px;
}

.sidebar, article {
    background: var(--eerie-black2);
    border: 1px solid var(--jet);
    border-radius: 20px;
    box-shadow: var(--shadow1);
    z-index: 1;
    padding: 15px;
}

article {
  display: none;
}

article.active {
    display: block;
    animation: fade .5s ease backwards;
}

.separator {
    width: 100%;
    height: 1px;
    background: var(--jet);
    margin: 16px 0;
}

/* --- Sidebar --- */

.sidebar {
    margin-bottom: 15px;
    max-height: 145px;
    overflow: hidden;
    padding: 15px;
    transition: var(--transition2);
}

.sidebar.active {
  max-height: 585px;
}

.sidebar-info {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
}

.info-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 5px;
}

.sidebar-logo {
    padding: 0 15px;
}

/* --- THIS IS THE FIX --- */
/* Changed the selector from 'svg' to 'img' and added max-width */
.sidebar-logo img {
    width: 100%;
    max-width: 160px; /* You can adjust this value to make the logo bigger or smaller */
    height: auto;
    margin: 0 auto 15px; /* Centers the logo and adds space below */
}

.sidebar:not(.active) .sidebar-logo {
    max-width: 140px;
    margin-inline: auto;
    padding: 0;
    margin-bottom: 0;
}

.info-content .name {
    color: var(--white2);
    font-size: var(--fs3);
    font-weight: var(--fw500);
    letter-spacing: -0.25px;
    margin-bottom: 10px;
}

.info-content .title {
    color: var(--white1);
    background: var(--onyx);
    font-size: var(--fs8);
    font-weight: var(--fw300);
    width: max-content;
    padding: 3px 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.info-more-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    border-radius: 0 15px;
    font-size: 13px;
    color: var(--orange-yellow-crayola);
    background: var(--border-gradient-onyx);
    padding: 10px;
    box-shadow: var(--shadow2);
    transition: var(--transition1);
    z-index: 1;
}

.info-more-btn::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: var(--bg-gradient-jet);
    transition: var(--transition1);
    z-index: -1;
}

.info-more-btn:hover, .info-more-btn:focus {
  background: var(--bg-gradient-yellow1);
}
.info-more-btn:hover::before, .info-more-btn:focus::before {
  background: var(--bg-gradient-yellow2);
}

.info-more-btn span {
  display: none;
}

.sidebar-info-more {
    opacity: 0;
    visibility: hidden;
    transition: var(--transition2);
}

.sidebar.active .sidebar-info-more {
    opacity: 1;
    visibility: visible;
}

.contacts-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding-left: 0; /* Custom fix to align sidebar contact icons */
}

.contact-item {
    min-width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-info {
    max-width: calc(100% - 46px);
    width: calc(100% - 46px);
}

.contact-info :is(.contact-link, time, address) {
    color: var(--white2);
    font-size: var(--fs7);
}

.contact-info address {
  font-style: normal;
}

.contact-title {
    color: var(--light-gray70);
    font-size: var(--fs8);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.social-list {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    padding-bottom: 4px;
    padding-left: 7px;
}

.social-item .social-link {
    color: var(--light-gray70);
    font-size: 18px;
}

.social-item .social-link:hover {
  color: var(--light-gray);
}

/* --- "Now" Sidebar Section --- */
.sidebar-now-section {
  padding: 0 10px;
}
.sidebar-now-section h4 {
  margin-bottom: 15px;
  color: var(--light-gray);
  font-weight: var(--fw500);
}
.sidebar-now-section .now-content p {
  font-size: var(--fs7);
  color: var(--light-gray70);
  line-height: 1.6;
}

/* --- Site Footer --- */
.site-footer {
  padding: 25px;
  margin-top: 15px;
  text-align: center;
  font-size: var(--fs8);
  color: var(--light-gray70);
  border-top: 1px solid var(--jet);
}

.footer-list {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--light-gray);
  transition: var(--transition1);
  position: relative;
}

.footer-link:hover {
  color: var(--orange-yellow-crayola);
}

/* Add a small dot between items on larger screens */
@media (min-width: 580px) {
    .footer-link::after {
        content: '•';
        position: absolute;
        right: -13px;
        color: var(--jet);
        pointer-events: none;
    }
    /* Hide dot on the last item */
    .footer-list li:last-child .footer-link::after {
        display: none;
    }
}

/* --- Right Sidebar Support --- */
@media (min-width: 1250px) {
  main.sidebar-right {
    flex-direction: row-reverse;
  }
}

/* Polish the "Now" section in the sidebar */
.sidebar-now-section {
    padding: 10px 15px;
    background: var(--bg-gradient-jet);
    border-radius: 12px;
    border: 1px solid var(--jet);
    margin-top: 15px;
}