/**
 * Responsive styles for Piermont Bank theme
 */

 /* For the tab bar on homepage */
@media (max-width: 1170px) {
    .lending-section .tab-bar,
    .banking-section .tab-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        position: relative;
    }

    .lending-section .tab-bar::-webkit-scrollbar,
    .banking-section .tab-bar::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .lending-section .tab-container,
    .banking-section .tab-container {
        overflow: hidden;
        position: relative;
    }

    /* Right side gradient overlay */
    .lending-section .tab-container::after,
    .banking-section .tab-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        width: 100px;
        height: 100%;
        background: linear-gradient(to right, rgba(247, 250, 255, 0), rgba(247, 250, 255, 0.8));
        pointer-events: none;
        z-index: 2;
    }
      
      /* Left side gradient overlay */
    /*.lending-section .tab-container::before,
    .banking-section .tab-container::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 100px;
        height: 100%;
        background: linear-gradient(to left, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5));
        pointer-events: none;
        z-index: 2;
    }*/
}
/* Tablet */
@media (max-width: 992px) {
    /* Header */
    .main-navigation ul {
        flex-direction: column;
    }
    
    .main-navigation li {
        margin: 0 0 15px;
    }
    
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }
    
    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px 0;
        background-color: #0a214e;
        transition: all 0.3s ease;
    }
    
    .main-navigation {
        position: fixed;
        top: 60px;
        left: 0;
        right: -100%;
        flex-direction: column;
        align-items: flex-start;
        background-color: #fff;
        display: none;
        padding: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
    }
    
    .main-navigation.active {
        display: flex;
        width: 100%;
    }

    .site-header .nav-links.active {
        flex-direction: column;
        width: 100%;
    }
    
    .site-header .nav-links a {
        height: auto;
        padding: 12px 0;
        width: 100%;
    }

    .site-header .nav-item {
        width: 100%;
    }

    .site-header .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transition: max-height 0.3s ease;
        border: none;
    }

    .site-header .dropdown-icon::after {
        content: '';
        position: absolute;
        top: -15px;
        right: -15px;
        bottom: -15px;
        left: -15px;
    }

    .site-header .nav-item.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        width: 100%;
        max-height: 500px;
    }

    .site-header a.dropdown-item {
        padding-left: 10px;
    }

    .site-header .dropdown-icon {
        margin-left: auto;
        margin-right: 22px;
    }
    
    .cta-container {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        margin-top: 16px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    /* Hero section */
    .hero-section .container {
        flex-direction: column;
        max-width: 760px;
        align-items: center;
        justify-content: center;
    }

    .hero-content-container {
        display: flex;
        flex-direction: column;
    }

    .hero-content {
        align-items: center;
        padding: 40px 0px;
    }

    .hero-content h1,
    .hero-content p {
        text-align: center;
    }

    .hero-buttons-container {
        width: unset;
    }

    /* Featured section*/
    .feature {
        width: calc(50% - 60px);
    }

    .featured-section .filter-start,
    .featured-section .filter-end {
        display: none;
    }

    .insights-grid {
        justify-content: unset;
        align-items: unset;
        overflow-x: scroll;
        overflow-y: hidden;
    }

    .testimonials-carousel {
        overflow: hidden;
    }
    
    .testimonial:not(.active) {
        display: none;
    }

    .slider-controls {
        position: static;
        transform: none;
        margin-top: 20px;
        justify-content: center;
        gap: 10px;
        padding: 0;
    }
    .join-team-container {
        grid-template-columns: 1fr;
    }

    .join-team-section .container {
        padding: 0px;
    }
    .join-team-image {
        aspect-ratio: 16 / 9;
        order: 2;
    }
    .join-team-content {
        order: 1;
    }

    .join-team-section p {
        width: 100%;
        max-width: 100%;
    }
    .join-team-section h2,
    .join-team-section h3,
    .join-team-section p {
        text-align: center;
    }

    .join-team-section .btn-icon-blue {
        margin: auto;
    }
}

