/* Diario Personale - Custom Styles */

/*
:root {
    --primary-color: #6f4e37;
    --secondary-color: #8b7355;
    --accent-color: #d4c4a0;
    --background-color: #faf8f5;
    --text-color: #3e3e3e;
    --border-color: #e6ddd4;
}
*/

:root {
  --primary-color: rgba(0, 102, 187, 1);      /* #0066BB */
  --secondary-color: rgba(60, 134, 198, 1);   /* #3C86C6 (più chiaro e leggermente più soft) */
  --accent-color: rgba(217, 231, 255, 1);     /* caldo chiaro per bilanciare il blu) */
  --background-color: rgba(247, 249, 252, 1); /* #F7F9FC (bianco freddo) */
  --text-color: rgba(43, 47, 54, 1);          /* #2B2F36 (scuro neutro leggibile) */
  --border-color: rgba(220, 230, 241, 1);     /* #DCE6F1 (bordo azzurrino delicato) */
}


body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Georgia', serif;
    line-height: 1.6;
}

/* Navbar Styles */
.navbar {
    background-color: var(--primary-color) !important;
    border-bottom: 2px solid var(--secondary-color);
}

.navbar-brand {
    font-weight: bold;
    color: #fff !important;
}

/* Card Styles */
.card {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: #fff;
}

.card-header {
    background-color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Text Styles */
.text-muted {
    color: #666 !important;
}

.introspective-quote {
    font-style: italic;
    color: var(--secondary-color);
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
    margin: 1rem 0;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 115, 85, 0.25);
}

/* Post Content - Lettura confortevole */
.post-content {
    white-space: pre-line;
    word-break: break-word;
    line-height: 1.7;
    font-size: 1.05rem;
    text-align: justify;
    width: 100%;
    padding: 1rem 0;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content p:last-child {
    margin-bottom: 0;
}

/* Container più largo per contenuti */
@media (min-width: 992px) {
    .container {
        max-width: 1400px;
    }
    
    .post-content {
        font-size: 1.1rem;
        line-height: 1.8;
        padding: 1.5rem 0;
    }
}

/* Login Page */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--accent-color) 100%);
}

.login-card {
    max-width: 400px;
}

/* Password toggle button */
.password-toggle {
    border-left: none;
    min-width: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.password-toggle:hover {
    z-index: 3;
}

.password-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color), 0.25);
}

/* Input group styling */
.input-group .form-control:focus {
    z-index: 3;
}

.input-group .password-toggle {
    border: 1px solid #ced4da;
    border-left: none;
}

.input-group .form-control:focus + .password-toggle {
    border-color: var(--secondary-color);
    box-shadow: none;
}

/* Mobile-specific styles */
.mobile-submit-btn {
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.mobile-submit-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Improve form controls for touch */
.form-control {
    min-height: 48px;
    touch-action: manipulation;
}

.form-control:focus {
    transform: none;
    -webkit-appearance: none;
}

/* Login card mobile optimizations */
.login-card {
    border-radius: 12px;
    overflow: hidden;
}

/* Disable zoom on inputs for mobile */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="password"] {
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none;
        border-radius: 8px 0 0 8px;
    }
    
    .input-group .form-control {
        border-radius: 8px 0 0 8px;
    }
    
    .input-group .password-toggle {
        border-radius: 0 8px 8px 0;
        min-width: 50px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .login-container {
        padding: 20px 0;
    }
    
    .login-card {
        margin: 0 auto;
        max-width: 100%;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    /* Better button spacing on mobile */
    .btn {
        margin-bottom: 0.5rem;
    }
    
    /* Improve touch targets */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }
}