
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: '-apple-system', BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    width: 100%;
    height: 100%;

    background: linear-gradient(135deg, #eef2f7 0%, #d9e2ec 100%); 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


.app-container {
    
    width: 100%;
    height: 100vh;
    height: 100dvh; 
    
    
    position: relative; 
    
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0,0,0,0.08);
}


.app-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e44d26;          
    z-index: 10;
    height: 60px;
    border-bottom: 1px solid #c33a17; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}


.brand-logo {
    height: 100%;
    display: flex;
    align-items: center;
}


.logo-img {
    height: auto;             
    width: 90px;             
    max-height: 38px;         
    display: block;
    
    
    filter: brightness(0) invert(1);
}



.feed-scroll {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y proximity; 
    scrollbar-width: none;        
    background-color: #fff;        
}

.feed-scroll::-webkit-scrollbar {
    display: none;                
}


.post-card {
   
    width: 100%;
    max-width: 480px;
    
    
    margin: 0 auto; 
    
    height: auto; 
    max-height: calc(100dvh - 60px); 
    
    scroll-snap-align: center;    
    padding: 25px 15px;           
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    position: relative;
    background-color: #ffffff;
}




.post-image {
    position: relative; 
    width: 100%;
    max-height: 100%;  
    border-radius: 10px; 
    background-color: #000; 
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
}


.post-main-img {
    width: 100%;
    height: auto;      
    max-height: calc(100vh - 120px); 
    display: block;
    z-index: 2;
}


.post-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
    z-index: 3;
}


.post-content {
    position: absolute;
    top: 20px;     
    left: 20px;    
    right: 20px;   
    bottom: 20px;  
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    pointer-events: none; 
}


.post-caption {
    color: #ffffff;                 
    font-size: 15px;                 
    line-height: 1.4;
    font-weight: 600;               
    
    
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 1px 2px rgba(0, 0, 0, 0.95);
    
    
    display: -webkit-box;
    -webkit-line-clamp: 1;           
    -webkit-box-orient: vertical;
    overflow: hidden;               
    text-overflow: ellipsis;        
    
    
    white-space: normal;
    word-break: break-all; 
    width: 100%;
}



.interaction-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    pointer-events: auto; 
    width: 100%;
    
    margin-bottom: 25px; 
}


.action-group {
    display: flex;
    gap: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn svg {
    width: 22px;
    height: 22px;
}

.post-time {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}


.bottom-nav {
    height: 65px;
    border-top: 1px solid #efefef;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #fff;
    z-index: 10;
}


.nav-trigger {
    background: #e44d26;                   
    color: #ffffff;                       
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(228, 77, 38, 0.4); 
    transition: background-color 0.2s, transform 0.1s ease;
    z-index: 10;
}


.nav-trigger:active {
    background: #c33a17;                  
    transform: scale(0.94);              
    box-shadow: 0 2px 8px rgba(228, 77, 38, 0.2);
}



.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: flex-end; 
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-height: 85vh;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.15);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 16px;
}


.preview-container {
    width: 100%;
    height: 200px;
    border-radius: 24px;
    overflow: hidden;
    background: #f0f2f5;
    margin-bottom: 16px;
}

#img-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Textarea de pie de foto */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

#txt-caption {
    width: 100%;
    height: 75px;
    border: 1px solid #e1e4e8;
    border-radius: 16px;
    padding: 12px;
    font-size: 14px;
    resize: none;
    outline: none;
    background: #f9fafb;
}

#txt-caption:focus {
    border-color: #262626;
    background: #fff;
}

.char-counter {
    text-align: right;
    font-size: 11px;
    color: #8e8e8e;
    margin-top: 4px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
    padding: 14px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-secondary {
   
    background: rgba(228, 77, 38, 0.12); 
    
    color: #e44d26;                        
   
    border: 1.5px solid rgba(228, 77, 38, 0.35); 
    
   
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    width: 100%;
    padding: 14px 25px;
    border-radius: 30px;                   
    
    font-size: 15px;
    font-weight: 700;                      
    letter-spacing: 0.5px;
    text-transform: uppercase;             
    
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(228, 77, 38, 0.05);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}



.btn-secondary:hover, .btn-secondary:active {
    background: #e44d26;                  
    color: #ffffff;                       
    border-color: #e44d26;
    box-shadow: 0 6px 20px rgba(228, 77, 38, 0.3);
    transform: scale(1.02);              
}


.btn-secondary:active {
    transform: scale(0.97);               
}


.btn-primary {
    background: #e44d26;                   
    color: #ffffff;                        
    border: 2px solid #e44d26;             
    
    width: 100%;
    padding: 14px 25px;
    border-radius: 30px;                  
    
    font-size: 15px;
    font-weight: 700;                      
    letter-spacing: 0.5px;
    text-transform: uppercase;            
    
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(228, 77, 38, 0.25);
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}


.btn-primary:hover, .btn-primary:active {
    background: #c33a17;                   
    border-color: #c33a17;
    box-shadow: 0 6px 20px rgba(228, 77, 38, 0.4);
    transform: scale(1.02);                
}

.btn-primary:active {
    transform: scale(0.97);                
}


.btn-primary:disabled {
    background: #f0f2f5 !important;
    border-color: #e1e4e8 !important;
    color: #8e8e8e !important;
    box-shadow: none !important;
    cursor: not-cache;
    transform: none !important;
}


.comments-modal {
    max-height: 75vh;
}

.comments-list-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
}


.comments-list-container::-webkit-scrollbar {
    width: 4px;
}
.comments-list-container::-webkit-scrollbar-thumb {
    background: #e1e4e8;
    border-radius: 10px;
}

.comment-item {
    background: #f4f6f9;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #262626;
    line-height: 1.4;
    word-break: break-word;
}

