/*
==============================================================
  Arcadia Theme - Mobile Responsive Styles
  Melhorias para dispositivos móveis
==============================================================
*/


/* @group Mobile Menu Button
============================================================ */

#mobile-menu-toggle {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  cursor: pointer;
  display: none;
  padding: 12px;
  position: fixed;
  right: 15px;
  top: 55px;
  width: 11%;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  text-align: center;
}

#mobile-menu-toggle:hover {
  background: rgba(0, 0, 0, 0.2);
}

#mobile-menu-toggle span {
  background: white;
  display: block;
  height: 3px;
  margin: 4px auto;
  width: 26px;
  transition: all 0.3s ease;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

#mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

#mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* @end */


/* @group Tablet Devices (768px - 1024px)
============================================================ */

@media only screen and (max-width: 1024px) {
  
  /* Layout */
  .wrapper {
    width: 90% !important;
    max-width: 900px;
    padding: 0 15px;
  }
  
  #header-wrapper {
    width: 90% !important;
    max-width: 930px;
  }
  
  #main {
    width: 90% !important;
    max-width: 996px;
  }
  
  #main-wrapper {
    padding: 0 20px 37px 20px;
  }
  
  /* Content & Sidebar */
  #content {
    width: 60%;
    padding-right: 20px;
  }
  
  #sidebar {
    width: 20%;
  }
  
  /* Navigation */
  body.header-style-left #main-nav > ul > li > a {
    padding: 30px 10px;
  }
  
  body.header-style-center #main-nav > ul > li > a {
    padding: 20px 12px;
  }
  
  /* Nivo Slider - Prevenir overflow em tablet */
  #nivo-slider-area {
    max-width: 100%;
    overflow: hidden;
  }
  
  #nivo-slider-area .wrapper {
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Aumentar especificidade para sobrescrever CSS gerado pelo PHP */
  body #nivo-slider-area .deco-loading-screen,
  body.header-style-left #nivo-slider-area .deco-loading-screen,
  body.header-style-center #nivo-slider-area .deco-loading-screen {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  
  #nivo-slider {
    max-width: 100%;
  }
  
  #nivo-slider img {
    max-width: 100%;
    height: auto;
  }
  
}

/* @end */


/* @group Tablet Portrait & Mobile Landscape (481px - 768px)
============================================================ */

