/* =====================================================
   ISLAND COUNSELLING GUERNSEY — style.css
   ===================================================== */

/* ---- CUSTOM PROPERTIES ---- */
:root {
    --white-color:               #ffffff;
    --primary-color:             #002957;
    --secondary-color:           #00b374;
    --section-bg-color:          #E6F4F1;
    --site-footer-bg-color:      #44525d;
    --custom-btn-bg-color:       #002957;
    --custom-btn-bg-hover-color: #3F5689;
    --dark-color:                #000000;
    --p-color:                   #717275;
    --border-color:              #e9eaeb;
    --body-font:                 'Jost', sans-serif;

    --shadow-sm:  0 2px 15px rgba(0,0,0,0.07);
    --shadow-md:  0 8px 30px rgba(0,0,0,0.12);
    --shadow-lg:  0 20px 60px rgba(0,0,0,0.16);
    --radius-sm:  10px;
    --radius-md:  20px;
    --radius-lg:  100px;
}

/* ---- BASE ---- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--white-color);
    font-family: var(--body-font);
    color: var(--p-color);
    overflow-x: hidden;
}

main { min-height: 75vh; }

img { max-width: 100%; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--body-font);
    font-weight: 600;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 60px;
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--white-color);
    line-height: 1.1;
}

h2 {
    color: var(--secondary-color);
    font-size: 46px;
    letter-spacing: -2px;
}

h3 { font-size: 32px; color: var(--dark-color); }
h4 { font-size: 28px; color: var(--dark-color); }
h5 { color: var(--primary-color); font-size: 22px; }
h6 { font-size: 18px; color: var(--dark-color); }

p {
    color: var(--p-color);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.75;
    margin-bottom: 0;
}

a {
    color: var(--p-color);
    text-decoration: none;
    transition: color 0.25s ease;
}
a:hover { color: var(--primary-color); }

b, strong { font-weight: 700; }
em { font-style: normal; }
small { font-size: 12px; }

/* ---- LAYOUT ---- */
.section-padding {
    padding-top: 100px;
    padding-bottom: 100px;
}

/* ---- CUSTOM BUTTON ---- */
.custom-btn {
    background: var(--secondary-color);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    color: var(--white-color) !important;
    font-size: 16px;
    font-weight: 400;
    padding: 12px 28px;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
    font-family: var(--body-font);
}

.custom-btn:hover {
    background: var(--primary-color);
    color: var(--white-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,41,87,0.25);
}

.custom-border-btn {
    background: transparent;
    border: 2px solid var(--custom-btn-bg-color);
    color: var(--primary-color) !important;
}

.custom-border-btn:hover {
    background: var(--custom-btn-bg-hover-color);
    border-color: transparent;
    color: var(--white-color) !important;
}

/* ======================================================
   NAVBAR
   ====================================================== */
.navbar {
    background: var(--white-color);
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.07);
    transition: box-shadow 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.13);
}

.navbar-brand {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding: 0;
}

.brand-text {
    display: inline-block;
    vertical-align: middle;
}

.brand-text small {
    color: var(--secondary-color);
    display: block;
    font-size: 9.5px;
    line-height: normal;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav-logo {
    width: 75px;
    height: auto;
    margin: 10px 0;
    flex-shrink: 0;
}

/* Nav links */
.navbar-nav .nav-link {
    color: var(--p-color);
    font-size: 15px;
    font-weight: 400;
    padding: 22px 18px !important;
    position: relative;
    transition: color 0.25s ease;
}

/* Underline slide animation */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 14px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-nav .nav-link:hover::after { transform: scaleX(1); }
.navbar-nav .nav-link.dropdown-toggle::after { display: none; }

/* Dropdown chevron icon */
.dropdown-toggle .nav-chevron {
    font-size: 10px;
    margin-left: 4px;
    vertical-align: middle;
    transition: transform 0.25s;
}
.dropdown.show .nav-chevron { transform: rotate(180deg); }

/* Override Bootstrap's default dropdown arrow */
.dropdown-toggle::after {
    content: "\f282";
    font-family: "bootstrap-icons" !important;
    font-size: 11px;
    border: none;
    vertical-align: -0.1em;
    margin-left: 4px;
    transition: transform 0.25s;
    display: inline-block;
}

.show > .dropdown-toggle::after { transform: rotate(180deg); }

/* Dropdown menu */
.dropdown-menu {
    background: var(--white-color);
    box-shadow: var(--shadow-lg);
    border: 0;
    padding: 8px 0;
    margin-top: 0;
    border-radius: 14px;
    min-width: 220px;
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    color: var(--p-color);
    font-size: 14px;
    font-family: var(--body-font);
    padding: 11px 20px;
    transition: all 0.2s;
    font-weight: 400;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--section-bg-color);
    color: var(--primary-color);
}

