/* =========================================================
   PHARMA TIPS ZONE
   HOMEPAGE ONLY STYLES

   Global styles:
   theme.css
   common.css
   components.css
   responsive.css

   This file contains ONLY homepage-specific styles.
========================================================= */


/* =========================================================
   HERO SECTION
========================================================= */

.hero-section {
    min-height: 430px;

    position: relative;

    background-image:
        url("https://images.unsplash.com/photo-1576671081837-49000212a370?auto=format&fit=crop&w=1800&q=85");

    background-size: cover;
    background-position: center;

    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;

    inset: 0;

    background: rgba(240, 246, 250, .62);
}

.hero-container {
    position: relative;

    z-index: 2;
}

.hero-content {
    max-width: 610px;
}

.hero-small-title {
    margin-bottom: 5px;

    font-size: 18px;
    font-weight: 600;
}

.hero-content h1 {
    margin: 0;

    font-size: 48px;
    line-height: 1.1;

    font-weight: 800;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-description {
    margin: 15px 0 25px;

    font-size: 18px;
    line-height: 1.45;

    font-weight: 600;
}


/* =========================================================
   HERO STATS
========================================================= */

.hero-stats {
    display: flex;

    gap: 0;

    margin-bottom: 25px;
}

.hero-stat {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 0 25px;

    border-right: 1px solid #bbb;
}

.hero-stat:first-child {
    padding-left: 0;
}

.hero-stat:last-child {
    border-right: 0;
}

.stat-icon {
    width: 42px;
    height: 42px;

    border: 1px solid #ddd;

    background: rgba(255, 255, 255, .8);

    border-radius: 5px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: var(--primary);
}

.hero-stat strong {
    display: block;

    color: var(--primary);

    font-size: 21px;
}

.hero-stat small {
    font-size: 12px;
}


/* =========================================================
   HERO PRIMARY BUTTON
========================================================= */

.hero-content .primary-btn {
    display: inline-block;

    padding: 14px 22px;
}


/* =========================================================
   HERO DOTS
========================================================= */

.hero-dots {
    position: absolute;

    bottom: 14px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;

    gap: 10px;
}

.hero-dots .dot {
    width: 8px;
    height: 8px;

    background: var(--white);

    border-radius: 50%;
}

.hero-dots .dot.active {
    background: var(--primary);
}


/* =========================================================
   HOMEPAGE CONTENT SECTIONS
========================================================= */

.videos-section {
    background: var(--white);
}

.forum-section {
    padding-top: 15px;
}


/* =========================================================
   HOMEPAGE SECTION HEADING
========================================================= */

.section-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0 0 8px;

    font-size: 24px;
    font-weight: 800;
}

.section-heading a {
    color: var(--primary);

    font-size: 12px;
    font-weight: 700;
}

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

.heading-line {
    width: 30px;
    height: 3px;

    display: block;

    background: var(--primary);
}


/* =========================================================
   ARTICLE CARDS
========================================================= */

.article-card {
    height: 100%;

    overflow: hidden;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 6px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.article-card:hover {
    border-color: var(--primary);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, .08);

    transform: translateY(-2px);
}

.article-image {
    height: 185px;

    position: relative;

    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .35s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.04);
}

.article-tag {
    position: absolute;

    top: 10px;
    left: 10px;

    background: var(--primary);

    color: var(--white);

    font-size: 9px;
    font-weight: 700;

    padding: 5px 8px;

    border-radius: 3px;
}

.article-body {
    padding: 15px;
}

.article-body h3 {
    min-height: 40px;

    margin: 0 0 12px;

    font-size: 15px;
    line-height: 1.35;

    font-weight: 700;
}

.article-author {
    margin-bottom: 12px;

    color: var(--muted);

    font-size: 11px;
}

.article-meta {
    display: flex;

    justify-content: space-between;

    padding-top: 10px;

    border-top: 1px solid #eee;

    color: #888;

    font-size: 10px;
}


/* =========================================================
   HOMEPAGE VIDEO SECTION
========================================================= */

.video-card {
    height: 100%;
}

.video-image {
    position: relative;

    height: 190px;

    overflow: hidden;

    border-radius: 6px;
}

.video-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .35s ease;
}

.video-card:hover .video-image img {
    transform: scale(1.04);
}

.video-card .play-button {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 52px;
    height: 52px;

    background: rgba(0, 0, 0, .7);

    color: var(--white);

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    transition:
        background-color .2s ease,
        transform .2s ease;
}

.video-card:hover .play-button {
    background: var(--primary);

    transform:
        translate(-50%, -50%)
        scale(1.08);
}

.video-duration {
    position: absolute;

    right: 8px;
    bottom: 8px;

    background: rgba(0, 0, 0, .8);

    color: var(--white);

    font-size: 10px;

    padding: 4px 6px;

    border-radius: 3px;
}

.video-card h3 {
    margin: 12px 0 7px;

    font-size: 15px;

    font-weight: 700;
}

.video-card p {
    margin: 0;

    color: var(--muted);

    font-size: 11px;
}

.video-card small {
    color: #888;

    font-size: 10px;
}


/* =========================================================
   HOMEPAGE CALCULATORS
========================================================= */

.calculator-card {
    height: 100%;

    display: flex;

    gap: 15px;

    padding: 20px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 7px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.calculator-card:hover {
    border-color: var(--primary);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, .07);

    transform: translateY(-2px);
}

.calculator-icon {
    flex: 0 0 55px;

    width: 55px;
    height: 55px;

    border-radius: 6px;

    background: var(--primary-light);

    color: var(--primary);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 25px;
}

.calculator-content {
    min-width: 0;
}

.calculator-content h3 {
    margin: 2px 0 10px;

    font-size: 15px;
}

