/**
 * MiLink Main Stylesheet
 * Brand Color: #06BAB2
 * Font: Roboto
 */

/* ========================================
   FONTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --primary-color: #06BAB2;
    --primary-dark: #059B93;
    --primary-light: #08D4CA;
    --secondary-color: #2C3E50;
    --text-color: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-color: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-gray: #E9ECEF;
    --border-color: #DEE2E6;
    --error-color: #DC3545;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --info-color: #17A2B8;
    
    --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 15px; }
.col-3 { flex: 0 0 25%; max-width: 25%; padding: 0 15px; }

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
    background-color: var(--bg-color);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-between;
    flex: 1;
    margin-left: 2rem;
}

.nav-menu .user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
}

.nav-menu a.btn-primary {
    padding: 0.5rem 1.5rem;
    min-width: 120px;
}

/* Logout button styling */
.nav-menu a.btn-secondary {
    color: white;
    padding: 0.5rem 1.5rem;
    min-width: 100px;
}

/* Google login button text color */
.google-login-btn {
    color: var(--primary-color) !important;
}

.google-login-btn:hover {
    color: white !important;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
}

.language-selector a {
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
}

.language-selector a.active {
    background-color: var(--primary-color);
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #1a252f;
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-light);
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* ========================================
   PRICING
   ======================================== */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.pricing-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
    border: 3px solid transparent;
}

.pricing-card:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    position: relative;
}

.pricing-card.featured::before {
    content: "Popular";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 700;
}

.pricing-plan-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.pricing-period {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 1rem;
    text-align: left;
}

.pricing-features li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--bg-gray);
    font-size: 0.9rem;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: "✓";
    color: var(--success-color);
    font-weight: 700;
    margin-right: 0.5rem;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-family);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 186, 178, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ========================================
   FLASH MESSAGES
   ======================================== */
.flash-message {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.flash-close:hover {
    opacity: 1;
}

/* ========================================
   TABLES
   ======================================== */
.table {
    width: 100%;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead {
    background-color: var(--bg-gray);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 700;
    color: var(--secondary-color);
}

.table tbody tr:hover {
    background-color: var(--bg-light);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   MODALS
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

/* ========================================
   TABS
   ======================================== */
.tabs {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   PREVIEW MOCKUPS
   ======================================== */
.preview-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.preview-desktop,
.preview-mobile {
    flex: 1;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
}

.preview-desktop {
    min-height: 500px;
}

.preview-mobile {
    max-width: 375px;
    min-height: 667px;
}

.preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--border-radius-sm);
}

/* ========================================
   AUTH PAGES
   ======================================== */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-box {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    padding: 3rem;
    max-width: 450px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.auth-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 186, 178, 0.1);
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-light);
    margin: 0;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-google:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-light);
}

@media (max-width: 768px) {
    .auth-box {
        padding: 2rem 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
}

/* ========================================
   UTILITIES
   ======================================== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--box-shadow);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .col-6, .col-4, .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .preview-container {
        flex-direction: column;
    }
    
    .preview-mobile {
        max-width: 100%;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header, .footer, .btn, .modal {
        display: none;
    }
}
