/* ========================================
   ABSENT FRIENDS - RESPONSIVE STYLESHEET
   ======================================== */

/* ========================================
   TABLET STYLES (1200px and below)
   ======================================== */
@media (max-width: 1200px) {
    .hero-content {
        padding-left: 2rem;
    }
    
    .hero-title,
    .hero-subtitle {
        font-size: 3.5rem;
    }
}

@media (max-width: 1024px) {
    .hero-title, 
    .hero-subtitle {
        font-size: 3.5rem;
    }
    
    .hero-content {
        padding: 0 2rem;
    }
    
    .memorial-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .memorial-gallery {
        flex-direction: row;
        flex: none;
        justify-content: center;
    }
    
    .gallery-item {
        width: 200px;
    }
    
    .memorial-title {
        font-size: 3rem;
    }
    
    .about-graphic {
        width: 40vw;
        height: 500px;
    }
    
    .testimonial-main {
        gap: 4rem;
    }
    
    .photo-collages {
        flex: 0 0 500px;
    }
}

/* ========================================
   TABLET STYLES (768px - 992px)
   ======================================== */
@media (max-width: 992px) {
    .hero-title,
    .hero-subtitle {
        font-size: 3rem;
    }
    
    .memorial-title {
        font-size: 3rem;
    }
    
    .about-title {
        font-size: 3rem;
    }
}

/* ========================================
   MEMORIAL CREATION SECTION - MOBILE REORDER
   ======================================== */

/* Desktop: Show desktop layout, hide mobile */
@media (min-width: 769px) {
    .desktop-gallery,
    .desktop-text {

    }
    
    .mobile-memorial-content {
        display: none !important;
    }
}

/* ========================================
   MOBILE STYLES (768px and below)
   ======================================== */