@media only screen and (max-width: 768px) {
  
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Show mobile menu button */
  #mobile-menu-toggle {
    display: block;
  }
  
  /* Adjust header bar on mobile */
  #header-bar {
    font-size: 11px;
    text-align: center;
    padding: 8px 0;
    position: relative;
    z-index: 100;
  }
  
  #header-bar .wrapper {
    padding: 5px 15px;
  }
  
  #header-bar .primary,
  #header-bar .secondary {
    float: none !important;
    width: 100% !important;
    text-align: center;
  }
  
  #header-bar nav ul li {
    margin: 0 8px;
  }
  
  
  /* Layout */
  .wrapper {
    padding: 0 15px;
  }
  
  #header-wrapper {
    padding: 15px;
  }
  
  #main {
    margin-top: 0;
  }
  
  #main-wrapper {
    background: none;
    min-height: auto;
    padding: 20px 15px;
  }
  
  #main-bg {
    background: none;
  }
  
  /* Header */
  #header {
    position: relative;
    min-height: 70px;
  }
  
  body.header-style-left #header,
  body.header-style-center #header {
    height: auto;
  }
  
  /* Reduzir altura dos elementos decorativos */
  body.header-style-left #header-gradient,
  body.header-style-center #header-gradient {
    height: 70px;
  }
  
  body.header-style-left #header-shine,
  body.header-style-center #header-shine {
    display: none; /* Ocultar no mobile */
  }
  
  #header-light {
    display: none; /* Ocultar no mobile */
  }
  
  #header-wrapper {
    position: relative;
    padding: 10px 15px !important;
    min-height: 60px;
  }
  
  /* Logo */
  body.header-style-left #header .wrapper h1#logo,
  body.header-style-center #header .wrapper h1#logo {
    position: static;
    text-align: left;
    padding: 0;
    margin: 0;
    line-height: 1;
  }
  
  #header .wrapper #logo {
    max-width: calc(100% - 60px);
    display: inline-block;
  }
  
  #header .wrapper #logo img {
    max-width: 100%;
    max-height: 45px;
    width: auto;
    height: auto;
    display: block;
  }
  
  /* Navigation - Mobile Menu */
  #main-nav {
    background: rgba(0, 0, 0, 0.98);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    display: none;
    left: 10px;
    margin: 0;
    max-height: 80vh;
    overflow-y: auto;
    position: fixed;
    right: 10px;
    top: 110px;
    z-index: 9999;
  }
  
  #main-nav.mobile-menu-open {
    display: block;
  }
  
  body.header-style-left #main-nav,
  body.header-style-center #main-nav {
    position: fixed;
    width: auto;
    float: none;
  }
  
  body.header-style-left #main-nav > ul,
  body.header-style-center #main-nav > ul {
    float: none;
    position: static;
    right: auto;
  }
  
  #main-nav > ul {
    padding: 8px 0;
    list-style: none;
    margin: 0;
  }
  
  #main-nav > ul > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: block;
    float: none;
    left: auto;
    position: static;
    width: 100%;
    clear: both;
  }
  
  #main-nav > ul > li:first-child {
    border-top: none;
  }
  
  #main-nav > ul > li:last-child {
    border-bottom: none;
  }
  
  body.header-style-left #main-nav > ul > li > a,
  body.header-style-center #main-nav > ul > li > a {
    color: white !important;
    display: block;
    margin: 0;
    padding: 16px 20px !important;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
  }
  
  #main-nav > ul > li > a:hover {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 25px !important;
  }
  
  /* Dropdown menus */
  #main-nav ul li ul {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: none !important;
    left: 0;
    margin: 0;
    padding: 0;
    position: static;
    width: 100%;
    list-style: none;
  }
  
  #main-nav ul li:hover ul {
    display: none !important;
  }
  
  #main-nav ul li.mobile-submenu-open > ul {
    display: block !important;
  }
  
  #main-nav ul li ul li {
    display: block;
    float: none;
    width: 100%;
    clear: both;
  }
  
  #main-nav ul li ul li a {
    border: none;
    margin: 0;
    padding: 14px 20px 14px 40px !important;
    width: auto;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    display: block;
  }
  
  #main-nav ul li ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: white !important;
    padding-left: 45px !important;
  }
  
  #main-nav ul li ul li ul {
    padding-left: 0;
  }
  
  #main-nav ul li ul li ul li a {
    padding-left: 60px !important;
  }
  
  /* Content Layout - Stack vertically */
  #content {
    float: none;
    width: 100% !important;
    padding: 0 0 20px 0;
  }
  
  #sidebar {
    float: none;
    padding: 20px 0 0 0;
    width: 90% !important;
  }
  
  body.sidebar-right #content,
  body.sidebar-left #content,
  body.sidebar-right #sidebar,
  body.sidebar-left #sidebar {
    float: none;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }
  
  /* Columns - Stack on mobile */
  .one-half,
  .one-third,
  .two-third,
  .one-fourth,
  .three-fourth,
  .one-fifth,
  .two-fifth,
  .three-fifth,
  .four-fifth,
  .one-sixth,
  .two-sixth,
  .three-sixth,
  .four-sixth,
  .five-sixth {
    float: none;
    margin-right: 0;
    width: 100% !important;
    margin-bottom: 20px;
  }
  
  .last {
    margin-bottom: 0;
  }
  
  /* Images */
  img {
    height: auto;
    max-width: 100%;
  }
  
  .alignleft,
  .alignright {
    display: block;
    float: none;
    margin: 15px auto;
  }
  
  /* Entry Content */
  .entry {
    padding-bottom: 2em;
  }
  
  .entry-featured-content {
    margin-bottom: 15px;
  }
  
  /* Buttons & Forms */
  button,
  a.button,
  input[type=submit],
  input[type=reset] {
    display: block;
    margin: 10px 0;
    width: 100%;
  }
  
  form input[type=text],
  form input[type=password],
  form textarea,
  form select {
    width: 100% !important;
  }
  
  /* Tables */
  .table table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Tabs */
  .tabgroup.vertical .tabs-wrapper {
    float: none;
    width: 100%;
  }
  
  .tabgroup.vertical .tab-content-wrapper {
    float: none;
    width: 100% !important;
  }
  
  .tabgroup.horizontal .tabs-wrapper .tab {
    float: none;
    margin-bottom: 5px;
  }
  
  /* Page Header */
  #page-header {
    margin: 0;
    padding: 15px 20px 0;
  }
  
  #page-header .primary,
  #page-header .secondary {
    float: none;
    width: 100% !important;
    padding-top: 10px;
  }
  
  /* Welcome Bar */
  #welcome-bar {
    padding: 15px;
  }
  
  #welcome-bar h2 {
    font-size: 1.5em;
  }
  
  #welcome-bar .wrapper p {
    font-size: 1.2em;
  }
  
  /* Footer */
  #footer-widget-area {
    margin-top: 0;
    padding: 40px 0 20px;
  }
  
  #footer-widget-area .wrapper {
    display: none;
  }
  
  #footer-bar .wrapper .primary {
    display: none;
  }
  
  #footer-widget-area .one-half,
  #footer-widget-area .one-third,
  #footer-widget-area .one-fourth,
  #footer-widget-area .two-third,
  #footer-widget-area .three-fourth {
    float: none;
    margin-right: 0;
    width: 100% !important;
  }
  
  /* Slider captions */
  #cycle-slider .slide .caption,
  #featured-image .image-wrapper .caption {
    position: static;
    width: 100% !important;
    opacity: 1;
  }
  
  /* Featured content */
  body.with-featured-content #main {
    margin-top: 0;
  }
  
  body.header-style-left.with-featured-content #header {
    height: 375px;
  }
  
  body.header-style-center.with-featured-content #header-wrapper {
    padding-bottom: 15px;
  }
  
  #main .featured-content {
    padding: 25px 17px 10px;
  }
  
  /* Nivo Slider - Container apenas */
  #nivo-slider-area {
    max-width: 100%;
    overflow: hidden;
  }
  
  #nivo-slider-area .wrapper {
    max-width: 100%;
    overflow: hidden;
  }
  
}