@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* Navbar Toggler – custom hamburger */
.navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
}

.navbar-toggler:focus { box-shadow: none; outline: none; }

.navbar-toggler-icon {
    background-image: none !important;
    background: var(--dark-color);
    display: block;
    width: 26px;
    height: 2px;
    position: relative;
    transition: background 0.15s 0.3s;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    background: var(--dark-color);
    width: 26px;
    height: 2px;
    transition: top 0.3s 0.35s ease, transform 0.3s 0.05s ease;
}

.navbar-toggler-icon::before { top: -8px; }
.navbar-toggler-icon::after  { top: 8px; }

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background: transparent;
    transition: background 0.1s;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    top: 0; transform: rotate(45deg);
    transition: top 0.3s 0.05s ease, transform 0.3s 0.35s ease;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    top: 0; transform: rotate(-45deg);
    transition: top 0.3s 0.05s ease, transform 0.3s 0.35s ease;
}

/* ======================================================
   HERO SECTION
   ====================================================== */
.hero-section {
    position: relative;
    height: 680px;
    overflow: hidden;
}

.carousel,
.carousel-inner,
.carousel-item {
    height: 100%;
}

.carousel-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    inset: 0;
    transition: transform 8s ease;
}

/* Subtle Ken Burns on active slide */
.carousel-item.active .carousel-bg-image {
    transform: scale(1.05);
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        150deg,
        rgba(0, 41, 87, 0.65) 0%,
        rgba(0, 179, 116, 0.30) 100%
    );
    z-index: 1;
}

/* Caption – centered */
.carousel-center-caption {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.caption-inner {
    animation: captionIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes captionIn {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.carousel-center-caption h1 {
    color: var(--white-color);
    font-size: 78px;
    font-weight: 700;
    letter-spacing: -3px;
    text-shadow: 0 4px 24px rgba(0,0,0,0.25);
    line-height: 1;
    margin-bottom: 16px;
}

.caption-divider {
    width: 70px;
    height: 3px;
    background: var(--secondary-color);
    margin: 0 auto 16px;
    border-radius: 3px;
}

.caption-sub {
    color: rgba(255,255,255,0.92);
    font-size: 26px;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
    margin: 0;
}

/* Carousel controls */
.carousel-control-prev,
.carousel-control-next {
    opacity: 0;
    width: 70px;
    z-index: 5;
    transition: opacity 0.35s ease;
}

.hero-section:hover .carousel-control-prev,
.hero-section:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--secondary-color);
    border-radius: 50%;
    background-size: 55% 55%;
    width: 55px;
    height: 55px;
    transition: background-color 0.25s ease;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
    background-color: var(--primary-color);
}

/* ======================================================
   SERVICES SECTION
   ====================================================== */
.services-section {
    padding: 60px 0;
    background: var(--white-color);
}

.service-link {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
}

.service-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 18px;
    border: 2px solid var(--border-color);
    padding: 28px 14px;
    min-height: 220px;
    height: 100%;
    background: var(--white-color);
    cursor: pointer;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
    will-change: transform;
}

.service-block:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 12px 40px rgba(0, 179, 116, 0.15);
    transform: translateY(-7px);
}

