/*
 * Azores.com island detail pages.
 * Direct theme path: /wp-content/themes/portugal/css/azores-island-detail.css
 * Shared by the nine root island pages only.
 */

#body.azores-island-detail-page .image-page-header .carousel-content-container { height:310px; }
#body.azores-island-detail-page > .carousel { float:none!important; clear:both!important; width:100%; margin-bottom:0!important; }

#body.azores-island-detail-page .azd-breadcrumb-strip {
    display:block; clear:both; width:100%; margin:0; padding:10px 0 0; background:transparent;
}
#body.azores-island-detail-page .azd-breadcrumbs {
    max-width:1120px; margin:0 auto; padding:10px 14px; background:#fcfcfc; box-sizing:border-box;
}
#body.azores-island-detail-page .azd-breadcrumbs ol {
    display:flex; flex-wrap:wrap; align-items:center; margin:0; padding:0; list-style:none;
}
#body.azores-island-detail-page .azd-breadcrumbs li {
    display:inline-flex; align-items:center; margin:0; padding:0; color:#596b82; list-style:none;
}
#body.azores-island-detail-page .azd-breadcrumbs li + li::before {
    content:"›"; display:inline-block; margin:0 9px; color:#8794a5;
}
#body.azores-island-detail-page .azd-breadcrumbs a,
#body.azores-island-detail-page .azd-breadcrumbs span { font-size:14px; line-height:1.35; text-decoration:none; }
#body.azores-island-detail-page .azd-breadcrumbs a { color:#435a78; font-weight:400; }
#body.azores-island-detail-page .azd-breadcrumbs span[aria-current="page"] { color:#3b56c4; font-weight:500; }

#body.azores-island-detail-page .azores-island-detail-wrapper { max-width:1120px; margin:16px auto 55px; }
#body.azores-island-detail-page .azores-island-detail-content { background:transparent; border:0; overflow:visible; }
#body.azores-island-detail-page .information-content { min-height:0; padding:0; }
#body.azores-island-detail-page h1.page-title {
    float:none; margin:0 0 22px; color:#3b7bcd; font-size:38px; font-weight:700; line-height:1.18;
}
#body.azores-island-detail-page .azd-content { color:#484848; font-size:16px; line-height:1.6; }
#body.azores-island-detail-page .azd-content *,
#body.azores-island-detail-page .azd-content *::before,
#body.azores-island-detail-page .azd-content *::after { box-sizing:border-box; }

#body.azores-island-detail-page .azd-intro,
#body.azores-island-detail-page .azd-section {
    margin:0 0 24px; padding:32px; background:#fff; border:1px solid #dedede; border-radius:6px;
    box-shadow:0 3px 14px rgba(0,0,0,.07);
}
#body.azores-island-detail-page .azd-eyebrow,
#body.azores-island-detail-page .azd-kicker {
    margin:0 0 7px; color:#139a68; font-size:14px; font-weight:700; letter-spacing:.05em; line-height:1.3; text-transform:uppercase;
}
#body.azores-island-detail-page .azd-content h2 {
    margin:0 0 14px; color:#3b7bcd; font-size:30px; font-weight:700; line-height:1.22;
}
#body.azores-island-detail-page .azd-content h3 {
    margin:0 0 8px; color:#3b7bcd; font-size:20px; font-weight:700; line-height:1.3;
}
#body.azores-island-detail-page .azd-content p { margin:0 0 15px; font-size:16px; line-height:1.6; }
#body.azores-island-detail-page .azd-content p:last-child { margin-bottom:0; }
#body.azores-island-detail-page .azd-lead { color:#343434; font-size:19px; line-height:1.58; }
#body.azores-island-detail-page .azd-section-heading { max-width:850px; margin:0 0 22px; }

#body.azores-island-detail-page .azd-quickfacts {
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:22px;
}
#body.azores-island-detail-page .azd-quickfacts > div {
    padding:16px 17px; background:#f8fafc; border:1px solid #dce3ec; border-radius:5px;
}
#body.azores-island-detail-page .azd-quickfacts strong {
    display:block; margin-bottom:5px; color:#435a78; font-size:13px; text-transform:uppercase; letter-spacing:.04em;
}
#body.azores-island-detail-page .azd-quickfacts span { display:block; color:#484848; font-size:15px; line-height:1.45; }

#body.azores-island-detail-page .azd-family-nav {
    display:flex; flex-wrap:wrap; gap:8px; margin:24px 0 0; padding-top:19px; border-top:1px solid #e4e4e4;
}
#body.azores-island-detail-page .azd-family-nav a {
    display:inline-flex; align-items:center; min-height:38px; padding:8px 13px; background:#f4f4f2; border:1px solid #dedede;
    border-radius:4px; color:#484848; font-size:14px; font-weight:700; text-decoration:none;
}
#body.azores-island-detail-page .azd-family-nav a:hover,
#body.azores-island-detail-page .azd-family-nav a:focus { background:#eaf0fb; border-color:#b9cae7; color:#2f62aa; }