/* Tablet and smaller screens 768 or smaller */
@media (max-width: 768px) {
    /* Header */
    .fdic-logo {
        height: 14px;
        width: unset;
    }
    
    /*.primary-menu-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 20px;
        z-index: 100;
    }
    
    .primary-menu-container.active {
        display: block;
    }*/

    .container {
        padding: 0 20px;
    }

    .btn-icon-blue,
    .btn-icon-outline {
        padding: 9px 12px;
    }
    
    h1.staff-name {
        font-size: 56px;
    }

    /* line of credit section */
    .loc-section-bg {
        width: unset;
    }

    .loc-slides-wrapper {
        height: 460px;
    }
    
    /* Features section */
    .features {
        flex-wrap: wrap;
    }
    
    .feature {
        flex: 0 0 calc(50% - 20px);
        margin-bottom: 20px;
    }
    
    /* Banking and Lending sections */
    .banking-nav, .lending-options {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        background-color: white;
        border-radius: 10px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        padding: 15px;
        z-index: 100;
        left: 0;
        right: 0;
        margin: 10px auto;
        max-width: 90%;
    }
    
    .banking-nav.mobile-open, .lending-options.mobile-open {
        display: flex;
    }
    
    .banking-nav button, .lending-options button {
        width: 100%;
        text-align: left;
        padding: 15px;
        margin: 5px 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        margin: 0 auto 20px;
    }
    
    .banking-content {
        flex-direction: column;
    }
    .lending-content {
        flex-direction: column-reverse;
    }
    
    .banking-image, .banking-details, .lending-image, .lending-details {
        width: 100%;
        flex: none;
    }
    
    .banking-image, .lending-image {
        margin-bottom: 30px;
    }
    
    /* Embedded Banking section */
    .embedded-section {
        flex-direction: column;
    }
    
    .embedded-image {
        margin-bottom: 30px;
    }
    
    /* Insights section */
    .insights-grid {
        grid-template-columns: 1fr;
        gap: 0px;
    }
    
    .insight-card {
        margin: 20px;
        min-width: unset;
    }
    
    /* Testimonials */
    .testimonials-carousel {
        padding: 20px;
    }
    .testimonials-section h2 {
        margin-bottom: 60px;
    }
    .testimonial {
        flex-direction: column;
        padding: 20px;
    }

    .testimonials-container {
        min-height: 500px;
    }

    .testimonial {
        min-height: 480px;
    }

    .testimonial-content {
        padding: 0px;
    }
    
    .testimonial-image {
        margin-bottom: 20px;
        aspect-ratio: 16 / 5;
        flex: unset;
    }
    
    /* Footer */
    .footer-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-col {
        width: 100%;
    }

    .pmb-thank-you-container {
        flex-direction: column;
    }
}

