/*
Theme Name: Twenty Eleven Optimized
*/

/* =Reset
----------------------------------------------- */
html,
body,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
font,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
dl,
dt,
dd,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
  border: 0;
  font-family: inherit;
  font-size: 100%;
  font-style: inherit;
  font-weight: inherit;
  margin: 0;
  outline: 0;
  padding: 0;
  vertical-align: baseline;
}
body {
  background: #e2e2e2;
  line-height: 1;
  padding: 0 2em;
}
ul {
  list-style: none;
}
a img {
  border: 0;
}

/* =Structure
----------------------------------------------- */
#page {
  margin: 2em auto;
  max-width: 1000px;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#main {
  flex: 1;
}
#branding hgroup {
  margin: 0 7.6%;
}
#branding img.logo-image {
  width: 459px;
  margin-top: -1px;
  margin-left: -8%;
}
#access div {
  margin: 0 7.6%;
}
#primary {
  float: left;
  margin: 0 -26.4% 0 0;
  width: 100%;
}
#content {
  margin: 0 34% 0 7.6%;
  width: 58.4%;
}
.singular #primary {
  margin: 0;
}
.singular #content {
  margin: 0 7.6%;
  position: relative;
  width: auto;
}
.singular .entry-header,
.singular .entry-content,
.singular footer.entry-meta {
  margin: 0 auto;
  width: 68.9%;
}

/* =Global
----------------------------------------------- */
body {
  color: #373737;
  font:
    15px "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  font-weight: 300;
  line-height: 1.625;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  clear: both;
}
p {
  margin-bottom: 1.625em;
}
ul {
  margin: 0 0 1.625em 2.5em;
  list-style: square;
}
strong {
  font-weight: bold;
}
em,
i {
  font-style: italic;
}
a {
  color: #1982d1;
  text-decoration: none;
}
a:hover,
a:focus,
a:active {
  text-decoration: underline;
}
.assistive-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
}

/* =Header
----------------------------------------------- */
#branding {
  border-top: 2px solid #bbb;
  padding-bottom: 10px;
  position: relative;
  z-index: 10;
}
#site-title {
  margin-right: 270px;
  padding: 3.65625em 0 0;
}
#site-description {
  color: #7a7a7a;
  font-size: 16px;
  margin: -111px -28px 0.656em 551px;
}
#branding img {
  height: auto;
  display: block;
  width: 100%;
}

