/* TEMPLATES.CSS - Dedicated Template Styling System */
/* All template-specific styles consolidated here for better maintainability */

/* ==========================================================================
   TEMPLATE TYPOGRAPHY SYSTEM
   ========================================================================== */

/* Core Typography Classes */
.text-h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    font-family: 'Open Sans', sans-serif;
}

.text-h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Open Sans', sans-serif;
}

.text-h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    font-family: 'Open Sans', sans-serif;
}

.text-p {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6;
    font-family: 'Open Sans', sans-serif;
}

/* Mobile Typography */
@media (max-width: 768px) {
    .text-h1 { font-size: 1.7rem; }
    .text-h2 { font-size: 1.3rem; }
    .text-h3 { font-size: 1.1rem; }
    .text-p  { font-size: 1rem; }
}

/* Template Typography for Quill-generated HTML */
.template-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
}

.template-content h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
}

.template-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
}

.template-content p {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
}

/* Mobile Typography for Quill-generated elements */
@media (max-width: 768px) {
    .template-content h1 { font-size: 1.7rem; }
    .template-content h2 { font-size: 1.3rem; }
    .template-content h3 { font-size: 1.1rem; }
    .template-content p { font-size: 1rem; }
}

/* ==========================================================================
   TEMPLATE COLOR SYSTEM
   ========================================================================== */

/* Template-specific text colors */
.template-frostedglass .template-content h1,
.template-frostedglass .template-content h2,
.template-frostedglass .template-content h3,
.template-frostedglass .template-content p {
    color: #ffffff;
}

.template-video-text .template-content h1,
.template-video-text .template-content h2,
.template-video-text .template-content h3,
.template-video-text .template-content p {
    color: #ffffff;
}

.template-image-text .template-content h1,
.template-image-text .template-content h2,
.template-image-text .template-content h3,
.template-image-text .template-content p {
    color: #f5f6ed;
}

.template-box .template-content h1,
.template-box .template-content h2,
.template-box .template-content h3,
.template-box .template-content p {
    color: #3C3C3A;
}

.template-overlay .template-content h1,
.template-overlay .template-content h2,
.template-overlay .template-content h3,
.template-overlay .template-content p {
    color: #ffffff;
}

/* ==========================================================================
   TEMPLATE COMPONENTS
   ========================================================================== */

/* Frosted Glass Effect */
.template-frostedglass {
    background: rgba(44, 62, 27, 0.5);
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Template Box Shadow System */
.template-shadow {
    box-shadow: 0px 0px 0px 1px #0E3F7E08,
        0px 1px 1px -0.5px #2A334508,
        0px 3px 3px -1.5px #2A334608,
        0px 6px 6px -3px #2A334608,
        0px 12px 12px -6px #0E3F7E08,
        0px 24px 24px -12px #0E3F7E10;
}

/* ==========================================================================
   TEMPLATE LAYOUTS
   ========================================================================== */

/* Template 1: Large Heading Center */
.template-large-heading-center {
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
    text-align: center;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.template-large-heading-center .template-content h1,
.template-large-heading-center .template-content h2,
.template-large-heading-center .template-content h3,
.template-large-heading-center .template-content p {
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.template-large-heading-center .template-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: white;
}

.template-large-heading-center .template-content h2 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 0.8rem;
    color: white;
}

.template-large-heading-center .template-content h3 {
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: 0.6rem;
    color: white;
}

.template-large-heading-center .template-content p {
    font-size: 1.25rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    color: white;
}

@media (max-width: 768px) {
    .template-large-heading-center .template-content h1 {
        font-size: 2.5rem;
    }
    
    .template-large-heading-center .template-content h2 {
        font-size: 2rem;
    }
    
    .template-large-heading-center .template-content h3 {
        font-size: 1.5rem;
    }
    
    .template-large-heading-center .template-content p {
        font-size: 1.1rem;
    }
}

/* Template 2: Image Center */
.template-image-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
}

.template-image-center img {
    width: 60%;
    height: auto;
    pointer-events: none;
    border-radius: 3px;
}

/* Template 3: Image Text Center */
.template-image-text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    text-align: center;
    padding: 2rem 1rem;
}

.template-image-text-center img {
    width: 60%;
    max-width: 600px;
    height: auto;
    margin-bottom: 2rem;
    border-radius: 3px;
}

.template-image-text-center .template-content {
    width: min(max(300px, 80vw), 100vw);
    max-width: 600px;
}

@media (max-width: 768px) {
    .template-image-text-center {
        padding: 1rem 0.5rem;
        height: auto;
        min-height: 100vh;
    }
    .template-image-text-center img {
        width: 90%;
        max-width: 95vw;
        margin-bottom: 1.2rem;
    }
    .template-image-text-center .template-content {
        max-width: 95vw;
    }
}

/* Template 4: Video Text Center */
.template-video-text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: 100%;
    pointer-events: none;
}