#body.azores-island-detail-page .azd-card-grid,
#body.azores-island-detail-page .azd-planning-grid,
#body.azores-island-detail-page .azd-link-grid {
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px;
}
#body.azores-island-detail-page .azd-card,
#body.azores-island-detail-page .azd-planning-card {
    padding:20px; background:#fafafa; border:1px solid #d9d9d9; border-top:4px solid #139a68; border-radius:5px;
}
#body.azores-island-detail-page .azd-card p,
#body.azores-island-detail-page .azd-planning-card p { margin:0; font-size:15px; line-height:1.55; }

#body.azores-island-detail-page .azd-link-grid a {
    display:block; padding:19px; background:#f8fafc; border:1px solid #d9e1eb; border-radius:5px; text-decoration:none;
}
#body.azores-island-detail-page .azd-link-grid strong {
    display:block; margin-bottom:5px; color:#3b7bcd; font-size:18px; line-height:1.3;
}
#body.azores-island-detail-page .azd-link-grid span { display:block; color:#555; font-size:15px; line-height:1.5; }

#body.azores-island-detail-page .azd-image-grid {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:24px;
}
#body.azores-island-detail-page .azd-image-grid:has(.azd-figure:only-child) { grid-template-columns:minmax(0,760px); }
#body.azores-island-detail-page .azd-figure { margin:0; }
#body.azores-island-detail-page .azd-figure img {
    display:block; width:100%; aspect-ratio:3/2; object-fit:cover; border-radius:5px; box-shadow:0 4px 14px rgba(0,0,0,.12);
}
#body.azores-island-detail-page .azd-figure figcaption { margin-top:7px; color:#6d6d6d; font-size:12px; line-height:1.4; }

#body.azores-island-detail-page .azd-faq-list { display:grid; gap:11px; }
#body.azores-island-detail-page .azd-faq-list details { background:#fff; border:1px solid #d9d9d9; border-radius:5px; }
#body.azores-island-detail-page .azd-faq-list summary {
    position:relative; padding:17px 48px 17px 18px; color:#3b7bcd; cursor:pointer; font-size:17px; font-weight:700; line-height:1.35; list-style:none;
}
#body.azores-island-detail-page .azd-faq-list summary::-webkit-details-marker { display:none; }
#body.azores-island-detail-page .azd-faq-list summary::after {
    content:"+"; position:absolute; top:50%; right:18px; color:#139a68; font-size:25px; line-height:1; transform:translateY(-50%);
}
#body.azores-island-detail-page .azd-faq-list details[open] summary::after { content:"−"; }
#body.azores-island-detail-page .azd-faq-list details[open] summary { border-bottom:1px solid #e1e1e1; }
#body.azores-island-detail-page .azd-faq-list details p { padding:17px 18px 19px; margin:0; }

#body.azores-island-detail-page .azd-cta {
    display:flex; align-items:center; justify-content:space-between; gap:28px; margin:0 0 24px; padding:30px 32px;
    background:#3b7bcd; border-radius:6px; box-shadow:0 4px 14px rgba(0,0,0,.12);
}
#body.azores-island-detail-page .azd-cta > div:first-child { max-width:650px; }
#body.azores-island-detail-page .azd-cta .azd-kicker,
#body.azores-island-detail-page .azd-cta h2,
#body.azores-island-detail-page .azd-cta p { color:#fff; }
#body.azores-island-detail-page .azd-actions { display:flex; flex-wrap:wrap; gap:10px; flex:0 0 260px; }
#body.azores-island-detail-page .azd-button {
    display:inline-flex; align-items:center; justify-content:center; width:100%; min-height:45px; padding:10px 18px;
    border:2px solid transparent; border-radius:5px; font-size:15px; font-weight:700; text-align:center; text-decoration:none!important;
}
#body.azores-island-detail-page .azd-button-light { background:#fff; border-color:#fff; color:#2f62aa!important; }

#body.azores-island-detail-page .azd-content-review {
    margin:0; padding:18px 22px; background:#fff; border:1px solid #dedede; border-radius:5px; color:#666; font-size:14px; line-height:1.5;
}
#body.azores-island-detail-page .azd-content-review strong { color:#484848; }

