/* Modern, responsive CSS for Katie Tupper's website */
:root {
  --primary-color: #5bbad5;
  --secondary-color: #333;
  --background-color: #fff;
  --text-color: #333;
  --accent-color: #da532c;
  --font-main: 'Open Sans', Arial, sans-serif;
  --font-heading: 'Montserrat', Arial, sans-serif;
  --max-width: 1200px;
  --spacing: 20px;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  padding: 0;
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #b33d1c;
}

/* Only underline links in content areas, not navigation */
.content a:hover {
  text-decoration: underline;
}

/* Don't underline navigation links */
.nav a:hover,
.sidebar-nav a:hover,
.social-links a:hover {
  text-decoration: none;
}

/* Breadcrumb Navigation */
.breadcrumbs {
  margin: 1rem 0 2rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: inline-block;
  margin-right: 0.5rem;
}

.breadcrumbs li:after {
  content: "›";
  margin-left: 0.5rem;
  color: #999;
}

.breadcrumbs li:last-child:after {
  content: "";
  margin: 0;
}

.breadcrumbs a {
  color: var(--accent-color);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--secondary-color);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* Header */
.header {
  background-color: var(--background-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.logo a {
  color: var(--secondary-color);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--secondary-color);
}

/* Navigation */
.nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav a {
  color: var(--secondary-color);
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.nav a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav a:hover:after {
  width: 100%;
}

/* Main Content */
.main {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing);
  padding: var(--spacing) 0;
}

.content {
  flex: 1 1 65%;
  min-width: 0;
  position: relative; /* Add position relative */
  z-index: 2; /* Higher z-index than the sidebar */
}

.sidebar {
  flex: 1 1 25%;
  min-width: 250px;
  position: relative; /* Add position relative */
  z-index: 1; /* Lower z-index than the content */
}

.profile-section {
  position: relative;
  margin-bottom: 0;
}

.profile-image {
  border-radius: 5px 5px 0 0;
  margin-bottom: 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  display: block;
}

/* Limit image size in specific viewport ranges */
@media (min-width: 509px) and (max-width: 1024px) {
  .profile-image {
    max-height: 400px; /* Limit the height of the image */
    object-fit: cover; /* Maintain aspect ratio while covering the area */
  }
}

.social-row {
  background-color: var(--secondary-color);
  padding: 10px 15px;
  border-radius: 0 0 5px 5px;
  margin-bottom: 0;
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.social-links a {
  color: #fff;
  font-size: 1.25rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-color);
}

.sidebar-nav {
  background-color: #f8f8f8;
  border-radius: 5px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative; /* Add position relative */
  z-index: 1; /* Lower z-index than the header */
}

.sidebar-nav a {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.sidebar-nav a:last-child {
  border-bottom: none;
}

/* Footer */
.footer {
  background-color: var(--secondary-color);
  color: #fff;
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer a {
  color: #fff;
  text-decoration: underline;
}

.footer p {
  color: #fff;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: #fff;
  font-size: 1.5rem;
}

/* Responsive styles */
/* Problematic range styles */
@media (min-width: 475px) and (max-width: 767px) {
  .main {
    flex-direction: column;
  }
  
  .content, .sidebar {
    flex: 1 1 100%;
  }
  
  .sidebar {
    order: -1;
    margin-bottom: 3rem;
  }
  
  .content {
    position: relative;
    z-index: 1;
    margin-top: 450px; /* Adjusted for this specific range */
  }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1024px) {
  .main {
    flex-direction: column;
  }
  
  .content, .sidebar {
    flex: 1 1 100%;
  }
  
  .sidebar {
    order: -1;
    margin-bottom: 3rem;
  }
  
  .content {
    position: relative;
    z-index: 1;
    margin-top: 30px; /* Further increase space for tablet view to prevent overlap */
  }
}

/* Mobile styles */
@media (max-width: 767px) {
  /* Fix for mobile view to prevent content from overlapping with sidebar */
  .content {
    margin-top: 110px; /* Add enough space to push content below sidebar image */
    position: relative;
    z-index: 1;
  }
  
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-toggle {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  
  .nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .nav.active {
    max-height: 500px;
  }
  
  .nav ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
  }
  
  .nav a {
    display: block;
    padding: 0.75rem 0;
  }
  
  .main {
    flex-direction: column;
  }
  
  .content, .sidebar {
    flex: 1 1 100%;
  }
  
  /* Keep the sidebar at the top in mobile view for the photo */
  .sidebar {
    order: -1;
    
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Utility classes */
.text-center {
  text-align: center;
}

/* Location tag styling */
.location-tag {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  margin: 0.5rem 0 1.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