.template-video-text-center .video-container {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.template-video-text-center .video-container video {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    display: block;
    pointer-events: auto;
    border-radius: 8px;
    -webkit-playsinline: true;
    playsinline: true;
}

.template-video-text-center .template-content {
    width: 70%;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.template-video-text-center.no-video .template-content {
    height: 100%;
    justify-content: center;
}

@media (max-width: 768px) {
    .template-video-text-center {
        width: 100%;
        padding: 1rem;
    }
    .template-video-text-center .video-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .template-video-text-center .video-container video {
        max-height: 40vh;
    }
    .template-video-text-center .template-content {
        padding: 1rem;
    }
}

/* Template 5: Positioned Text Overlays */
.template-upper-right-text {
    position: absolute;
    top: 60px;
    right: 60px;
    max-width: 600px;
    padding: 1.5rem 2rem;
    background: rgba(44, 62, 27, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    text-align: left;
    z-index: 100;
}

.template-lower-right-text {
    position: absolute;
    bottom: 60px;
    right: 60px;
    max-width: 600px;
    padding: 1.5rem 2rem;
    background: rgba(44, 62, 27, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    text-align: left;
    z-index: 100;
}

.template-upper-left-text {
    position: absolute;
    top: 60px;
    left: 60px;
    max-width: 600px;
    padding: 1.5rem 2rem;
    background: rgba(44, 62, 27, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    text-align: left;
    z-index: 100;
}

.template-lower-left-text {
    position: absolute;
    bottom: 60px;
    left: 60px;
    max-width: 600px;
    padding: 1.5rem 2rem;
    background: rgba(44, 62, 27, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    text-align: left;
    z-index: 100;
}

.template-mid-left-text {
    position: absolute;
    top: 50%;
    left: 60px;
    transform: translateY(-50%);
    max-width: 600px;
    padding: 1.5rem 2rem;
    background: rgba(44, 62, 27, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    text-align: left;
    z-index: 100;
}

.template-mid-right-text {
    position: absolute;
    top: 50%;
    right: 60px;
    transform: translateY(-50%);
    max-width: 600px;
    padding: 1.5rem 2rem;
    background: rgba(44, 62, 27, 0.7);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    text-align: left;
    z-index: 100;
}

/* Mobile responsive for positioned text */
@media (max-width: 768px) {
    .template-upper-right-text,
    .template-upper-left-text {
        position: absolute;
        top: 0;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100vw;
        max-width: 100vw;
        padding: 1.2rem 1rem 0.5rem 1rem;
        border-radius: 0 0 12px 12px;
        text-align: left;
        box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    }
    
    .template-lower-right-text,
    .template-lower-left-text {
        position: absolute;
        bottom: 0;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100vw;
        max-width: 100vw;
        padding: 0.5rem 1rem 1.2rem 1rem;
        border-radius: 12px 12px 0 0;
        text-align: left;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.10);
    }
    
    .template-mid-left-text,
    .template-mid-right-text {
        position: absolute;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        width: 100vw;
        max-width: 100vw;
        padding: 1.2rem 1rem;
        border-radius: 12px;
        text-align: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.10);
    }
}

/* Template 6: Content Card Bottom */
.template-content-card-bottom {
    position: absolute;
    bottom: 80px;
    width: 60%;
    padding: 20px;
    background: rgba(255, 255, 255, 1.9);
    border-radius: 5px;
}

.template-content-card-bottom .template-content h2 {
    margin: 0;
    font-size: 1.5rem;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
}

.template-content-card-bottom .template-content p {
    margin: 10px 0 0;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
}

/* Template 7: Medium Heading Top Left */
.template-medium-heading-top-left {
    position: absolute;
    top: 100px;
    left: 120px;
    width: 50%;
    text-align: left;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
}

.template-medium-heading-top-left .template-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
}

.template-medium-heading-top-left .template-content p {
    position: absolute;
    font-size: 1rem;
    font-weight: 400;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
}

/* Template 8: Left Box Template */
.template-left-box {
    background-color: #f5f6ed;
    width: 350px;
    padding: 20px;
    position: absolute;
    left: 110px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    border-radius: 3px;
}

.template-left-box .template-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 2rem;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
    line-height: 2rem;
    color: #3C3C3A;
}

.template-left-box .template-content p {
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 400;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
    color: #3C3C3A;
}

/* Template 9: Center Box Template */
.template-center-box {
    background-color: #f5f6ed;
    max-width: 80%;
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 3px;
    text-align: left;
}

.template-center-box .template-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
    line-height: 2rem;
    color: #3C3C3A;
    pointer-events: none;
}

.template-center-box .template-content p {
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 400;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
    color: #3C3C3A;
}

.template-center-box img {
    width: 100%;
    height: auto;
    border-radius: 3px;
    pointer-events: none;
}

/* Template 10: Center Polaroid Template */
.template-center-polaroid {
    background-color: #f5f6ed;
    max-width: 70%;
    padding: 5px;
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(5deg);
    pointer-events: none;
    border-radius: 3px;
    text-align: left;
    opacity: 0;
    animation: fadeIn ease-in 0.5s;
    animation-fill-mode: forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.template-center-polaroid .template-content p.caption {
    margin-top: 5px;
    font-size: 1.2rem;
    font-weight: 400;
    font-family: "Wix Madefor Display", sans-serif;
    font-optical-sizing: auto;
    color: #3C3C3A;
    text-align: center;
}

.template-center-polaroid .template-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
    line-height: 2rem;
    color: #3C3C3A;
    text-align: center;
}

.template-center-polaroid img {
    width: 100%;
    height: 400px;
    border-radius: 1px;
    pointer-events: none;
}

/* Template 11: Image Left Text Right */
.template-image-left-text-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    height: 100%;
    pointer-events: none;
}

.template-image-left-text-right .image-container {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    box-sizing: border-box;
}

.template-image-left-text-right img {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    display: block;
    pointer-events: none;
}

.template-image-left-text-right video {
    width: 50%;
    height: auto;
    display: block;
    pointer-events: auto;
    padding: 4rem;
    -webkit-playsinline: true;
    playsinline: true;
}

.template-image-left-text-right .template-content {
    width: 50%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-image-left-text-right .template-content h2 {
    margin: 0;
}

.template-image-left-text-right__text {
    margin-top: 5px;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
    color: #f5f6ed;
    text-align: left;
    line-height: 2.3rem;
}

.template-image-left-text-right.no-image .template-content {
    width: 100%;
}

.template-image-left-text-right.no-image {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
}

.template-image-left-text-right.no-image .template-content {
    width: 50%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .template-image-left-text-right.no-image .template-content {
        width: 100%;
        padding: 1rem;
        align-items: center;
        text-align: center;
    }
}

/* Template 12: Text Left Image Right */
.template-text-left-image-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    height: 100%;
    pointer-events: none;
}

.template-text-left-image-right .template-content {
    width: 50%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-text-left-image-right .template-content h2 {
    margin: 0;
}

.template-text-left-image-right__text {
    margin-top: 5px;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    font-optical-sizing: auto;
    color: #f5f6ed;
    text-align: left;
    line-height: 2.3rem;
}

.template-text-left-image-right .image-container {
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    box-sizing: border-box;
}

.template-text-left-image-right img {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    display: block;
    pointer-events: none;
}

.template-text-left-image-right.no-image .template-content {
    width: 100%;
}

.template-text-left-image-right.no-image {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
}

.template-text-left-image-right.no-image .template-content {
    width: 50%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .template-text-left-image-right.no-image .template-content {
        width: 100%;
        padding: 1rem;
        align-items: center;
        text-align: center;
    }
}

/* Template 13: Video Left Text Right */
.template-video-left-text-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    height: 100%;
    pointer-events: none;
}

.template-video-left-text-right video {
    width: 50%;
    height: auto;
    display: block;
    pointer-events: auto;
    padding: 4rem;
    -webkit-playsinline: true;
    playsinline: true;
}

.template-video-left-text-right .template-content {
    width: 50%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-video-left-text-right.no-video .template-content {
    width: 100%;
}

.template-video-left-text-right.no-video {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
}

.template-video-left-text-right.no-video .template-content {
    width: 50%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .template-video-left-text-right.no-video .template-content {
        width: 100%;
        padding: 1rem;
        align-items: center;
        text-align: center;
    }
}

/* ==========================================================================
   MOBILE TEMPLATE SYSTEM
   ========================================================================== */

.template-mobile-slide {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    width: 95%;
    height: 100%;
    padding: 1rem;
    margin-bottom: 120px;
    box-sizing: border-box;
}

.template-mobile-media-container {
    flex-shrink: 0;
    width: 85%;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.template-mobile-media-container img,
.template-mobile-media-container video {
    max-width: 100%;
    max-height: 50vh;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    -webkit-playsinline: true;
    playsinline: true;
    object-fit: contain;
}

.template-mobile-text-container {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    text-align: left;
    overflow-y: auto;
    background: rgba(44, 62, 27, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.template-mobile-text-container .text-h2,
.template-mobile-text-container .text-h3 {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   TEMPLATE UTILITY CLASSES
   ========================================================================== */

/* Flex utilities */
.template-flex-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.template-flex-row {
    display: flex;
    flex-direction: row;
}

/* Apply shadow to all template elements */
.template-image-center img,
.template-image-text-center img,
.template-video-text-center .video-container video,
.template-left-box,
.template-center-box,
.template-center-polaroid,
.template-center-polaroid img,
.template-left-box,
.template-center-box,
.template-center-box img {
    box-shadow: 0px 0px 0px 1px #0E3F7E08,
        0px 1px 1px -0.5px #2A334508,
        0px 3px 3px -1.5px #2A334608,
        0px 6px 6px -3px #2A334608,
        0px 12px 12px -6px #0E3F7E08,
        0px 24px 24px -12px #0E3F7E10;
} 