/* ===============================
   Theme Variables
   =============================== */
:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --accent: #1a237e;
  --bg-light: rgba(255,255,255,0.85);
  --shadow: 0 4px 24px rgba(0,0,0,0.2);
}

/* ===============================
   Reset & Global Styles
   =============================== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background: url('Images/beach.jpg') no-repeat center center fixed;
  background-size: cover;
  overflow-x: hidden;
}

body {
  min-width: 100vw;
  overflow-y: auto;
  position: relative;
  box-sizing: border-box;
}

/* ===============================
   Improved Focus Styles
   =============================== */
.menu-button:focus-visible,
.social-link:focus-visible,
.home-button:focus-visible,
.dropdown a:focus-visible,
#lightbox button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===============================
   Menu Styles
   =============================== */
.menu-container {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 100;
}

.menu-button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  min-width: 90px;
  text-align: center;
}

.menu-button:hover {
  background: var(--primary-dark);
}

.dropdown {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--primary);
  border-radius: 8px;
  margin-top: 5px;
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.dropdown a {
  display: block;
  text-decoration: none;
  color: #fff;
  padding: 0.5rem 1rem;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.dropdown a:hover {
  background: var(--primary-dark);
}

/* Show dropdown via JS toggle */
.dropdown.show {
  max-height: 500px;
  opacity: 1;
}

/* Desktop hover support */
@media (hover: hover) {
  .menu-container:hover .dropdown {
    max-height: 500px;
    opacity: 1;
  }
}

/* ===============================
   Social Container
   =============================== */
.social-container {
  background: var(--bg-light);
  padding: 2rem 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  width: clamp(300px, 90%, 450px);
  margin: 120px auto 50px auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .social-container {
    max-width: 600px;
    padding: 2rem 3rem;
  }
}

@media (min-width: 1200px) {
  .social-container {
    max-width: 720px;
    padding: 2rem 5rem;
  }
}

/* Profile Photo */
.profile-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent);
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(26,35,126,0.15);
  transition: box-shadow 0.3s, transform 0.2s;
}
.profile-photo:hover {
  box-shadow: 0 4px 24px rgba(26,35,126,0.25);
  transform: scale(1.04);
}

/* Titles */
.welcome-title {
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 1.2rem;
  font-size: 1.6rem; /* larger on desktop */
}

#current-time {
  font-size: 1.1rem;
  color: #333;
  margin-top: 1rem;
}

#awake-status {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.social-heading {
  margin-top: 1rem;
  color: var(--accent);
}

/* ===============================
   Social Links (narrower)
   =============================== */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  background: var(--primary);
  border-radius: 8px;
  width: auto;
  min-width: 160px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.social-link:hover,
.social-link:focus {
  background: var(--primary-dark);
  outline: none;
}

.social-link img {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  transition: transform 0.2s;
}
.social-link:hover img {
  transform: scale(1.08);
}

/* ===============================
   Mobile Portrait / Landscape Fixes
   =============================== */
@media (max-width: 480px) {
  .social-container {
    width: 95%;
    max-width: 360px;
    margin: 50px auto 20px auto;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    box-sizing: border-box;
  }

  .social-links {
    gap: 0.7rem;
  }

  .social-link {
    font-size: 0.95rem;
    padding: 0.4rem 0.7rem;
  }

  @media (max-width: 400px) and (orientation: portrait) {
    .profile-photo { width: 100px; height: 100px; }
    .welcome-title { font-size: 1.3rem; } /* slightly larger on mobile portrait */
    #awake-status, #current-time { font-size: 0.85rem; }
    .social-heading { font-size: 1rem; }
    .social-container { padding: 0.5rem; }
  }
}

/* ===============================
   Mobile background fix
   =============================== */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
}

/* Circular Home Button at top-left */
.home-button {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: background 0.2s, transform 0.2s;
  z-index: 100;
}

.home-button img {
  width: 24px;
  height: 24px;
}

.home-button:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

/* Travel Info (date and map) */
.travel-info {
  text-align: left;
  color: var(--accent);
  font-size: 1rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.travel-info iframe {
  width: 100%;
  height: 250px;
  border: 0;
  border-radius: 8px;
  margin-top: 1rem;
}
.map-wrapper {
  width: 100%;
  height: 250px;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1rem;
}
.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

/* ===============================
   Lightbox
   =============================== */
#lightbox {
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background:rgba(0,0,0,0.9);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:200;
}

#lightbox img {
  max-width:90%;
  max-height:90%;
  border-radius:8px;
}

#lightbox button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  user-select: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

#lightbox button:hover {
  background: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(21,101,192,0.3);
  transform: scale(1.1);
}

#lightbox #prev { left: 20px; }
#lightbox #next { right: 20px; }