/* =Menu
----------------------------------------------- */
#access {
  background: #222;
  background: -moz-linear-gradient(#252525, #0a0a0a);
  background: -o-linear-gradient(#252525, #0a0a0a);
  background: -webkit-gradient(
    linear,
    0% 0%,
    0% 100%,
    from(#252525),
    to(#0a0a0a)
  );
  background: -webkit-linear-gradient(#252525, #0a0a0a);
  -webkit-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
  -moz-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
  box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
  clear: both;
  display: block;
  float: left;
  margin: 0 auto 6px;
  width: 100%;
}
#access ul {
  font-size: 13px;
  list-style: none;
  margin: 0 0 0 -0.8125em;
  padding-left: 0;
}
#access li {
  float: left;
  position: relative;
}
#access a {
  color: #eee;
  display: block;
  line-height: 3.333em;
  padding: 0 1.2125em;
  text-decoration: none;
}
#access li:hover > a,
#access a:focus {
  background: #f9f9f9;
  background: -moz-linear-gradient(#f9f9f9, #e5e5e5);
  background: -o-linear-gradient(#f9f9f9, #e5e5e5);
  background: -webkit-gradient(
    linear,
    0% 0%,
    0% 100%,
    from(#f9f9f9),
    to(#e5e5e5)
  );
  background: -webkit-linear-gradient(#f9f9f9, #e5e5e5);
  color: #373737;
}
#access .current_page_item > a {
  background: #f9f9f9;
  background: -moz-linear-gradient(#f9f9f9, #e5e5e5);
  background: -o-linear-gradient(#f9f9f9, #e5e5e5);
  background: -webkit-gradient(
    linear,
    0% 0%,
    0% 100%,
    from(#f9f9f9),
    to(#e5e5e5)
  );
  background: -webkit-linear-gradient(#f9f9f9, #e5e5e5);
  color: #373737;
}

/* =Content
----------------------------------------------- */
#main {
  clear: both;
  padding: 1.625em 0 0;
}
.hentry {
  border-bottom: 1px solid #ddd;
  margin: 0 0 1.625em;
  padding: 0 0 1.625em;
  position: relative;
}
.entry-title {
  clear: both;
  color: #222;
  font-size: 26px;
  font-weight: bold;
  line-height: 1.5em;
  padding-right: 76px;
  padding-bottom: 0.3em;
  padding-top: 15px;
}
.entry-title a {
  color: #222;
  text-decoration: none;
}
.entry-title a:hover {
  color: #1982d1;
}
.singular .entry-title {
  color: #000;
  font-size: 36px;
  line-height: 48px;
  padding-right: 0;
}
.entry-content {
  padding: 1.625em 0 0;
}
.entry-content strong {
  font-weight: bold;
}
.entry-content ul {
  margin-bottom: 1.625em;
  margin-left: 2.5em;
  list-style: square;
}
.entry-content li {
  margin-bottom: 0.5em;
}
.entry-content em {
  font-style: italic;
}
.entry-content a {
  color: #1982d1;
}
.entry-content a:hover {
  text-decoration: underline;
}

/* Images */
.entry-content img {
  max-width: 100%;
  height: auto;
}

/* Singular content */
.singular .hentry {
  border-bottom: none;
  padding: 0;
}
.singular .entry-header .entry-meta {
  padding-right: 0;
}

/* =Responsive
----------------------------------------------- */
@media (max-width: 800px) {
  #content {
    margin: 0 7.6%;
    width: auto;
  }
  .singular .entry-header,
  .singular .entry-content {
    width: 100%;
  }
}
@media (max-width: 650px) {
  body {
    font-size: 13px;
  }
  #site-description {
    font-size: 12px;
  }
  #access ul {
    font-size: 12px;
  }
  .entry-title {
    font-size: 21px;
  }
  .singular .entry-title {
    font-size: 28px;
  }
}

/* =Responsive
----------------------------------------------- */
@media (max-width: 800px) {
  #content {
    margin: 0 7.6%;
    width: auto;
  }
  #branding hgroup {
    margin: 0 4%;
  }
  #site-description {
    margin-left: 0;
    margin-top: 0;
    text-align: center;
  }
  #branding img.logo-image {
    margin-left: 0;
    width: 100%;
    max-width: 400px;
  }
  .singular .entry-header,
  .singular .entry-content {
    width: 100%;
  }
}
@media (max-width: 650px) {
  body {
    font-size: 14px;
  }
  #site-description {
    font-size: 13px;
  }
  #access ul {
    font-size: 12px;
    margin-left: 0;
  }
  #access li {
    float: none;
    display: inline-block;
  }
  #access a {
    padding: 0 0.8em;
    line-height: 2.5em;
  }
  .entry-title {
    font-size: 22px;
  }
  .singular .entry-title {
    font-size: 26px;
  }
}
@media (max-width: 480px) {
  body {
    padding: 0;
  }
  #page {
    margin: 0;
  }
  #branding {
    border-top: none;
    text-align: center;
  }
  #branding img.logo-image {
    width: 90%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
  }
  #site-description {
    margin: 10px auto;
    padding: 0 5%;
    text-align: center;
    font-size: 12px;
  }
  #access div {
    margin: 0;
  }
  #access ul {
    text-align: center;
  }
  #access li {
    float: none;
    display: block;
    width: 100%;
  }
  #access a {
    line-height: 2.2em;
    border-bottom: 1px solid #444;
  }
  .gallery-page {
    padding: 10px;
  }
  .gallery-item {
    width: 200px;
    height: 140px;
  }
  .entry-title,
  .singular .entry-title {
    font-size: 20px;
    line-height: 1.4;
  }
}

/* =Print
----------------------------------------------- */
@media print {
  body {
    background: none !important;
    font-size: 10pt;
  }
  #page {
    max-width: 100%;
  }
  #access {
    display: none;
  }
  #primary {
    float: none;
    width: 100%;
  }
  #content {
    margin: 0;
    width: auto;
  }
  .entry-title {
    font-size: 21pt;
  }
}

/* Custom background */
body.custom-background {
  background-image: url("../images/xv.png");
  background-color: #f1f1f1;
  background-repeat: repeat;
  background-position: top left;
  background-attachment: scroll;
}

/* =Gallery Page Hover Effect
----------------------------------------------- */
.gallery-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}
.gallery-item {
  width: 250px;
  height: 180px;
  border: 3px solid #ddd;
  position: relative;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}
/* Larger hover area to prevent flickering */
.gallery-item::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  right: -100px;
  bottom: -100px;
  z-index: 99;
}
.gallery-item:hover {
  z-index: 100;
}
/* Desktop hover effect - only for non-touch devices */
@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover img {
    position: fixed;
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 95vh;
    transform: translate(-50%, -50%) scale(2);
    z-index: 2147483647;
    border: 8px solid #fff;
    box-shadow: 0 0 150px rgba(0, 0, 0, 0.9);
    object-fit: contain;
  }
}