.service-icon-wrap {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--section-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: background 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.service-icon-wrap i {
    font-size: 27px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.service-block:hover .service-icon-wrap {
    background: var(--secondary-color);
    transform: scale(1.1) rotate(-5deg);
}

.service-block:hover .service-icon-wrap i {
    color: var(--white-color);
}

.service-block-text {
    color: var(--primary-color);
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
    font-weight: 400;
}

.service-block-text strong {
    color: var(--primary-color);
    font-weight: 700;
    display: block;
}

/* ======================================================
   ABOUT SECTION
   ====================================================== */
.about-section {
    background-image: url('images/newgys/gys34.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(230, 244, 241, 0.93);
    z-index: 0;
}

.about-section .container { position: relative; z-index: 1; }

.custom-text-box {
    background: var(--white-color);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    padding: 40px 44px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}

.custom-text-box:hover { box-shadow: var(--shadow-md); }

.info-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--section-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon-wrap i {
    font-size: 22px;
    color: var(--secondary-color);
}

/* ======================================================
   TEAM SECTION
   ====================================================== */
.team-section {
    background: var(--section-bg-color);
}

.team-section h2 { color: var(--primary-color); }

.team-card {
    background: var(--white-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.team-card-img-wrap {
    overflow: hidden;
    height: 270px;
}

.team-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.6s ease;
}

.team-card:hover .team-card-image { transform: scale(1.04); }

.team-card-body {
    padding: 28px 28px 18px;
    flex: 1;
}

.team-card-body p { margin-bottom: 16px; }

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.contact-detail > i {
    font-size: 15px;
    color: var(--secondary-color);
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-detail > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact-detail strong {
    font-size: 12px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-detail a {
    font-size: 13px;
    color: var(--p-color);
    word-break: break-all;
}

.contact-detail a:hover { color: var(--secondary-color); }

.team-card-btn {
    display: block;
    background: var(--secondary-color);
    color: var(--white-color) !important;
    text-align: center;
    padding: 16px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--body-font);
    transition: background 0.25s ease;
    letter-spacing: 0.3px;
    margin-top: auto;
}

.team-card-btn:hover {
    background: var(--primary-color);
    color: var(--white-color) !important;
}

/* ======================================================
   CONTACT SECTION
   ====================================================== */
.contact-section {
    background-image: url('images/newgys/gys29.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.contact-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 41, 87, 0.55);
    z-index: 0;
}

.contact-section .container { position: relative; z-index: 1; }

.contact-form {
    background: var(--section-bg-color);
    border-radius: var(--radius-md);
    padding: 48px 44px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
}

.contact-form h2 { color: var(--primary-color); margin-bottom: 10px; }

.form-field {
    display: block;
    width: 100%;
    background: var(--white-color);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--dark-color);
    font-family: var(--body-font);
    font-size: 15px;
    font-weight: 400;
    padding: 13px 16px;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-field::placeholder { color: #aaa; font-weight: 300; }

.form-field:hover { border-color: rgba(0, 179, 116, 0.4); }
.form-field:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(0, 179, 116, 0.12);
}

textarea.form-field { resize: vertical; min-height: 130px; }

.submit-btn {
    display: block;
    width: 100%;
    background: var(--custom-btn-bg-color);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--white-color);
    font-family: var(--body-font);
    font-size: 16px;
    font-weight: 600;
    padding: 15px 30px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    letter-spacing: 0.3px;
}

.submit-btn:hover {
    background: var(--custom-btn-bg-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,41,87,0.3);
}

.submit-btn:active { transform: translateY(0); }

/* ======================================================
   CTA SECTION
   ====================================================== */
.cta-section {
    background: var(--section-bg-color);
    position: relative;
    overflow: hidden;
}

/* Decorative blobs */
.cta-section::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.06;
    pointer-events: none;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -40px;
    width: 200px;
    height: 200px;
    border: 22px solid var(--secondary-color);
    border-radius: 50%;
    opacity: 0.1;
    pointer-events: none;
}

.cta-section h2 { color: var(--primary-color); }

/* ======================================================
   FOOTER
   ====================================================== */
.site-footer {
    background: var(--site-footer-bg-color);
    padding-top: 70px;
}

.site-footer-title { color: var(--secondary-color); }

.site-footer p { color: rgba(255,255,255,0.8); }

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 20px;
}

.footer-menu-item { break-inside: avoid; }

.footer-menu-link {
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    display: inline-block;
    margin-bottom: 10px;
    transition: color 0.25s;
    position: relative;
}

.footer-menu-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.footer-menu-link:hover { color: var(--secondary-color); }
.footer-menu-link:hover::after { width: 100%; }

.site-footer-bottom {
    background: var(--secondary-color);
    margin-top: 60px;
    padding: 22px 0;
}

.site-footer-bottom a { color: var(--white-color); }
.site-footer-bottom a:hover { color: #ffffaa; }

.copyright-text {
    color: rgba(255,255,255,0.88);
    font-size: 13px;
}

/* ======================================================
   SCROLL ANIMATIONS
   ====================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.65s ease, transform 0.65s ease;
    transition-delay: var(--delay, 0s);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ======================================================
   UTILITY
   ====================================================== */
.hide-mobile { display: inline; }

/* ======================================================
   RESPONSIVE
   ====================================================== */

/* Large tablets / small desktops */
@media (max-width: 1199px) {
    .carousel-center-caption h1 { font-size: 64px; }
    .caption-sub { font-size: 22px; }
}

/* Tablets */
@media (max-width: 991px) {
    h1 { font-size: 46px; }
    h2 { font-size: 36px; }
    h5 { font-size: 20px; }

    .section-padding {
        padding-top: 70px;
        padding-bottom: 70px;
    }

    .hero-section { height: 520px; }
    .carousel-center-caption h1 { font-size: 52px; }
    .caption-sub { font-size: 20px; }

    .navbar-nav { padding-bottom: 16px; }
    .navbar-nav .nav-link { padding: 10px 20px !important; }
    .navbar-nav .nav-link::after { display: none; }
    .nav-item.ms-lg-3 { margin-left: 20px !important; margin-top: 8px; }

    /* Dropdown on mobile: transparent bg */
    .dropdown-menu {
        box-shadow: none;
        background: transparent;
        animation: none;
        border-radius: 0;
    }

    .dropdown-item {
        padding-left: 28px;
        font-size: 14px;
    }

    .custom-text-box { padding: 28px 30px; }
    .contact-form { padding: 32px 28px; }
}

/* Portrait tablets */
@media (max-width: 768px) {
    .hero-section { height: 440px; }
    .carousel-center-caption h1 { font-size: 40px; letter-spacing: -1.5px; }
    .caption-sub { font-size: 16px; letter-spacing: 2px; }
    .caption-divider { width: 50px; }

    .services-section { padding: 50px 0; }
    .service-block { min-height: 185px; padding: 22px 10px; }
    .service-icon-wrap { width: 58px; height: 58px; }
    .service-icon-wrap i { font-size: 22px; }
    .service-block-text { font-size: 12px; }

    .team-card-img-wrap { height: 240px; }

    /* Disable fixed bg on mobile (performance + Safari bug) */
    .about-section,
    .contact-section {
        background-attachment: scroll;
    }
}

/* Small phones */
@media (max-width: 575px) {
    h1 { font-size: 38px; }
    h2 { font-size: 30px; }

    .hero-section { height: 380px; }
    .carousel-center-caption h1 { font-size: 34px; letter-spacing: -1px; }
    .caption-sub { font-size: 14px; }

    .nav-logo { width: 55px; }
    .hide-mobile { display: none !important; }

    .services-section { padding: 40px 0; }
    .service-block { min-height: 170px; padding: 18px 8px; }

    .custom-text-box { padding: 24px 22px; }
    .contact-form { padding: 26px 20px; }

    .footer-menu { columns: 1; }
    .section-padding { padding-top: 55px; padding-bottom: 55px; }

    /* Carousel controls always visible on touch */
    .carousel-control-prev,
    .carousel-control-next { opacity: 0.7; }
}

/* Very small phones */
@media (max-width: 380px) {
    .navbar-brand { font-size: 16px; }
    .carousel-center-caption h1 { font-size: 28px; }
}