/* @end */


/* @group Mobile Portrait (320px - 480px)
============================================================ */

@media only screen and (max-width: 480px) {
  
  /* Typography adjustments */
  body {
    font-size: 14px;
  }
  
  h1 {
    font-size: 1.8em;
  }
  
  h2 {
    font-size: 1.5em;
  }
  
  h3 {
    font-size: 1.3em;
  }
  
  h4, h5, h6 {
    font-size: 1.1em;
  }
  
  /* Spacing */
  .wrapper {
    padding: 0 10px;
  }
  
  #main-wrapper {
    padding: 15px 10px;
  }
  
  #page-header {
    padding: 10px 15px 0;
  }
  
  /* Logo */
  #header .wrapper #logo img {
    max-width: 200px;
  }
  
  /* Navigation */
  #mobile-menu-toggle {
    right: 17px;
    padding: 8px 10px;
  }
  
  #mobile-menu-toggle span {
    width: 22px;
    height: 2px;
    margin: 4px 0;
  }
  
  #main-nav {
    left: 10px;
    right: 10px;
  }
  
  /* Entry meta */
  .entry-meta .meta-info {
    float: none;
    display: block;
    margin-bottom: 5px;
  }
  
  /* Comments */
  #comments .comment {
    padding: 15px 10px 0;
  }
  
  #comments .comment .gravatar {
    float: none;
    margin-bottom: 10px;
    text-align: center;
  }
  
  /* Blockquotes */
  blockquote.alignleft,
  blockquote.alignright {
    float: none;
    margin: 10px 0 !important;
    width: 100%;
  }
  
  /* Social icons */
  ul.social-icons li {
    margin-right: 10px;
  }
  
  /* Search form */
  .searchform input[type=text] {
    width: calc(100% - 40px) !important;
  }
  
  /* Widget spacing */
  .widget {
    margin-bottom: 30px;
  }
  
  /* Widget title - maior e centralizado */
  #sidebar .widget h3,
  #sidebar .widget .widget-title {
    font-size: 1.8em;
    text-align: center;
    padding-bottom: 10px;
    font-weight: bold;
  }
  
  /* Sidebar na home - mais espaçamento */
  body.home #main #sidebar {
    padding-top: 30px;
  }
  
  /* Sidebar na home - largura total em telas pequenas */
  body.home #main #sidebar {
    width: 100% !important;
  }
  
  /* Info boxes */
  .info-box {
    padding: 8px 8px 8px 30px;
  }
  
  .info-box.no-icon {
    padding: 8px;
  }
  
  /* Gallery */
  .gallery .gallery-item {
    width: 100% !important;
    margin: 0 0 15px 0;
  }
  
  /* Paginator */
  .paginator a,
  .paginator span {
    margin: 5px 5px 5px 0;
    padding: 8px 10px;
  }
  
}

/* @end */


/* @group Small Mobile (max 360px)
============================================================ */

@media only screen and (max-width: 360px) {
  
  body {
    font-size: 13px;
  }
  
  #header .wrapper #logo img {
    max-width: 160px;
    max-height: 40px;
  }
  
  #mobile-menu-toggle {
    padding: 6px 10px;
    right: 8px;
  }
  
  #mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    margin: 4px 0;
  }
  
  h1 {
    font-size: 1.6em;
  }
  
  h2 {
    font-size: 1.4em;
  }
  
  .entry {
    padding-bottom: 1.5em;
  }
  
}

/* @end */


/* @group Landscape Orientation
============================================================ */

@media only screen and (max-width: 768px) and (orientation: landscape) {
  
  #main-nav {
    max-height: 70vh;
  }
  
  #mobile-menu-toggle {
    top: 10px;
  }
  
}

/* @end */


/* @group Print Styles
============================================================ */

@media print {
  
  #header-bar,
  #main-nav,
  #mobile-menu-toggle,
  #sidebar,
  #footer-widget-area,
  #footer-bar,
  .paginator,
  .entry-meta,
  .taggroup,
  #comments {
    display: none !important;
  }
  
  #content {
    width: 100% !important;
    float: none !important;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
  
}

/* @end */


/* @group Touch Device Improvements
============================================================ */

@media (hover: none) and (pointer: coarse) {
  
  /* Larger touch targets */
  a,
  button,
  input[type=submit],
  input[type=reset] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch */
  #main-nav ul li ul li a:hover {
    background: transparent;
  }
  
}

/* @end */


/* @group Accessibility Improvements
============================================================ */

/* Focus states for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
  background: #000;
  color: #fff;
  left: 50%;
  padding: 10px;
  position: absolute;
  top: -100px;
  transform: translateX(-50%);
  transition: top 0.3s;
  z-index: 9999;
}

.skip-to-content:focus {
  top: 10px;
}

/* @end */

