/* 
   UAGro Modern Institutional Design System 
   Based on Pantone Colors: 289 C, 185 C, 654 C
*/

:root {
    /* Official Palette */
    --uagro-navy: #0C2340;
    /* Pantone 289 C - Primary Brand */
    --uagro-red: #E4002B;
    /* Pantone 185 C - Accent/Action */
    --uagro-blue: #003057;
    /* Pantone 654 C - Secondary/Header */
    --uagro-gold: #Bfa15f;
    /* Metallic Gold - Premium touches */

    /* Neutrals */
    --bg-body: #F4F6F9;
    /* Light Gray Blue - Modern Background */
    --bg-white: #FFFFFF;
    --text-primary: #0C2340;
    /* Using Navy for text instead of black */
    --text-secondary: #5A6C7F;
    /* Muted Blue Gray */
    --border-light: #E1E8ED;

    /* Shadows & Radius */
    --shadow-sm: 0 2px 4px rgba(12, 35, 64, 0.05);
    --shadow-md: 0 4px 12px rgba(12, 35, 64, 0.08);
    --shadow-lg: 0 8px 24px rgba(12, 35, 64, 0.12);
    --radius-md: 12px;
    --radius-sm: 8px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Typography & Reset */
body {
    font-family: 'Poppins', sans-serif !important;
    background-color: var(--bg-body) !important;
    background-image: none !important;
    /* Removing old background image for cleaner look */
    color: var(--text-primary) !important;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--uagro-navy);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Header & Navigation */
.header,
.navbar,
.sidebar {
    background-color: var(--uagro-navy) !important;
    box-shadow: var(--shadow-md);
}

.sidebar a:hover,
.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--uagro-gold) !important;
}

/* Modern Cards */
.course-card,
.course-box,
.courses-card-body,
.card {
    background: var(--bg-white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition);
    overflow: hidden;
    display: block;
    /* Ensure it behaves like a card */
}

/* Specific fix for My Courses Card to maintain flex layout */
.my-course-1-full-body-card {
    background: var(--bg-white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition);
    display: flex !important;
    /* Restore flex layout */
    overflow: visible !important;
    /* Allow dropdowns to show */
    flex-wrap: nowrap !important;
    /* Prevent wrapping inside the card */
    align-items: center;
    /* Vertically center content */
    width: 100%;
    /* Ensure card takes full width of column */
    max-width: 100%;
    /* Prevent overflow */
}

/* Ensure image container doesn't shrink or grow unexpectedly */
.my-course-1-full-body-card .my-course-1-img {
    flex-shrink: 0;
    margin-right: 20px;
}

/* Ensure text content takes remaining space but doesn't overflow */
.my-course-1-full-body-card .my-course-1-text {
    flex-grow: 1;
    min-width: 0;
    /* Crucial for text truncation in flex items */
    width: auto !important;
    /* Override explicit widths if any */
}

.course-card:hover,
/* Added for sidebar hover */
.my-course-1-full-body-card:hover,
.course-box:hover,
.courses-card-body:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--uagro-blue) !important;
}

/* Institutional Tabs Redesign */
.nav-tabs {
    border-bottom: 2px solid #e1e8ed !important;
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    color: #6c757d !important;
    font-weight: 500;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    transition: all 0.3s ease;
    padding: 12px 20px;
}

.nav-tabs .nav-link:hover {
    color: var(--uagro-blue) !important;
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--uagro-navy) !important;
    font-weight: 600;
    background: transparent !important;
    border-bottom: 3px solid var(--uagro-navy) !important;
}

.nav-tabs .nav-link svg,
.nav-tabs .nav-link i {
    fill: currentColor !important;
    /* Ensure icons match text color */
}

.nav-tabs .nav-link.active svg,
.nav-tabs .nav-link.active i {
    fill: var(--uagro-navy) !important;
}

/* Typography in Cards */
.my-course-1-full-body-card-title,
.course-title {
    color: var(--uagro-navy) !important;
    font-weight: 600;
    font-size: 1.1rem;
}

.my-course-1-full-body-card-instructor {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
}

/* Form Elements */
input.form-control,
select.form-control,
textarea.form-control {
    background-color: var(--bg-white) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-sm) !important;
    padding: 12px 15px !important;
    color: var(--text-primary) !important;
    transition: var(--transition);
}

input.form-control:focus,
select.form-control:focus {
    border-color: var(--uagro-blue) !important;
    box-shadow: 0 0 0 4px rgba(0, 48, 87, 0.1) !important;
}

/* Buttons Modernization */
.btn {
    border-radius: var(--radius-sm) !important;
    padding: 10px 24px !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px;
    text-transform: none !important;
    border: none !important;
    transition: var(--transition) !important;
    position: relative;
    overflow: hidden;
}

/* Primary Button (Comienza Ahora) */
.btn-primary {
    background-color: var(--uagro-blue) !important;
    /* Pantone 654 C */
    color: white !important;
    box-shadow: 0 4px 10px rgba(0, 48, 87, 0.3);
}

.btn-primary:hover {
    background-color: var(--uagro-navy) !important;
    /* Darker Navy on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 48, 87, 0.4);
}

/* Warning/Action Button (Solicitar Constancia) */
.btn-warning,
.btn-uagro-gold {
    background-color: var(--uagro-gold) !important;
    color: var(--uagro-navy) !important;
    font-weight: 600 !important;
    border: 1px solid #a88b4d !important;
}

.btn-warning:hover,
.btn-uagro-gold:hover {
    background-color: #a88b4d !important;
    color: white !important;
    transform: translateY(-2px);
}

/* Secondary Button / Danger (Red) */
.btn-danger,
.btn-secondary {
    background-color: var(--uagro-red) !important;
    /* Pantone 185 C */
    color: white !important;
}

.btn-danger:hover,
.btn-secondary:hover {
    background-color: #c40024 !important;
    transform: translateY(-2px);
}

/* Progress Bars */
.progress {
    background-color: #e9ecef !important;
    border-radius: 10px !important;
    height: 8px !important;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--uagro-blue), var(--uagro-navy)) !important;
    border-radius: 10px !important;
}

/* Footer */
.footer-area {
    background-color: var(--uagro-navy) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border-top: 4px solid var(--uagro-red);
}

.footer-area h2,
.footer-area h3,
.footer-area h4 {
    color: white !important;
}

/* Badges */
.badge {
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
}

.bg-info {
    background-color: rgba(0, 48, 87, 0.1) !important;
    color: var(--uagro-blue) !important;
    border: 1px solid rgba(0, 48, 87, 0.2);
}

/* Custom Utilities */
.text-uagro {
    color: var(--uagro-navy) !important;
}

.w-100 {
    width: 100% !important;
}

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

/* Wisth toggle items (Cart/Wishlist icons) */
.wisth_tgl_div i,
.wisth_tgl_div a,
.wisth_tgl_div .menu_pro_cart_tgl {
    color: #ffffff !important;
}

/* Fix for menu numbers if needed */
.wisth_tgl_div .menu_number {
    background-color: var(--uagro-gold) !important;
    color: var(--uagro-navy) !important;
}

.my-course-1-full-body h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.my-course-1-full-body h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--uagro-red);
    border-radius: 2px;
}