.calculator-content p {
    min-height: 35px;

    margin: 0 0 12px;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.5;
}

.calculator-content a {
    display: inline-block;

    background: var(--primary);

    color: var(--white);

    padding: 9px 15px;

    border-radius: 4px;

    font-size: 10px;
    font-weight: 700;
}

.calculator-content a:hover {
    background: var(--primary-dark);
}


/* =========================================================
   HOMEPAGE FORUM
========================================================= */

.forum-table-wrapper {
    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}

.forum-table {
    width: 100%;

    border-collapse: collapse;

    border: 1px solid var(--border);

    background: var(--white);
}

.forum-table th {
    padding: 14px;

    background: var(--light);

    text-align: left;

    font-size: 11px;
    font-weight: 800;
}

.forum-table td {
    padding: 15px 14px;

    border-top: 1px solid #eee;

    font-size: 12px;
}

.forum-table td:not(:first-child) {
    white-space: nowrap;
}

.forum-table small {
    color: #999;
}


/* =========================================================
   FORUM CATEGORY DOTS
========================================================= */

.category-dot {
    width: 8px;
    height: 8px;

    display: inline-block;

    border-radius: 50%;

    margin-right: 5px;
}

.category-dot.primary {
    background: var(--primary);
}

.category-dot.blue {
    background: #1786d1;
}

.category-dot.green {
    background: #20a84a;
}



/* =========================================================
   HOMEPAGE RESPONSIVE OVERRIDES
   Only rules specific to homepage components.
========================================================= */


/* ---------------------------------------------------------
   TABLET
--------------------------------------------------------- */

@media (max-width: 991px) {

    .hero-section {
        min-height: 430px;
    }

    .hero-content {
        max-width: 560px;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-description {
        font-size: 16px;
    }

    .article-image {
        height: 200px;
    }

    .video-image {
        height: 200px;
    }

    .calculator-card {
        min-height: 150px;
    }

    .submit-cta {
        padding: 35px 0;
    }
}


/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 767px) {

    .hero-section {
        min-height: 500px;

        background-position: center center;
    }

    .hero-overlay {
        background: rgba(240, 246, 250, .78);
    }

    .hero-container {
        width: 100%;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;

        padding: 45px 15px;
    }

    .hero-small-title {
        font-size: 15px;
    }

    .hero-content h1 {
        font-size: 35px;

        line-height: 1.12;
    }

    .hero-description {
        margin: 14px 0 22px;

        font-size: 15px;

        line-height: 1.5;
    }


    /* HERO STATS */

    .hero-stats {
        display: grid;

        grid-template-columns: repeat(3, 1fr);

        width: 100%;

        margin-bottom: 25px;
    }

    .hero-stat {
        padding: 0 10px;

        gap: 7px;

        justify-content: center;
    }

    .hero-stat:first-child {
        padding-left: 0;
    }

    .hero-stat:last-child {
        padding-right: 0;
    }

    .stat-icon {
        width: 36px;
        height: 36px;

        font-size: 12px;
    }

    .hero-stat strong {
        font-size: 17px;
    }

    .hero-stat small {
        font-size: 10px;
    }


    /* SECTION */

    .section-heading {
        margin-bottom: 20px;

        align-items: flex-end;

        gap: 15px;
    }

    .section-heading h2 {
        font-size: 21px;
    }

    .section-heading a {
        font-size: 10px;

        white-space: nowrap;
    }


    /* ARTICLE */

    .article-image {
        height: 210px;
    }

    .article-body h3 {
        font-size: 15px;
    }


    /* VIDEO */

    .video-image {
        height: auto;

        aspect-ratio: 16 / 9;
    }

    .video-card h3 {
        font-size: 15px;
    }


    /* CALCULATOR */

    .calculator-card {
        min-height: auto;

        padding: 18px;
    }

    .calculator-icon {
        flex: 0 0 50px;

        width: 50px;
        height: 50px;

        font-size: 21px;
    }


    /* FORUM */

    .forum-table-wrapper {
        width: 100%;

        overflow-x: auto;

        -webkit-overflow-scrolling: touch;
    }

    .forum-table {
        min-width: 700px;
    }


    /* CTA */

    .submit-cta {
        padding: 35px 0;
    }

    .cta-inner {
        display: flex;

        flex-direction: column;

        text-align: center;

        gap: 18px;
    }

    .cta-icon {
        width: 65px;
        height: 65px;

        flex-basis: 65px;

        font-size: 27px;
    }

    .cta-content h2 {
        font-size: 23px;
    }

    .cta-content p {
        font-size: 12px;
    }

    .cta-button {
        padding: 11px 20px;
    }
}


/* ---------------------------------------------------------
   SMALL MOBILE
--------------------------------------------------------- */

@media (max-width: 575px) {

    .hero-section {
        min-height: 520px;
    }

    .hero-content {
        padding: 40px 12px;
    }

    .hero-small-title {
        font-size: 14px;
    }

    .hero-content h1 {
        font-size: 31px;
    }

    .hero-description {
        font-size: 14px;
    }


    /* HERO STATS */

    .hero-stats {
        grid-template-columns: 1fr;

        gap: 10px;
    }

    .hero-stat,
    .hero-stat:first-child,
    .hero-stat:last-child {
        padding: 8px 0;

        border-right: 0;

        justify-content: flex-start;
    }


    /* SECTION HEADING */

    .section-heading {
        align-items: flex-start;

        flex-direction: column;

        gap: 8px;
    }

    .section-heading h2 {
        font-size: 20px;
    }


    /* ARTICLE */

    .article-image {
        height: 200px;
    }


    /* CALCULATOR */

    .calculator-card {
        display: flex;

        gap: 12px;
    }


    /* FORUM */

    .forum-table {
        min-width: 650px;
    }
}