/* Small screens and mobile 480 or smaller */
@media (max-width: 480px) {
    /* Header */
    .site-logo {
        width: 140px;
        height: 20px;
    }
    .menu-toggle span {
        width: 20px;
        height: 2px;
    }

    h1 {
        font-size: var(--primary-mobile-h1);
        letter-spacing: 0px;
    }
    strong, p {
        font-size: var(--primary-mobile-text);
    }

    .hero-section .container {
        gap: 20px;
    }

    .about-us-header h1,
    .hero-content h1,
    h1.staff-name {
        font-size: var(--primary-mobile-h1);
    }

    .featured-section h3 {
        font-size: 20px;
        letter-spacing: -0.3px;
    }

    .loc-section p {
        font-size: 18px;
        letter-spacing: -0.3px;
    }

    .loc-section h3,
    .banking-h3,
    .lending-h3,
    .insights-h3,
    .testimonials-h3,
    .join-team-section h3 {
        font-size: 12px;
        letter-spacing: 1.4px;
    }
    .features-h2 {
        font-size: 22px;
        letter-spacing: -0.7px;
    }
    .loc-section h2,
    .banking-h2,
    .lending-h2,
    .lending-details h3,
    .banking-details-title,
    .insights-h2,
    .testimonials-h2,
    .join-team-section h2,
    h2.staff-position {
        font-size: 25px;
        letter-spacing: -0.8px;
    }

    .features-p {
        font-size: 14px;
        letter-spacing: -0.2px;
        margin: 0 auto 20px;
    }
    .feature-content {
        font-size: 14px;
        letter-spacing: -0.2px;
    }
    .lending-details p,
    .banking-details-content,
    .join-team-section p {
        font-size: var(--primary-mobile-text);
        letter-spacing: -0.1px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .fdic-text {
        font-size: var(--fdic-mobile-text);
    }
    .fdic-logo {
        height: 13px;
        width: unset;
    }

    .site-header {
        height: 47px;
    }

    .main-navigation {
        top: 45px;
    }

    .btn-icon-blue span,
    .btn-icon-outline span,
    .btn-icon-no-bg span,
    .site-header .nav-links a,
    .site-header .nav-links .nav-link-text,
    .btn,
    .btn-icon-blue,
    .btn-icon-outline,
    .btn-icon-no-bg,
    .lending-options button,
    .banking-nav button {
        font-size: var(--button-mobile-text);
    }

    .hero-section,
    .testimonials-section,
    .featured-section,
    .loc-section .container,
    .features-section,
    .lending-section,
    .banking-section,
    .insights-section {
        padding: var(--section-padding-mobile);
    }
    .hero-content {
        max-width: 420px;
        padding: 20px;
    }
    .hero-buttons-container {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }
    .hero-buttons-container .btn-icon-blue,
    .hero-buttons-container .btn-icon-outline {
        align-items: center;
        justify-content: center;
    }
    
    .hero-image {
        max-width: 420px;
    }
    .hero-description {
        font-size: 14px;
        letter-spacing: -0.2px;
    }

    .loc-slides-wrapper {
        height: 360px;
    }
    .loc-nav-button.loc-prev {
        left: 20px;
    }
    .loc-nav-button.loc-next {
        right: 20px;
    }
    .loc-nav-button {
        width: 30px;
        height: 30px;
    }
    /* Features section */
    .feature {
        flex: 0 0 100%;
        margin-bottom: 0px;
    }
    .features {
        gap: 10px;
        margin-bottom: 0px;
    }
    .feature-title {
        font-size: 22px;
        letter-spacing: -0.7px;
        margin-bottom: 5px;
    }

    .lending-h2, 
    .banking-section h2 {
        margin-bottom: 10px;
    }

    .lending-details h3,
    .banking-details-title,
    .lending-details p,
    .banking-details-content {
        margin-bottom: 10px;
    }

    .lending-section .tab-container,
    .banking-section .tab-container {
        overflow: unset;
        width: 100%;
    }

    .lending-section .dropdown-button,
    .banking-section .dropdown-button {
        padding: 12px 20px;
    }

    .lending-section .tab-bar,
    .banking-section .tab-bar,
    .lending-section .tab-container::after,
    .banking-section .tab-container::after {
        display: none;
    }

    .lending-section .mobile-dropdown,
    .banking-section .mobile-dropdown {
        display: block;
    }

    .banking-content {
        gap: 0px;
    }

    .insights-grid {
        overflow: hidden;
        gap: 10px;
        margin-bottom: 0px;
    }

    .insights-section.related-reading h2 {
        font-size: var(--primary-mobile-h2);
    }

    .insight-content .insight-publish-date {
        font-size: 14px;
        letter-spacing: 1.7px;
    }

    .insight-content h3 {
        font-size: 20px;
        letter-spacing: -0.3px;
    }

    .insight-card {
        margin: 0px;
    }

    .insights-h2 {
        margin-bottom: 20px;
    }

    .insight-cta span {
        font-size: 16px;
    }

    .testimonials-section h2 {
        margin-bottom: 50px;
    }

    .join-team-section h2 {
        margin-bottom: 20px;
    }
    
    /* Testimonials */
    .carousel-arrow {
        width: 30px;
        height: 30px;
    }

    .testimonials-container {
        min-height: 520px;;
    }

    .testimonial {
        min-height: 500px;
    }
    .testimonial-content {
        padding: 0px;
    }

    .testimonial-image {
        flex: unset;
    }

    .testimonial-quote {
        font-size: 16px;
    }

    .testimonial-author {
        font-size: 16px;
    }

    .join-team-content {
        margin: 20px;
    }
    
    /* App stores */
    .app-stores {
        flex-direction: column;
        align-items: center;
    }
    .site-footer a,
    .footer-col h4,
    .footer-fdic-text-container p {
        font-size: 12px;
    }
    .footer-wrapper,
    .footer-fdic {
        flex-direction: column;
    }
    
    .footer-logo img {
        width: 50%;
    }
    .footer-fdic img {
        width: 47px;
    }
}