@media (max-width: 768px) {
    /* Fix body overflow */
    body {
        overflow-x: hidden;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        height: auto;
        min-height: auto;
        margin-top: 70px;
        padding: 0;
    }
    
    .hero-container {
        flex-direction: column;
        height: auto;
    }
    
    .hero-image {
        flex: none;
        width: 100%;
        height: 40vh;
        min-height: 300px;
        order: 1;
    }
    
    .hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .hero-content {
        order: 2;
        padding: 2rem 1.5rem;
        text-align: center;
        max-width: 100%;
    }
    
    .hero-title,
    .hero-subtitle {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        margin-bottom: 30px;
    }
    
    .learn-more-btn {
        display: inline-block;
        padding: 14px 35px;
        margin-top: 10px;
    }
    
    /* Memory Cards Section Mobile */
.memorial-header {margin-bottom:0;}

    .memory-section {
        padding: 0;
    }
    
    .memory-image {
        width: 100%;
        height: auto;
        border-radius: 10px;
    }
    
    /* Hide desktop elements for memorial section */
    .desktop-gallery,
    .desktop-text {
        display: none !important;
    }
    
    /* Show mobile content for memorial section */
    .mobile-memorial-content {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }
    
    /* Mobile text styling for memorial section */
    .mobile-text {
        order: 1 !important;
        text-align: center !important;
        padding: 0 15px !important;
        margin-bottom: 20px !important;
    }
    
    .mobile-text .memorial-title {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0 !important;
        margin: 0 auto;
    }
    
    /* Mobile carousel styling */
    .mobile-carousel-container {
        order: 2 !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    #memorialCarousel {
        width: 100% !important;
        max-width: 500px !important;
        margin: 0 auto !important;
        overflow: hidden !important;
    }
    
    .carousel-inner {
        border-radius: 15px !important;
        overflow: hidden !important;
    }
    
    .carousel-item img {
        height: 360px !important;
        width: 100% !important;
        object-fit: cover !important;
    }
    
    /* Carousel indicator styling */
    .carousel-indicators {
        margin-bottom: 10px !important;
    }
    
    .carousel-indicators button {
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        background-color: rgba(255, 255, 255, 0.5) !important;
        border: none !important;
    }
    
    .carousel-indicators button.active {
        background-color: #b78e8c !important;
    }
    
    /* Carousel control buttons */
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px !important;
        height: 50px !important;
        background-color: rgba(0, 0, 0, 0.3) !important;
        border-radius: 50% !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 15px !important;
    }
    
    .carousel-control-prev {
        left: 10px !important;
    }
    
    .carousel-control-next {
        right: 10px !important;
    }
    
    /* Mobile CTA button */
    .mobile-cta {
        order: 3 !important;
        text-align: center !important;
        padding: 0 15px !important;
        margin-top: 20px !important;
    }
    
    .mobile-cta .create-memorial-btn {
        display: inline-block !important;
        padding: 15px 40px !important;
        font-size: 0.9rem !important;
        text-decoration: none !important;
        background: transparent !important;
        border: 2px solid #333 !important;
        color: #333 !important;
        border-radius: 50px !important;
        font-family: 'DM Sans', sans-serif !important;
        font-weight: 500 !important;
        letter-spacing: 0.1em !important;
        text-transform: uppercase !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-cta .create-memorial-btn:hover {
        background: #333 !important;
        color: white !important;
        transform: translateY(-2px) !important;
        text-decoration: none !important;
    }
    
    /* Adjust original memorial section for mobile */
    .memorial-section {
        padding: 40px 0 !important;
    }
    
    .memorial-content {
        flex-direction: column !important;
        gap: 30px !important;
        padding: 0 15px !important;
    }
    
    /* Original memorial section fallback styles (if carousel not used) */
    .memorial-gallery {
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }
    
    .gallery-item {
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .gallery-item img {
        height: 250px;
        width: 100%;
        object-fit: cover;
    }
    
    .memorial-text {
        padding-left: 0;
        text-align: center;
        width: 100%;
        flex: none;
        margin-bottom: 0;
    }
    
    .memorial-title {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 30px;
        line-height: 1.2;
    }
    
    .create-memorial-btn {
        display: inline-block;
        padding: 14px 35px;
        text-decoration: none;
    }
    
    /* About Section Mobile */
    .about-section {
        padding: 40px 0;
        position: relative;
        overflow: visible;
    }
    
    .about-container {
        flex-direction: column;
        position: static;
    }
    
    .about-content {
        padding: 0 1.5rem;
        max-width: 100%;
        text-align: center;
        margin-bottom: 30px;
        z-index: 99;
    }
    
    .about-graphic {
        position: absolute;
        width: 100%;
        height: 100%;
        transform: none;
        margin: 0 auto;
        max-width: 100%;
        border-radius: 0;
        overflow: hidden;
        top: 0;
        z-index: 1;
        bottom: 0;
        opacity: 0.3;
        padding: 1rem;
    }
    
    .about-graphic img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        opacity: 0.5;
    }
    
    .about-btn {
        position: unset;
        transform: none;
        margin: 20px auto 0;
        display: inline-block;
        z-index: 99;
        width: 90%;
    }
    
    /* Second About Section (with background image) */
    .about-section:last-of-type {
        padding: 60px 0;
    }
    
    .about-section:last-of-type .about-graphic {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        opacity: 0.2;
    }
    
    .about-section:last-of-type .about-graphic img {
        object-fit: cover;
        opacity: 0.2;
    }
    
    .about-section:last-of-type .about-container {
        position: relative;
        z-index: 1;
    }
    
    .about-section:last-of-type .about-content {
        background: rgba(255, 255, 255, 0.9);
        padding: 2rem;
        border-radius: 10px;
    }
    
    /* Testimonial Section Mobile */
    .testimonial-section {
        padding: 40px 0;
    }
    
    .testimonial-container {
        padding: 0 1.5rem;
    }
    
    .testimonial-main {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .photo-collages {
        flex: none;
        height: 250px !important;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .grid-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 10px;
    }
    
    .testimonial-heading {
        font-size: 1.8rem;
        text-align: center;
        max-width: 100%;
        line-height: 1.3;
    }
    
    .quote-mark {
        font-size: 4rem;
        top: -1rem;
        right: 50%;
        transform: translateX(50%);
    }
    
    .testimonial-description {
        text-align: center;
        padding: 0 10px;
    }
    
    .testimonial-author {
        text-align: center;
    }
    
    .testimonial-btn {
        margin-right: 0;
        margin-bottom: 15px;
        display: inline-block;
    }
    
    /* Memorial Selection Section - Mobile 3 Columns */
    .memorial-selection-section {
        padding: 60px 0 !important;
    }
    
    .memorial-selection-container {
        padding: 0 15px !important;
        gap: 30px !important;
    }
    
    .memorial-cards {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    .memorial-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 15px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        height: auto !important;
    }
    
    .memorial-icon {
        width: 120px !important;
        height: 120px !important;
        margin: 0 auto 10px !important;
        padding: 10px !important;
    }
    
    .memorial-icon img {
        width: 100% !important;
        height: auto !important;
        max-width: 95px !important;
    }
    
    .memorial-card-label {
        display: block !important;
        font-family: 'DM Sans', sans-serif !important;
        font-size: 0.7rem !important;
        font-weight: 500 !important;
        color: white !important;
        text-align: center !important;
        margin-top: 10px !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .memorial-selection-content {
        padding: 30px 15px !important;
        margin: 20px 0 0 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
    }
    
    .memorial-selection-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }
    
    .memorial-selection-tagline {
        font-size: 0.8rem !important;
        padding: 10px 20px !important;
        letter-spacing: 0.1em !important;
    }
    
    /* Footer Mobile */
    footer {
        padding: 3rem 0rem 0;
    }
    
    footer .ft-menu ul {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    footer .ft-menu ul li {
        padding: 0;
        text-align: center;
    }
    
footer .ft-logo {max-width: 80px;}
footer .txt-pink {font-size:1.5rem;}
    footer .small p {font-size: 0.8rem;}
    footer .small p span {margin-bottom:0;}


    /* General mobile improvements */
    section {
        overflow: hidden;
    }
    
    /* Mobile-specific improvements from the inline style */
    .memory-container,
    .memories-container {
        padding: 0;
    }
    
    .memory-image,
    .memories-bg {
        width: 100%;
        height: auto;
        border-radius: 10px;
    }
    
    .testimonial-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .testimonial-arrow {
        margin-top: 10px;
    }
    
    .about-features li {
        margin-bottom: 20px;
        text-align: left;
        padding-left: 20px;
    }
    
    .about-features li::before {
        left: 0;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    section {
        margin-bottom: 20px;
    }

.cat-page .hero {margin-top:70px;min-height:auto;}
.cat-page .af-logo {font-size:.9rem;letter-spacing:.2rem;margin-bottom:2rem;}
.cat-page .af-logo .mark {margin-right:.5rem;width:75px;}
.cat-page .eyebrow .sub {margin-bottom: 3rem;}
.cover .logo {top:15px;}
h3.title {padding-top:0;font-size:1rem;}
.txt-block {font-size:1rem;}
.age {font-size:.9rem;}
.dates {font-size:.7rem;color:#000;}
.cat-page .timeline li::before {left: calc(1.35rem - 50px);}
.page-wrap {padding-top:100px;}
#login-box {border:0;}
#login-box h1 {font-size:2.5rem;}

#abt-top {padding: 60px 0 10px 0;}
#abt-top h1 {font-size:1.8rem;}
.img-cover {object-fit:cover !important;}
.mjp-spacer {padding-top:70px;}
}

/* ========================================
   SMALL MOBILE STYLES (480px and below)
   ======================================== */
@media (max-width: 480px) {
    .hero-title,
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-image {
        height: 35vh;
        min-height: 250px;
    }
    
    .learn-more-btn {
        padding: 12px 30px;
        font-size: 0.8rem;
        margin-bottom: 20px;
    }
    
    /* Memorial Section Small Mobile */
    .memorial-section {
        padding: 30px 0;
    }
    
    .memorial-header {
        margin-bottom: 30px;
    }
    
    .date-line {
        width: 150px !important;
    }
    
    /* Mobile memorial carousel adjustments */
    .mobile-text .memorial-title {
        font-size: 2rem !important;
    }
    
    #memorialCarousel {
        max-width: 400px !important;
    }
    
    .carousel-item img {
        height: 250px !important;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px !important;
        height: 40px !important;
        margin: 0 10px !important;
    }
    
    .carousel-indicators button {
        width: 10px !important;
        height: 10px !important;
    }
    
    .mobile-cta .create-memorial-btn {
        padding: 12px 35px !important;
        font-size: 0.8rem !important;
    }
    
    .memorial-title {
        font-size: 2rem;
    }
    
    .create-memorial-btn {
        padding: 12px 30px;
        font-size: 0.8rem;
    }
    
    /* About Section Small Mobile */
    .about-content {
        padding: 0 1rem;
    }
    
    .about-title {
        font-size: 2rem;
    }
    
    .about-graphic {
        height: ;
    }
    
    /* Testimonial Section Small Mobile */
    .testimonial-heading {
        font-size: 1.5rem;
    }
    
    .testimonial-btn {
        font-size: 0.9rem;
    }
    
    .quote-mark {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .photo-collages {
        height: 200px !important;
    }
    
    /* Memorial Selection Small Mobile */
    .memorial-selection-title {
        font-size: 2rem;
    }
    
    .memorial-icon {
        width: 120px !important;
        height: 120px !important;
    }
    
    .memorial-selection-tagline {
        font-size: 0.8rem;
        padding: 10px 20px;
    }
    
    .mil-banner {
        max-width: 200px;
        height: auto;
    }
    
    /* Small mobile adjustments for memorial selection */
    .memorial-cards {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    
    .memorial-card {
        padding: 15px 10px !important;
    }
    
    .memorial-icon {
        width: 70px !important;
        height: 70px !important;
    }
    
    .memorial-icon img {
        max-width: 50px !important;
    }
    
    .memorial-card-label {
        font-size: 0.65rem !important;
    }
    
    .memorial-selection-title {
        font-size: 1.8rem !important;
    }
    
    .memorial-selection-tagline {
        font-size: 0.75rem !important;
        padding: 8px 15px !important;
    }
    
    /* From inline styles */
    .hero-title,
    .hero-subtitle,
    .memorial-title,
    .about-title,
    .testimonial-heading,
    .memorial-selection-title {
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .learn-more-btn,
    .create-memorial-btn,
    .about-btn,
    .testimonial-btn {
        width: auto;
        text-align: center;
    }
}

/* ========================================
   VERY SMALL MOBILE STYLES (360px and below)
   ======================================== */
@media (max-width: 360px) {
    .hero-title,
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .memorial-title {
        font-size: 1.8rem;
    }
    
    .about-title {
        font-size: 1.8rem;
    }
    
    .testimonial-heading {
        font-size: 1.3rem;
        padding-top: 1rem;
    }
    
    /* Mobile memorial carousel adjustments */
    .mobile-text .memorial-title {
        font-size: 1.8rem !important;
    }
    
    #memorialCarousel {
        max-width: 320px !important;
    }
    
    .carousel-item img {
        height: 200px !important;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 35px !important;
        height: 35px !important;
    }
    
    .mobile-cta .create-memorial-btn {
        font-size: 0.9rem !important;
    }
    
    /* Memorial Selection Very Small Mobile */
    .memorial-selection-title {
        font-size: 1.8rem;
    }
    
    .memorial-cards {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0px !important;
    }
    
    .memorial-card {
        padding: 12px 8px !important;
    }
    
    .memorial-icon {
        width: 90px !important;
        height: 90px !important;
    }
    
    .memorial-icon img {
        max-width: 75px !important;
    }
    
    .memorial-card-label {
        font-size: 0.8rem !important;
    }
    
    .memorial-selection-title {
        font-size: 1.6rem !important;
    }
}