@media screen and (max-width:1140px) {
    #body.azores-island-detail-page .azd-breadcrumbs { margin-right:16px; margin-left:16px; }
    #body.azores-island-detail-page .azores-island-detail-wrapper { margin-right:16px; margin-left:16px; }
}
@media screen and (max-width:900px) {
    #body.azores-island-detail-page .azd-card-grid,
    #body.azores-island-detail-page .azd-planning-grid,
    #body.azores-island-detail-page .azd-link-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #body.azores-island-detail-page .azd-quickfacts { grid-template-columns:1fr; }
    #body.azores-island-detail-page .azd-cta { display:block; }
    #body.azores-island-detail-page .azd-actions { max-width:520px; margin-top:20px; }
}
@media screen and (max-width:767px) {
    #body.azores-island-detail-page .image-page-header .carousel-content-container { height:190px; }
    #body.azores-island-detail-page .azd-breadcrumb-strip { padding-top:8px; }
    #body.azores-island-detail-page .azd-breadcrumbs { width:calc(100% - 24px); margin-right:auto; margin-left:auto; padding:9px 10px; }
    #body.azores-island-detail-page .azores-island-detail-wrapper { margin-top:12px; margin-bottom:35px; }
    #body.azores-island-detail-page h1.page-title { margin-bottom:16px; font-size:30px; }
    #body.azores-island-detail-page .azd-intro,
    #body.azores-island-detail-page .azd-section { padding:23px 19px; }
    #body.azores-island-detail-page .azd-content h2 { font-size:26px; }
    #body.azores-island-detail-page .azd-lead { font-size:18px; }
    #body.azores-island-detail-page .azd-cta { padding:24px 19px; }
}
@media screen and (max-width:600px) {
    #body.azores-island-detail-page .azores-island-detail-wrapper { margin-right:12px; margin-left:12px; }
    #body.azores-island-detail-page .azd-card-grid,
    #body.azores-island-detail-page .azd-planning-grid,
    #body.azores-island-detail-page .azd-link-grid,
    #body.azores-island-detail-page .azd-image-grid { grid-template-columns:1fr; }
    #body.azores-island-detail-page .azd-family-nav { display:block; }
    #body.azores-island-detail-page .azd-family-nav a { width:100%; margin-bottom:9px; }
}
/* =========================================================
   REV 6 — ISLAND DETAIL LINK GRID ALIGNMENT FIX
   WordPress may insert <br> elements between adjacent links.
   Those become CSS Grid items and create the left/right/center
   stagger seen on the island pages. Remove them from layout and
   hard-reset direct card links so they fill the grid normally.
   ========================================================= */

#body.azores-island-detail-page .azd-link-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 18px !important;
    align-items: stretch !important;
    justify-items: stretch !important;
}

/* wpautop / editor line breaks must not become grid items. */
#body.azores-island-detail-page .azd-link-grid > br,
#body.azores-island-detail-page .azd-link-grid > br.clear,
#body.azores-island-detail-page .azd-link-grid > br.clearboth,
#body.azores-island-detail-page .azd-link-grid > br.clearfix {
    display: none !important;
    float: none !important;
    clear: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Defensive handling in case WordPress wraps editor content in <p>. */
#body.azores-island-detail-page .azd-link-grid > p {
    display: contents !important;
    margin: 0 !important;
    padding: 0 !important;
}

#body.azores-island-detail-page .azd-link-grid > p > br {
    display: none !important;
}

#body.azores-island-detail-page .azd-link-grid > a,
#body.azores-island-detail-page .azd-link-grid > p > a {
    display: block !important;
    float: none !important;
    clear: none !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
    grid-area: auto !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    transform: none;
}

#body.azores-island-detail-page .azd-link-grid > a:hover,
#body.azores-island-detail-page .azd-link-grid > a:focus,
#body.azores-island-detail-page .azd-link-grid > p > a:hover,
#body.azores-island-detail-page .azd-link-grid > p > a:focus {
    transform: translateY(-1px);
}

@media screen and (max-width: 900px) {
    #body.azores-island-detail-page .azd-link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 600px) {
    #body.azores-island-detail-page .azd-link-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* =========================================================
   REV 8 — ALL ISLAND EXPLORE-MORE GRIDS
   Every root island page now links to all seven supporting
   guide topics. Use a balanced 4 + 3 desktop layout.
   Tablet remains 2 columns; mobile remains 1 column.
   ========================================================= */
@media screen and (min-width:901px) {
    #body.azores-island-detail-page .azd-link-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* =========================================================
   REV 9 — ISLAND H2 COLOR CONSISTENCY
   Keep all root-island section H2 titles on the intended
   Azores blue even when legacy/global heading rules load later.
   Covers both possible body-class placements used by the theme.
   ========================================================= */
:is(#body.azores-island-detail-page, body.azores-island-detail-page #body) .azd-content h2 {
    color: #3b7bcd !important;
}