.comment-item span {
    display: block;
    font-size: 10px;
    color: #8e8e8e;
    margin-top: 4px;
    text-align: right;
}

.comment-input-group {
    display: flex;
    gap: 8px;
    background: #fff;
    padding: 10px 0 5px 0;
    border-top: 1px solid #f0f2f5;
}

#input-nuevo-comentario {
    flex: 1;
    border: 1px solid #e1e4e8;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 13px;
    outline: none;
    background: #f9fafb;
}

#input-nuevo-comentario:focus {
    border-color: #262626;
    background: #fff;
}

#btn-enviar-comentario {
    background: #e44d26;                  
    color: #ffffff;
    border: none;
    padding: 0 22px;
    border-radius: 20px;                   
    font-size: 13px;
    font-weight: 700;                      
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(228, 77, 38, 0.2);
    transition: all 0.2s ease;
}

#btn-enviar-comentario:active {
    background: #c33a17;
    transform: scale(0.95);                
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95); 
    backdrop-filter: blur(10px);   
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;                   
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;                      
    pointer-events: none;
    transition: opacity 0.3s ease;   
    padding: 20px;
}


.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


.lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; 
    width: 100%;
}


#img-lightbox-src {
    max-width: 100%;
    max-height: 75vh;     
    object-fit: contain;  
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}


.lightbox-caption-text {
    color: #ffffff;     
    font-size: 15px;      
    line-height: 1.4;
    text-align:justify;
    width: 100%;
    max-width: 90vw;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); 
    word-break: break-word;
}


.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    
   
    display: flex;
    align-items: center;
    justify-content: center;
    

    font-family: Arial, sans-serif; 
    font-size: 24px;                
    line-height: 1;                 
    
    cursor: pointer;
    z-index: 210; 
    transition: background 0.2s, transform 0.1s;
}

.lightbox-close-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.95); 
}


.home-overlay {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    
    border-radius: 0px; 
    overflow: hidden; 
    
    
    background-color: #000000; 
    
    
    background-image: url('bg.png');
    background-size: contain;        
    background-position: center;   
    background-repeat: no-repeat;  
    
    z-index: 500; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), pointer-events 0.5s;
}


.home-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    
   
    background: 
        linear-gradient(to bottom, #000000 5%, rgba(0,0,0,0) 15%),
        linear-gradient(to top, #000000 5%, rgba(0,0,0,0) 15%),
        rgba(0, 0, 0, 0.50);
        
    z-index: 1;
}


.home-content {
    position: absolute;
    top: 50%;         
    left: 0;
    right: 0;
    width: 100%;
    padding: 0 30px;    
    
    
    transform: translateY(-50%); 
    
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}



.trane-brand-row {
    display: flex;
    flex-direction: row;
    align-items: center;    
    justify-content: center;
    gap: 15px;             
    width: 100%;
    margin-bottom: 35px;   
}


.brand-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    justify-content: center;
    
    width: auto;             
    margin: 0 auto;          
    padding: 0 20px;         
}


.trane-main-title {
    color: #ffffff;
    font-size: 38px;               
    font-weight: 900;              
    text-transform: uppercase;     
    letter-spacing: 0.5px;         
    line-height: 0.95;             
    margin: 0;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8); 
    text-align: left;             
}


.trane-secondary-title {
    color: #ffffff;
    font-size: 32px;               
    font-weight: 900;              
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;              
    margin: 4px 0 0 0;             
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
    text-align: left;            
}


.trane-legacy-text {
    color: #e44d26;                
    font-size: 13px;               
    font-weight: 700;              
    text-transform: uppercase;
    letter-spacing: 1.2px;         
    line-height: 1.4;
    margin: 12px 0 0 0;            
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    text-align: left;            
}


.home-logo {
    width: auto;
    height: 80px;                 
    max-width: 180px;
    object-fit: contain;
    margin-top: 5px;             
    filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.6)); 
    display: block;
}




.qr-share-modal {
    max-height: 60vh;
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    align-items: center;
}

.qr-code-holder {
    background: #ffffff;
    padding: 15px;
    border-radius: 24px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
}


.qr-code-holder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}



.btn-home-start {
    position: absolute;
    
    
    bottom: 55px;                          
    
    left: 50%;
    transform: translateX(-50%);          
    
    background: rgba(255, 255, 255, 0.15); 
    color: #ffffff;                        
    border: 2px solid rgba(255, 255, 255, 0.4); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    width: calc(100% - 90px);              
    max-width: 390px;                      
    padding: 15px 35px;
    border-radius: 30px;                   
    
    font-size: 16px;
    font-weight: 700;                      
    letter-spacing: 1px;                   
    text-transform: uppercase;             
    
    cursor: pointer;
    z-index: 510;                           
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); 
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}


.btn-home-start:hover, .btn-home-start:active {
    background: #ffffff;                   
    color: #262626;                        
    border-color: #ffffff;
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.25);
    transform: translateX(-50%) translateY(-2px) scale(1.02); 
}

.btn-home-start:active {
    transform: translateX(-50%) translateY(0) scale(0.97);  
}




.home-badge-container {
    position: absolute;
    top: 25px;                    
    right: 25px;                   
    z-index: 510;                  
    display: flex;
    align-items: center;
    justify-content: center;
}


.trane-badge-img {
    width: 130px;                   
    height: auto;                  
    object-fit: contain;
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.5)); 
    transition: transform 0.3s ease;
}


.trane-badge-img:active {
    transform: scale(1.05);
}

.qr-code-holder {
    background: #ffffff;
    padding: 15px;
    border-radius: 24px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px; 
    height: 200px;
    margin: 0 auto; 
}


.qr-code-holder svg {
    width: 100%;
    height: 100%;
    display: block;
}
